OSDN Git Service

ASCII文字キーをトリガとするマクロがinkey_special()に入力された場合に
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Tue, 9 Mar 2004 15:41:53 +0000 (15:41 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Tue, 9 Mar 2004 15:41:53 +0000 (15:41 +0000)
マクロの展開を抑制しないモードを与えた. これにより, "\\R&\n" といった
マクロを文字キーに割り振っても休憩時にマクロ入力が止まるバグを修正.
関連して, 以下の変更を含む.
* askfor_aux(), get_string()に引数allow_ascii_macro_triggerを追加.
  この引数がTRUEであれば, ASCII文字キーをトリガとするマクロが
  inkey_special()で展開される. 数値入力が主となる部分ではこの引数を
  TRUEに, 文字列入力が主体であればFALSEに設定している.
* askfor()はaskfor_aux()の引数numpad_cursorをTRUEで固定する意味がある
  が, allow_ascii_macro_triggerをFALSEで固定する意味も含む.

17 files changed:
src/artifact.c
src/autopick.c
src/birth.c
src/bldg.c
src/cmd2.c
src/cmd3.c
src/cmd4.c
src/cmd5.c
src/dungeon.c
src/effects.c
src/externs.h
src/files.c
src/object2.c
src/spells3.c
src/store.c
src/util.c
src/wizard2.c

index eb6db95..b8f8bf5 100644 (file)
@@ -1917,7 +1917,7 @@ bool create_artifact(object_type *o_ptr, bool a_scroll)
 
                (void)screen_object(o_ptr, TRUE);
 
-               if (!get_string(ask_msg, dummy_name, sizeof dummy_name)
+               if (!get_string(ask_msg, dummy_name, sizeof dummy_name, FALSE)
                    || !dummy_name[0])
                {
                        /* Cancelled */
index 377be8d..f7a1207 100644 (file)
@@ -3447,7 +3447,7 @@ static byte get_string_for_search(object_type **o_handle, cptr *search_strp)
                Term_gotoxy(col + pos, 0);
 
                /* Get a special key code */
-               skey = inkey_special(TRUE);
+               skey = inkey_special(TRUE, FALSE);
 
                /* Analyze the key */
                switch (skey)
@@ -6254,7 +6254,7 @@ void do_cmd_edit_autopick(void)
                tb->old_hgt = tb->hgt;
 
                /* Get a command */
-               key = inkey_special(TRUE);
+               key = inkey_special(TRUE, FALSE);
 
                /* Special keys */
                if (key & SKEY_MASK)
index eccf4f9..0ad197f 100644 (file)
@@ -5387,7 +5387,7 @@ static void edit_history(void)
                Term_gotoxy(x + 10, y + 12);
 
                /* Get special key code */
-               skey = inkey_special(TRUE);
+               skey = inkey_special(TRUE, FALSE);
 
                /* Get a character code */
                if (!(skey & SKEY_MASK)) c = (char)skey;
index fed7b6d..d8f3a52 100644 (file)
@@ -1280,7 +1280,7 @@ sprintf(tmp_str,"
                 * Use get_string() because we may need more than
                 * the s16b value returned by get_quantity().
                 */
-               if (get_string(tmp_str, out_val, 32))
+               if (get_string(tmp_str, out_val, 32, TRUE))
                {
                        /* Strip spaces */
                        for (p = out_val; *p == ' '; p++);
@@ -1453,9 +1453,9 @@ c_put_str(TERM_GREEN, "
                                        prt("--------------------------------", 8, 3);
                                        strcpy(out_val, "");
 #ifdef JP
-get_string("²¿ÈÖ¡© (0-9): ", out_val, 32);
+                                       get_string("²¿ÈÖ¡© (0-9): ", out_val, 32, TRUE);
 #else
-                                       get_string("Pick a number (0-9): ", out_val, 32);
+                                       get_string("Pick a number (0-9): ", out_val, 32, TRUE);
 #endif
 
                                        for (p = out_val; isspace(*p); p++);
@@ -2012,7 +2012,7 @@ sprintf(tmp_str,"
                 * Use get_string() because we may need more than
                 * the s16b value returned by get_quantity().
                 */
-               if (get_string(tmp_str, out_val, 32))
+               if (get_string(tmp_str, out_val, 32, TRUE))
                {
                        /* Strip spaces */
                        for (p = out_val; *p == ' '; p++);
@@ -3967,11 +3967,10 @@ if (get_check(format("
 
                /* Get the quantity for staves and wands */
 #ifdef JP
-charges = get_quantity(format("°ì²óʬ¡ð%d ¤Ç²¿²óʬ½¼Å¶¤·¤Þ¤¹¤«¡©",
+               charges = get_quantity(format("°ì²óʬ¡ð%d ¤Ç²¿²óʬ½¼Å¶¤·¤Þ¤¹¤«¡©",
 #else
                charges = get_quantity(format("Add how many charges for %d gold? ",
 #endif
-
                              price), MIN(p_ptr->au / price, max_charges));
 
                /* Do nothing */
@@ -4353,12 +4352,12 @@ if (!get_com("
        {
                all = TRUE;
 #ifdef JP
-               if (!get_string("̾Á°(±Ñ¸ì¤Î¾ì¹ç¾®Ê¸»ú¤Ç²Ä)",temp, 70))
+               if (!get_string("̾Á°(±Ñ¸ì¤Î¾ì¹ç¾®Ê¸»ú¤Ç²Ä)", temp, 70, TRUE))
 #else
-               if (!get_string("Enter name:",temp, 70))
+               if (!get_string("Enter name:",temp, 70, TRUE))
 #endif
                {
-                       temp[0]=0;
+                       temp[0] = 0;
 
                        /* Restore */
                        screen_load();
index 975f6d2..8815843 100644 (file)
@@ -2845,7 +2845,7 @@ void do_cmd_rest(void)
                strcpy(out_val, "&");
 
                /* Ask for duration */
-               if (!get_string(p, out_val, 4)) return;
+               if (!get_string(p, out_val, 4, TRUE)) return;
 
                /* Rest until done */
                if (out_val[0] == '&')
index 0a7308a..05489e0 100644 (file)
@@ -1378,9 +1378,9 @@ void do_cmd_inscribe(void)
 
        /* Get a new inscription (possibly empty) */
 #ifdef JP
-       if (get_string("ÌÃ: ", out_val, 80))
+       if (get_string("ÌÃ: ", out_val, 80, FALSE))
 #else
-       if (get_string("Inscription: ", out_val, 80))
+       if (get_string("Inscription: ", out_val, 80, FALSE))
 #endif
        {
                /* Save the inscription */
@@ -2045,12 +2045,12 @@ void do_cmd_query_symbol(void)
        {
                all = TRUE;
 #ifdef JP
-               if (!get_string("̾Á°(±Ñ¸ì¤Î¾ì¹ç¾®Ê¸»ú¤Ç²Ä)",temp, 70))
+               if (!get_string("̾Á°(±Ñ¸ì¤Î¾ì¹ç¾®Ê¸»ú¤Ç²Ä)", temp, 70, FALSE))
 #else
-               if (!get_string("Enter name:",temp, 70))
+               if (!get_string("Enter name:", temp, 70, FALSE))
 #endif
                {
-                       temp[0]=0;
+                       temp[0] = 0;
                        return;
                }
 #ifdef JP
index 7ad1b13..c66f731 100644 (file)
@@ -930,9 +930,9 @@ static void do_cmd_bunshou(void)
        char bunshou[80] = "\0";
 
 #ifdef JP
-       if (get_string("ÆâÍÆ: ", tmp, 79))
+       if (get_string("ÆâÍÆ: ", tmp, 79, FALSE))
 #else
-       if (get_string("diary note: ", tmp, 79))
+       if (get_string("diary note: ", tmp, 79, FALSE))
 #endif
        {
                strcpy(bunshou, tmp);
@@ -1225,9 +1225,9 @@ void do_cmd_change_name(void)
                {
                        sprintf(tmp, "%s.txt", player_base);
 #ifdef JP
-                       if (get_string("¥Õ¥¡¥¤¥ë̾: ", tmp, 80))
+                       if (get_string("¥Õ¥¡¥¤¥ë̾: ", tmp, 80, FALSE))
 #else
-                       if (get_string("File name: ", tmp, 80))
+                       if (get_string("File name: ", tmp, 80, FALSE))
 #endif
 
                        {
@@ -1382,7 +1382,7 @@ void do_cmd_messages(int num_now)
 
 
                /* Get a command */
-               skey = inkey_special(TRUE);
+               skey = inkey_special(TRUE, FALSE);
 
                /* Exit on Escape */
                if (skey == ESCAPE) break;
@@ -2712,9 +2712,9 @@ void do_cmd_pref(void)
 
        /* Ask for a "user pref command" */
 #ifdef JP
-       if (!get_string("ÀßÄêÊѹ¹¥³¥Þ¥ó¥É: ", buf, 80)) return;
+       if (!get_string("ÀßÄêÊѹ¹¥³¥Þ¥ó¥É: ", buf, 80, FALSE)) return;
 #else
-       if (!get_string("Pref: ", buf, 80)) return;
+       if (!get_string("Pref: ", buf, 80, FALSE)) return;
 #endif
 
 
@@ -3597,7 +3597,7 @@ static bool cmd_visuals_aux(int i, int *num, int max)
 
                sprintf(str, "%d", *num);
 
-               if (!get_string(format("Input new number(0-%d): ", max-1), str, 4))
+               if (!get_string(format("Input new number(0-%d): ", max-1), str, 4, TRUE))
                        return FALSE;
 
                tmp = strtol(str, NULL, 0);
@@ -4703,9 +4703,9 @@ void do_cmd_note(void)
 
        /* Input */
 #ifdef JP
-       if (!get_string("¥á¥â: ", buf, 60)) return;
+       if (!get_string("¥á¥â: ", buf, 60, FALSE)) return;
 #else
-       if (!get_string("Note: ", buf, 60)) return;
+       if (!get_string("Note: ", buf, 60, FALSE)) return;
 #endif
 
 
@@ -6097,9 +6097,9 @@ static void do_cmd_save_screen_html(void)
        char buf[1024], tmp[256] = "screen.html";
 
 #ifdef JP
-       if (!get_string("¥Õ¥¡¥¤¥ë̾: ", tmp, 80))
+       if (!get_string("¥Õ¥¡¥¤¥ë̾: ", tmp, 80, FALSE))
 #else
-       if (!get_string("File name: ", tmp, 80))
+       if (!get_string("File name: ", tmp, 80, FALSE))
 #endif
                return;
 
index e62f049..30b1830 100644 (file)
@@ -2247,11 +2247,10 @@ static void do_name_pet(void)
 
                /* Get a new inscription (possibly empty) */
 #ifdef JP
-               if (get_string("̾Á°: ", out_val, 15))
+               if (get_string("̾Á°: ", out_val, 15, FALSE))
 #else
-               if (get_string("Name: ", out_val, 15))
+               if (get_string("Name: ", out_val, 15, FALSE))
 #endif
-
                {
                        if (out_val[0])
                        {
index 240987a..1301d00 100644 (file)
@@ -629,7 +629,7 @@ static void pattern_teleport(void)
                sprintf(tmp_val, "%d", dun_level);
 
                /* Ask for a level */
-               if (!get_string(ppp, tmp_val, 10)) return;
+               if (!get_string(ppp, tmp_val, 10, TRUE)) return;
 
                /* Extract request */
                command_arg = atoi(tmp_val);
index 284b547..63f1d3b 100644 (file)
@@ -5246,9 +5246,9 @@ get_rnd_line("death_j.txt", 0, death_message);
 #endif
                                }
 #ifdef JP
-                               while (!get_string(streq(p_ptr->died_from, "Seppuku") ? "¼­À¤¤Î¶ç: " : "ÃÇËöËâ¤Î¶«¤Ó: ", death_message, 1024)) ;
+                               while (!get_string(streq(p_ptr->died_from, "Seppuku") ? "¼­À¤¤Î¶ç: " : "ÃÇËöËâ¤Î¶«¤Ó: ", death_message, 1024, FALSE)) ;
 #else
-                               while (!get_string("Last word: ", death_message, 1024)) ;
+                               while (!get_string("Last word: ", death_message, 1024, FALSE)) ;
 #endif
                                if (death_message[0] == '\0')
                                {
index 81c0386..952d72d 100644 (file)
@@ -1274,9 +1274,9 @@ extern void prt(cptr str, int row, int col);
 extern void c_roff(byte attr, cptr str);
 extern void roff(cptr str);
 extern void clear_from(int row);
-extern bool askfor_aux(char *buf, int len, bool numpad_cursor);
+extern bool askfor_aux(char *buf, int len, bool numpad_cursor, bool allow_ascii_macro_trigger);
 extern bool askfor(char *buf, int len);
-extern bool get_string(cptr prompt, char *buf, int len);
+extern bool get_string(cptr prompt, char *buf, int len, bool allow_ascii_macro_trigger);
 extern bool get_check(cptr prompt);
 extern bool get_check_strict(cptr prompt, int mode);
 extern bool get_com(cptr prompt, char *command, bool z_escape);
@@ -1302,7 +1302,7 @@ extern size_t my_strcat(char *buf, const char *src, size_t bufsize);
 extern char *my_strstr(const char *haystack, const char *needle);
 extern char *my_strchr(const char *ptr, char ch);
 extern void str_tolower(char *str);
-extern int inkey_special(bool numpad_cursor);
+extern int inkey_special(bool numpad_cursor, bool allow_ascii_macro_trigger);
 
 
 /* xtra1.c */
index cd0cab8..c5d76d0 100644 (file)
@@ -5553,7 +5553,7 @@ prt("[
                }
 
                /* Get a special key code */
-               skey = inkey_special(TRUE);
+               skey = inkey_special(TRUE, FALSE);
 
                /* Show the help for the help */
                if (skey == '?')
@@ -5729,17 +5729,17 @@ strcpy(tmp, "jhelp.hlp");
                        char buff[1024];
                        char xtmp[82];
 
-                       strcpy (xtmp, "");
+                       strcpy(xtmp, "");
 
 #ifdef JP
-                       if (!get_string("¥Õ¥¡¥¤¥ë̾: ", xtmp, 80))
+                       if (!get_string("¥Õ¥¡¥¤¥ë̾: ", xtmp, 80, FALSE))
 #else
-                       if (!get_string("File name: ", xtmp, 80))
+                       if (!get_string("File name: ", xtmp, 80, FALSE))
 #endif
                        {
                                continue;
                        }
+
                        /* Close it */
                        my_fclose(fff);
 
@@ -6022,9 +6022,9 @@ void get_name(void)
 
        /* Prompt for a new name */
 #ifdef JP
-       if (get_string("¥­¥ã¥é¥¯¥¿¡¼¤Î̾Á°¤òÆþÎϤ·¤Æ²¼¤µ¤¤: ", tmp, 15))
+       if (get_string("¥­¥ã¥é¥¯¥¿¡¼¤Î̾Á°¤òÆþÎϤ·¤Æ²¼¤µ¤¤: ", tmp, 15, FALSE))
 #else
-       if (get_string("Enter a name for your character: ", tmp, 15))
+       if (get_string("Enter a name for your character: ", tmp, 15, FALSE))
 #endif
        {
                /* Use the name */
@@ -6114,9 +6114,9 @@ prt("
                char buf[1024] = "";
 
 #ifdef JP
-               while (!get_string("*¾¡Íø*¥á¥Ã¥»¡¼¥¸: ", buf, sizeof buf)) ;
+               while (!get_string("*¾¡Íø*¥á¥Ã¥»¡¼¥¸: ", buf, sizeof buf, FALSE)) ;
 #else
-               while (!get_string("*Winning* message: ", buf, sizeof buf)) ;
+               while (!get_string("*Winning* message: ", buf, sizeof buf, FALSE)) ;
 #endif
 
                if (buf[0])
index 98d1be4..bf2460c 100644 (file)
@@ -8058,7 +8058,7 @@ static void add_essence(int mode)
 #endif
                                strcpy(tmp_val, "1");
 
-                               if (!get_string(tmp, tmp_val, 1)) return;
+                               if (!get_string(tmp, tmp_val, 1, TRUE)) return;
                                pval = atoi(tmp_val);
                                if (pval > limit) pval = limit;
                                else if (pval < 1) pval = 1;
@@ -8089,9 +8089,9 @@ static void add_essence(int mode)
 
                        strcpy(tmp_val, "1");
 #ifdef JP
-                       if (!get_string(format("¤¤¤¯¤ÄÉղä·¤Þ¤¹¤«¡© (1-%d):", p_ptr->lev/7+3), tmp_val, 2)) return;
+                       if (!get_string(format("¤¤¤¯¤ÄÉղä·¤Þ¤¹¤«¡© (1-%d):", p_ptr->lev/7+3), tmp_val, 2, TRUE)) return;
 #else
-                       if (!get_string(format("Enchant how many? (1-%d):", p_ptr->lev/7+3), tmp_val, 2)) return;
+                       if (!get_string(format("Enchant how many? (1-%d):", p_ptr->lev/7+3), tmp_val, 2, TRUE)) return;
 #endif
                        val = atoi(tmp_val);
                        if (val > p_ptr->lev/7+3) val = p_ptr->lev/7+3;
index ebc6033..f76cc7b 100644 (file)
@@ -1012,7 +1012,7 @@ sprintf(ppp, "
        sprintf(tmp_val, "%d", MAX(dun_level, 1));
 
        /* Ask for a level */
-       if (get_string(ppp, tmp_val, 10))
+       if (get_string(ppp, tmp_val, 10, TRUE))
        {
                /* Extract request */
                dummy = atoi(tmp_val);
@@ -1032,13 +1032,12 @@ sprintf(ppp, "
 #else
                        do_cmd_write_nikki(NIKKI_TRUMP, select_dungeon, "using a scroll of reset recall");
 #endif
-                                       /* Accept request */
+               /* Accept request */
 #ifdef JP
-msg_format("%s¤Îµ¢´Ô¥ì¥Ù¥ë¤ò %d ³¬¤Ë¥»¥Ã¥È¡£", d_name+d_info[select_dungeon].name, dummy, dummy * 50);
+               msg_format("%s¤Îµ¢´Ô¥ì¥Ù¥ë¤ò %d ³¬¤Ë¥»¥Ã¥È¡£", d_name+d_info[select_dungeon].name, dummy, dummy * 50);
 #else
                msg_format("Recall depth set to level %d (%d').", dummy, dummy * 50);
 #endif
-
        }
        else
        {
index 429b962..3f81302 100644 (file)
@@ -2605,7 +2605,7 @@ static int get_haggle(cptr pmt, s32b *poffer, s32b price, int final)
                 * Ask the user for a response.
                 * Don't allow to use numpad as cursor key.
                 */
-               res = askfor_aux(out_val, 32, FALSE);
+               res = askfor_aux(out_val, 32, FALSE, FALSE);
 
                /* Clear prompt */
                prt("", 0, 0);
index b6ad3a1..28c3ab4 100644 (file)
@@ -3196,7 +3196,7 @@ void clear_from(int row)
  * ESCAPE clears the buffer and the window and returns FALSE.
  * RETURN accepts the current buffer contents and returns TRUE.
  */
-bool askfor_aux(char *buf, int len, bool numpad_cursor)
+bool askfor_aux(char *buf, int len, bool numpad_cursor, bool allow_ascii_macro_trigger)
 {
        int y, x;
        int pos = 0;
@@ -3237,7 +3237,7 @@ bool askfor_aux(char *buf, int len, bool numpad_cursor)
                Term_gotoxy(x + pos, y);
 
                /* Get a special key code */
-               skey = inkey_special(numpad_cursor);
+               skey = inkey_special(numpad_cursor, allow_ascii_macro_trigger);
 
                /* Analyze the key */
                switch (skey)
@@ -3445,7 +3445,7 @@ bool askfor_aux(char *buf, int len, bool numpad_cursor)
  */
 bool askfor(char *buf, int len)
 {
-       return askfor_aux(buf, len, TRUE);
+       return askfor_aux(buf, len, TRUE, FALSE);
 }
 
 
@@ -3459,7 +3459,7 @@ bool askfor(char *buf, int len)
  *
  * We clear the input, and return FALSE, on "ESCAPE".
  */
-bool get_string(cptr prompt, char *buf, int len)
+bool get_string(cptr prompt, char *buf, int len, bool allow_ascii_macro_trigger)
 {
        bool res;
 
@@ -3470,7 +3470,7 @@ bool get_string(cptr prompt, char *buf, int len)
        prt(prompt, 0, 0);
 
        /* Ask the user for a string */
-       res = askfor(buf, len);
+       res = askfor_aux(buf, len, TRUE, allow_ascii_macro_trigger);
 
        /* Clear prompt */
        prt("", 0, 0);
@@ -3713,7 +3713,7 @@ s16b get_quantity(cptr prompt, int max)
         * Ask for a quantity
         * Don't allow to use numpad as cursor key.
         */
-       res = askfor_aux(buf, 6, FALSE);
+       res = askfor_aux(buf, 6, FALSE, TRUE);
 
        /* Clear prompt */
        prt("", 0, 0);
@@ -5356,7 +5356,7 @@ void str_tolower(char *str)
  * This function is a Mega-Hack and depend on pref-xxx.prf's.
  * Currently works on Linux(UNIX), Windows, and Macintosh only.
  */
-int inkey_special(bool numpad_cursor)
+int inkey_special(bool numpad_cursor, bool allow_ascii_macro_trigger)
 {
        static const struct {
                cptr keyname;
@@ -5418,7 +5418,7 @@ int inkey_special(bool numpad_cursor)
        /*
         * Hack -- Ignore macro defined on ASCII characters.
         */
-       if (trig_len == 1 && parse_macro)
+       if ((trig_len == 1) && parse_macro && !allow_ascii_macro_trigger)
        {
                char c = inkey_macro_trigger_string[0];
 
index 627b5af..f8c7b93 100644 (file)
@@ -366,7 +366,7 @@ static void do_cmd_wiz_change_aux(void)
                sprintf(tmp_val, "%d", p_ptr->stat_max[i]);
 
                /* Query */
-               if (!get_string(ppp, tmp_val, 3)) return;
+               if (!get_string(ppp, tmp_val, 3, TRUE)) return;
 
                /* Extract */
                tmp_int = atoi(tmp_val);
@@ -385,9 +385,9 @@ static void do_cmd_wiz_change_aux(void)
 
        /* Query */
 #ifdef JP
-       if (!get_string("½ÏÎýÅÙ: ", tmp_val, 9)) return;
+       if (!get_string("½ÏÎýÅÙ: ", tmp_val, 9, TRUE)) return;
 #else
-       if (!get_string("Proficiency: ", tmp_val, 9)) return;
+       if (!get_string("Proficiency: ", tmp_val, 9, TRUE)) return;
 #endif
 
        /* Extract */
@@ -421,7 +421,7 @@ static void do_cmd_wiz_change_aux(void)
        sprintf(tmp_val, "%ld", (long)(p_ptr->au));
 
        /* Query */
-       if (!get_string("Gold: ", tmp_val, 9)) return;
+       if (!get_string("Gold: ", tmp_val, 9, TRUE)) return;
 
        /* Extract */
        tmp_long = atol(tmp_val);
@@ -437,7 +437,7 @@ static void do_cmd_wiz_change_aux(void)
        sprintf(tmp_val, "%ld", (long)(p_ptr->max_exp));
 
        /* Query */
-       if (!get_string("Experience: ", tmp_val, 9)) return;
+       if (!get_string("Experience: ", tmp_val, 9, TRUE)) return;
 
        /* Extract */
        tmp_long = atol(tmp_val);
@@ -819,25 +819,25 @@ static void wiz_tweak_item(object_type *o_ptr)
 
        p = "Enter new 'pval' setting: ";
        sprintf(tmp_val, "%d", o_ptr->pval);
-       if (!get_string(p, tmp_val, 5)) return;
+       if (!get_string(p, tmp_val, 5, TRUE)) return;
        o_ptr->pval = atoi(tmp_val);
        wiz_display_item(o_ptr);
 
        p = "Enter new 'to_a' setting: ";
        sprintf(tmp_val, "%d", o_ptr->to_a);
-       if (!get_string(p, tmp_val, 5)) return;
+       if (!get_string(p, tmp_val, 5, TRUE)) return;
        o_ptr->to_a = atoi(tmp_val);
        wiz_display_item(o_ptr);
 
        p = "Enter new 'to_h' setting: ";
        sprintf(tmp_val, "%d", o_ptr->to_h);
-       if (!get_string(p, tmp_val, 5)) return;
+       if (!get_string(p, tmp_val, 5, TRUE)) return;
        o_ptr->to_h = atoi(tmp_val);
        wiz_display_item(o_ptr);
 
        p = "Enter new 'to_d' setting: ";
        sprintf(tmp_val, "%d", o_ptr->to_d);
-       if (!get_string(p, tmp_val, 5)) return;
+       if (!get_string(p, tmp_val, 5, TRUE)) return;
        o_ptr->to_d = atoi(tmp_val);
        wiz_display_item(o_ptr);
 }
@@ -1040,7 +1040,7 @@ static void wiz_statistics(object_type *o_ptr)
                }
 
                sprintf(tmp_val, "%ld", test_roll);
-               if (get_string(p, tmp_val, 10)) test_roll = atol(tmp_val);
+               if (get_string(p, tmp_val, 10, TRUE)) test_roll = atol(tmp_val);
                test_roll = MAX(1, test_roll);
 
                /* Let us know what we are doing */
@@ -1163,7 +1163,7 @@ static void wiz_quantity_item(object_type *o_ptr)
        sprintf(tmp_val, "%d", o_ptr->number);
 
        /* Query */
-       if (get_string("Quantity: ", tmp_val, 2))
+       if (get_string("Quantity: ", tmp_val, 2, TRUE))
        {
                /* Extract */
                tmp_int = atoi(tmp_val);
@@ -1492,7 +1492,7 @@ static void do_cmd_wiz_jump(void)
                sprintf(tmp_val, "%d", dungeon_type);
 
                /* Ask for a level */
-               if (!get_string(ppp, tmp_val, 2)) return;
+               if (!get_string(ppp, tmp_val, 2, TRUE)) return;
 
                tmp_dungeon_type = atoi(tmp_val);
                if (!d_info[tmp_dungeon_type].maxdepth || (tmp_dungeon_type > max_d_idx)) tmp_dungeon_type = DUNGEON_ANGBAND;
@@ -1504,7 +1504,7 @@ static void do_cmd_wiz_jump(void)
                sprintf(tmp_val, "%d", dun_level);
 
                /* Ask for a level */
-               if (!get_string(ppp, tmp_val, 10)) return;
+               if (!get_string(ppp, tmp_val, 10, TRUE)) return;
 
                /* Extract request */
                command_arg = atoi(tmp_val);
@@ -1695,9 +1695,9 @@ static void do_cmd_wiz_create_feature(void)
 
        /* Query */
 #ifdef JP
-       if (!get_string("ÃÏ·Á: ", tmp_val, 3)) return;
+       if (!get_string("ÃÏ·Á: ", tmp_val, 3, TRUE)) return;
 #else
-       if (!get_string("Feature: ", tmp_val, 3)) return;
+       if (!get_string("Feature: ", tmp_val, 3, TRUE)) return;
 #endif
 
        /* Extract */
@@ -1710,9 +1710,9 @@ static void do_cmd_wiz_create_feature(void)
 
        /* Query */
 #ifdef JP
-       if (!get_string("ÃÏ·Á (mimic): ", tmp_val, 3)) return;
+       if (!get_string("ÃÏ·Á (mimic): ", tmp_val, 3, TRUE)) return;
 #else
-       if (!get_string("Feature (mimic): ", tmp_val, 3)) return;
+       if (!get_string("Feature (mimic): ", tmp_val, 3, TRUE)) return;
 #endif
 
        /* Extract */