OSDN Git Service

[Refactor] #define ALLOW_EASY_OPEN による分岐処理削除。 / Delete #define branch by ALLOW_EASY_OPEN.
[hengband/hengband.git] / src / util.c
index def117a..9be0b61 100644 (file)
@@ -284,7 +284,6 @@ static errr path_temp(char *buf, int max)
        /* Temp file */
        s = tmpnam(NULL);
 
-       /* Oops */
        if (!s) return (-1);
 
        /* Format to length */
@@ -533,7 +532,7 @@ errr my_fgets(FILE *fff, char *buf, huge n)
  *
  * Dump a string, plus a newline, to a file
  *
- * XXX XXX XXX Process internal weirdness?
+ * Process internal weirdness?
  */
 errr my_fputs(FILE *fff, cptr buf, huge n)
 {
@@ -688,7 +687,7 @@ errr fd_copy(cptr file, cptr what)
  *
  * Note that we assume that the file should be "binary"
  *
- * XXX XXX XXX The horrible "BEN_HACK" code is for compiling under
+ * The horrible "BEN_HACK" code is for compiling under
  * the CodeWarrior compiler, in which case, for some reason, none
  * of the "O_*" flags are defined, and we must fake the definition
  * of "O_RDONLY", "O_WRONLY", and "O_RDWR" in "A-win-h", and then
@@ -944,7 +943,7 @@ errr fd_close(int fd)
 
 
 /*
- * XXX XXX XXX Important note about "colors" XXX XXX XXX
+ * Important note about "colors" 
  *
  * The "TERM_*" color definitions list the "composition" of each
  * "Angband color" in terms of "quarters" of each of the three color
@@ -1595,15 +1594,15 @@ static sint macro_find_ready(cptr pat)
  * Add a macro definition (or redefinition).
  *
  * We should use "act == NULL" to "remove" a macro, but this might make it
- * impossible to save the "removal" of a macro definition.  XXX XXX XXX
+ * impossible to save the "removal" of a macro definition.  
  *
  * We should consider refusing to allow macros which contain existing macros,
  * or which are contained in existing macros, because this would simplify the
- * macro analysis code.  XXX XXX XXX
+ * macro analysis code.  
  *
  * We should consider removing the "command macro" crap, and replacing it
  * with some kind of "powerful keymap" ability, but this might make it hard
- * to change the "roguelike" option from inside the game.  XXX XXX XXX
+ * to change the "roguelike" option from inside the game.  
  */
 errr macro_add(cptr pat, cptr act)
 {
@@ -1823,7 +1822,7 @@ void select_floor_music(void)
  * Only 500 (0+1+2+...+29+30) milliseconds may elapse between each key in
  * the macro trigger sequence.  If a key sequence forms the "prefix" of a
  * macro trigger, 500 milliseconds must pass before the key sequence is
- * known not to be that macro trigger.  XXX XXX XXX
+ * known not to be that macro trigger.  
  */
 static char inkey_aux(void)
 {
@@ -2002,7 +2001,7 @@ static void forget_macro_action(void)
 
 
 /*
- * Mega-Hack -- special "inkey_next" pointer.  XXX XXX XXX
+ * Mega-Hack -- special "inkey_next" pointer.  
  *
  * This special pointer allows a sequence of keys to be "inserted" into
  * the stream of keys returned by "inkey()".  This key sequence will not
@@ -2015,7 +2014,7 @@ static cptr inkey_next = NULL;
 #ifdef ALLOW_BORG
 
 /*
- * Mega-Hack -- special "inkey_hack" hook.  XXX XXX XXX
+ * Mega-Hack -- special "inkey_hack" hook.  
  *
  * This special function hook allows the "Borg" (see elsewhere) to take
  * control of the "inkey()" function, and substitute in fake keypresses.
@@ -2205,7 +2204,6 @@ char inkey(void)
                                        break;
                                }
 
-                               /* Oops */
                                break;
                        }
 
@@ -2809,13 +2807,13 @@ static void msg_flush(int x)
  * The global "msg_flag" variable can be cleared to tell us to
  * "erase" any "pending" messages still on the screen.
  *
- * XXX XXX XXX Note that we must be very careful about using the
+ * Note that we must be very careful about using the
  * "msg_print()" functions without explicitly calling the special
  * "msg_print(NULL)" function, since this may result in the loss
  * of information if the screen is cleared, or if anything is
  * displayed on the top line.
  *
- * XXX XXX XXX Note that "msg_print(NULL)" will clear the top line
+ * Note that "msg_print(NULL)" will clear the top line
  * even if no messages are pending.  This is probably a hack.
  */
 void msg_print(cptr msg)
@@ -2952,7 +2950,6 @@ void msg_print(cptr msg)
        /* Memorize the tail */
        /* if (character_generated) message_add(t); */
 
-       /* Window stuff */
        p_ptr->window |= (PW_MESSAGE);
        window_stuff();
 
@@ -3615,7 +3612,7 @@ bool get_string(cptr prompt, char *buf, int len)
 {
        bool res;
 
-       /* Paranoia XXX XXX XXX */
+       /* Paranoia */
        msg_print(NULL);
 
        /* Display prompt */
@@ -3665,7 +3662,7 @@ bool get_check_strict(cptr prompt, BIT_FLAGS mode)
                num_more = 0;
        }
 
-       /* Paranoia XXX XXX XXX */
+       /* Paranoia */
        msg_print(NULL);
 
        if (!rogue_like_commands)
@@ -3767,7 +3764,7 @@ bool get_check_strict(cptr prompt, BIT_FLAGS mode)
  */
 bool get_com(cptr prompt, char *command, bool z_escape)
 {
-       /* Paranoia XXX XXX XXX */
+       /* Paranoia */
        msg_print(NULL);
 
        /* Display a prompt */
@@ -3821,8 +3818,6 @@ QUANTITY get_quantity(cptr prompt, QUANTITY max)
                return (amt);
        }
 
-#ifdef ALLOW_REPEAT /* TNB */
-
        /* Get the item index */
        result = repeat_pull(&code);
        amt = (QUANTITY)code;
@@ -3838,8 +3833,6 @@ QUANTITY get_quantity(cptr prompt, QUANTITY max)
                return (amt);
        }
 
-#endif /* ALLOW_REPEAT -- TNB */
-
        /* Build a prompt if needed */
        if (!prompt)
        {
@@ -3850,7 +3843,7 @@ QUANTITY get_quantity(cptr prompt, QUANTITY max)
                prompt = tmp;
        }
 
-       /* Paranoia XXX XXX XXX */
+       /* Paranoia */
        msg_print(NULL);
 
        /* Display prompt */
@@ -3886,19 +3879,15 @@ QUANTITY get_quantity(cptr prompt, QUANTITY max)
        /* Enforce the minimum */
        if (amt < 0) amt = 0;
 
-#ifdef ALLOW_REPEAT /* TNB */
-
        if (amt) repeat_push((COMMAND_CODE)amt);
 
-#endif /* ALLOW_REPEAT -- TNB */
-
        /* Return the result */
        return (amt);
 }
 
 
 /*
- * Pause for user response XXX XXX XXX
+ * Pause for user response 
  */
 void pause_line(int row)
 {
@@ -4395,7 +4384,7 @@ static char inkey_from_menu(void)
  * Note that this command is used both in the dungeon and in
  * stores, and must be careful to work in both situations.
  *
- * Note that "p_ptr->command_new" may not work any more.  XXX XXX XXX
+ * Note that "p_ptr->command_new" may not work any more.  
  */
 void request_command(int shopping)
 {
@@ -4847,8 +4836,6 @@ int get_keymap_dir(char ch)
 }
 
 
-#ifdef ALLOW_REPEAT /* TNB */
-
 #define REPEAT_MAX             20
 
 /* Number of chars saved */
@@ -4924,8 +4911,6 @@ void repeat_check(void)
        }
 }
 
-#endif /* ALLOW_REPEAT -- TNB */
-
 
 #ifdef SORT_R_INFO