(void)screen_object(o_ptr, TRUE);
- if (!get_string(ask_msg, dummy_name, sizeof dummy_name, FALSE)
+ if (!get_string(ask_msg, dummy_name, sizeof dummy_name)
|| !dummy_name[0])
{
/* Cancelled */
Term_gotoxy(col + pos, 0);
/* Get a special key code */
- skey = inkey_special(TRUE, FALSE);
+ skey = inkey_special(TRUE);
/* Analyze the key */
switch (skey)
tb->old_hgt = tb->hgt;
/* Get a command */
- key = inkey_special(TRUE, FALSE);
+ key = inkey_special(TRUE);
/* Special keys */
if (key & SKEY_MASK)
Term_gotoxy(x + 10, y + 12);
/* Get special key code */
- skey = inkey_special(TRUE, FALSE);
+ skey = inkey_special(TRUE);
/* Get a character code */
if (!(skey & SKEY_MASK)) c = (char)skey;
* Use get_string() because we may need more than
* the s16b value returned by get_quantity().
*/
- if (get_string(tmp_str, out_val, 32, TRUE))
+ if (get_string(tmp_str, out_val, 32))
{
/* Strip spaces */
for (p = out_val; *p == ' '; p++);
prt("--------------------------------", 8, 3);
strcpy(out_val, "");
#ifdef JP
- get_string("²¿ÈÖ¡© (0-9): ", out_val, 32, TRUE);
+get_string("²¿ÈÖ¡© (0-9): ", out_val, 32);
#else
- get_string("Pick a number (0-9): ", out_val, 32, TRUE);
+ get_string("Pick a number (0-9): ", out_val, 32);
#endif
for (p = out_val; isspace(*p); p++);
* Use get_string() because we may need more than
* the s16b value returned by get_quantity().
*/
- if (get_string(tmp_str, out_val, 32, TRUE))
+ if (get_string(tmp_str, out_val, 32))
{
/* Strip spaces */
for (p = out_val; *p == ' '; p++);
/* 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 */
{
all = TRUE;
#ifdef JP
- if (!get_string("̾Á°(±Ñ¸ì¤Î¾ì¹ç¾®Ê¸»ú¤Ç²Ä)", temp, 70, TRUE))
+ if (!get_string("̾Á°(±Ñ¸ì¤Î¾ì¹ç¾®Ê¸»ú¤Ç²Ä)",temp, 70))
#else
- if (!get_string("Enter name:",temp, 70, TRUE))
+ if (!get_string("Enter name:",temp, 70))
#endif
{
- temp[0] = 0;
+ temp[0]=0;
/* Restore */
screen_load();
strcpy(out_val, "&");
/* Ask for duration */
- if (!get_string(p, out_val, 4, TRUE)) return;
+ if (!get_string(p, out_val, 4)) return;
/* Rest until done */
if (out_val[0] == '&')
/* Get a new inscription (possibly empty) */
#ifdef JP
- if (get_string("ÌÃ: ", out_val, 80, FALSE))
+ if (get_string("ÌÃ: ", out_val, 80))
#else
- if (get_string("Inscription: ", out_val, 80, FALSE))
+ if (get_string("Inscription: ", out_val, 80))
#endif
{
/* Save the inscription */
{
all = TRUE;
#ifdef JP
- if (!get_string("̾Á°(±Ñ¸ì¤Î¾ì¹ç¾®Ê¸»ú¤Ç²Ä)", temp, 70, FALSE))
+ if (!get_string("̾Á°(±Ñ¸ì¤Î¾ì¹ç¾®Ê¸»ú¤Ç²Ä)",temp, 70))
#else
- if (!get_string("Enter name:", temp, 70, FALSE))
+ if (!get_string("Enter name:",temp, 70))
#endif
{
- temp[0] = 0;
+ temp[0]=0;
return;
}
#ifdef JP
char bunshou[80] = "\0";
#ifdef JP
- if (get_string("ÆâÍÆ: ", tmp, 79, FALSE))
+ if (get_string("ÆâÍÆ: ", tmp, 79))
#else
- if (get_string("diary note: ", tmp, 79, FALSE))
+ if (get_string("diary note: ", tmp, 79))
#endif
{
strcpy(bunshou, tmp);
{
sprintf(tmp, "%s.txt", player_base);
#ifdef JP
- if (get_string("¥Õ¥¡¥¤¥ë̾: ", tmp, 80, FALSE))
+ if (get_string("¥Õ¥¡¥¤¥ë̾: ", tmp, 80))
#else
- if (get_string("File name: ", tmp, 80, FALSE))
+ if (get_string("File name: ", tmp, 80))
#endif
{
/* Get a command */
- skey = inkey_special(TRUE, FALSE);
+ skey = inkey_special(TRUE);
/* Exit on Escape */
if (skey == ESCAPE) break;
/* Ask for a "user pref command" */
#ifdef JP
- if (!get_string("ÀßÄêÊѹ¹¥³¥Þ¥ó¥É: ", buf, 80, FALSE)) return;
+ if (!get_string("ÀßÄêÊѹ¹¥³¥Þ¥ó¥É: ", buf, 80)) return;
#else
- if (!get_string("Pref: ", buf, 80, FALSE)) return;
+ if (!get_string("Pref: ", buf, 80)) return;
#endif
sprintf(str, "%d", *num);
- if (!get_string(format("Input new number(0-%d): ", max-1), str, 4, TRUE))
+ if (!get_string(format("Input new number(0-%d): ", max-1), str, 4))
return FALSE;
tmp = strtol(str, NULL, 0);
/* Input */
#ifdef JP
- if (!get_string("¥á¥â: ", buf, 60, FALSE)) return;
+ if (!get_string("¥á¥â: ", buf, 60)) return;
#else
- if (!get_string("Note: ", buf, 60, FALSE)) return;
+ if (!get_string("Note: ", buf, 60)) return;
#endif
char buf[1024], tmp[256] = "screen.html";
#ifdef JP
- if (!get_string("¥Õ¥¡¥¤¥ë̾: ", tmp, 80, FALSE))
+ if (!get_string("¥Õ¥¡¥¤¥ë̾: ", tmp, 80))
#else
- if (!get_string("File name: ", tmp, 80, FALSE))
+ if (!get_string("File name: ", tmp, 80))
#endif
return;
/* Get a new inscription (possibly empty) */
#ifdef JP
- if (get_string("̾Á°: ", out_val, 15, FALSE))
+ if (get_string("̾Á°: ", out_val, 15))
#else
- if (get_string("Name: ", out_val, 15, FALSE))
+ if (get_string("Name: ", out_val, 15))
#endif
+
{
if (out_val[0])
{
sprintf(tmp_val, "%d", dun_level);
/* Ask for a level */
- if (!get_string(ppp, tmp_val, 10, TRUE)) return;
+ if (!get_string(ppp, tmp_val, 10)) return;
/* Extract request */
command_arg = atoi(tmp_val);
#endif
}
#ifdef JP
- while (!get_string(streq(p_ptr->died_from, "Seppuku") ? "¼À¤¤Î¶ç: " : "ÃÇËöËâ¤Î¶«¤Ó: ", death_message, 1024, FALSE)) ;
+ while (!get_string(streq(p_ptr->died_from, "Seppuku") ? "¼À¤¤Î¶ç: " : "ÃÇËöËâ¤Î¶«¤Ó: ", death_message, 1024)) ;
#else
- while (!get_string("Last word: ", death_message, 1024, FALSE)) ;
+ while (!get_string("Last word: ", death_message, 1024)) ;
#endif
if (death_message[0] == '\0')
{
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, bool allow_ascii_macro_trigger);
+extern bool askfor_aux(char *buf, int len, bool numpad_cursor);
extern bool askfor(char *buf, int len);
-extern bool get_string(cptr prompt, char *buf, int len, bool allow_ascii_macro_trigger);
+extern bool get_string(cptr prompt, char *buf, int len);
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);
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, bool allow_ascii_macro_trigger);
+extern int inkey_special(bool numpad_cursor);
/* xtra1.c */
}
/* Get a special key code */
- skey = inkey_special(TRUE, FALSE);
+ skey = inkey_special(TRUE);
/* Show the help for the help */
if (skey == '?')
char buff[1024];
char xtmp[82];
- strcpy(xtmp, "");
+ strcpy (xtmp, "");
#ifdef JP
- if (!get_string("¥Õ¥¡¥¤¥ë̾: ", xtmp, 80, FALSE))
+ if (!get_string("¥Õ¥¡¥¤¥ë̾: ", xtmp, 80))
#else
- if (!get_string("File name: ", xtmp, 80, FALSE))
+ if (!get_string("File name: ", xtmp, 80))
#endif
{
continue;
}
-
+
/* Close it */
my_fclose(fff);
/* Prompt for a new name */
#ifdef JP
- if (get_string("¥¥ã¥é¥¯¥¿¡¼¤Î̾Á°¤òÆþÎϤ·¤Æ²¼¤µ¤¤: ", tmp, 15, FALSE))
+ if (get_string("¥¥ã¥é¥¯¥¿¡¼¤Î̾Á°¤òÆþÎϤ·¤Æ²¼¤µ¤¤: ", tmp, 15))
#else
- if (get_string("Enter a name for your character: ", tmp, 15, FALSE))
+ if (get_string("Enter a name for your character: ", tmp, 15))
#endif
{
/* Use the name */
char buf[1024] = "";
#ifdef JP
- while (!get_string("*¾¡Íø*¥á¥Ã¥»¡¼¥¸: ", buf, sizeof buf, FALSE)) ;
+ while (!get_string("*¾¡Íø*¥á¥Ã¥»¡¼¥¸: ", buf, sizeof buf)) ;
#else
- while (!get_string("*Winning* message: ", buf, sizeof buf, FALSE)) ;
+ while (!get_string("*Winning* message: ", buf, sizeof buf)) ;
#endif
if (buf[0])
#endif
strcpy(tmp_val, "1");
- if (!get_string(tmp, tmp_val, 1, TRUE)) return;
+ if (!get_string(tmp, tmp_val, 1)) return;
pval = atoi(tmp_val);
if (pval > limit) pval = limit;
else if (pval < 1) pval = 1;
strcpy(tmp_val, "1");
#ifdef JP
- if (!get_string(format("¤¤¤¯¤ÄÉղä·¤Þ¤¹¤«¡© (1-%d):", p_ptr->lev/7+3), tmp_val, 2, TRUE)) return;
+ if (!get_string(format("¤¤¤¯¤ÄÉղä·¤Þ¤¹¤«¡© (1-%d):", p_ptr->lev/7+3), tmp_val, 2)) return;
#else
- if (!get_string(format("Enchant how many? (1-%d):", p_ptr->lev/7+3), tmp_val, 2, TRUE)) return;
+ if (!get_string(format("Enchant how many? (1-%d):", p_ptr->lev/7+3), tmp_val, 2)) return;
#endif
val = atoi(tmp_val);
if (val > p_ptr->lev/7+3) val = p_ptr->lev/7+3;
sprintf(tmp_val, "%d", MAX(dun_level, 1));
/* Ask for a level */
- if (get_string(ppp, tmp_val, 10, TRUE))
+ if (get_string(ppp, tmp_val, 10))
{
/* Extract request */
dummy = atoi(tmp_val);
#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
{
* Ask the user for a response.
* Don't allow to use numpad as cursor key.
*/
- res = askfor_aux(out_val, 32, FALSE, FALSE);
+ res = askfor_aux(out_val, 32, FALSE);
/* Clear prompt */
prt("", 0, 0);
* 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 allow_ascii_macro_trigger)
+bool askfor_aux(char *buf, int len, bool numpad_cursor)
{
int y, x;
int pos = 0;
Term_gotoxy(x + pos, y);
/* Get a special key code */
- skey = inkey_special(numpad_cursor, allow_ascii_macro_trigger);
+ skey = inkey_special(numpad_cursor);
/* Analyze the key */
switch (skey)
*/
bool askfor(char *buf, int len)
{
- return askfor_aux(buf, len, TRUE, FALSE);
+ return askfor_aux(buf, len, TRUE);
}
*
* We clear the input, and return FALSE, on "ESCAPE".
*/
-bool get_string(cptr prompt, char *buf, int len, bool allow_ascii_macro_trigger)
+bool get_string(cptr prompt, char *buf, int len)
{
bool res;
prt(prompt, 0, 0);
/* Ask the user for a string */
- res = askfor_aux(buf, len, TRUE, allow_ascii_macro_trigger);
+ res = askfor(buf, len);
/* Clear prompt */
prt("", 0, 0);
* Ask for a quantity
* Don't allow to use numpad as cursor key.
*/
- res = askfor_aux(buf, 6, FALSE, TRUE);
+ res = askfor_aux(buf, 6, FALSE);
/* Clear prompt */
prt("", 0, 0);
* 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, bool allow_ascii_macro_trigger)
+int inkey_special(bool numpad_cursor)
{
static const struct {
cptr keyname;
/*
* Hack -- Ignore macro defined on ASCII characters.
*/
- if ((trig_len == 1) && parse_macro && !allow_ascii_macro_trigger)
+ if (trig_len == 1 && parse_macro)
{
char c = inkey_macro_trigger_string[0];
sprintf(tmp_val, "%d", p_ptr->stat_max[i]);
/* Query */
- if (!get_string(ppp, tmp_val, 3, TRUE)) return;
+ if (!get_string(ppp, tmp_val, 3)) return;
/* Extract */
tmp_int = atoi(tmp_val);
/* Query */
#ifdef JP
- if (!get_string("½ÏÎýÅÙ: ", tmp_val, 9, TRUE)) return;
+ if (!get_string("½ÏÎýÅÙ: ", tmp_val, 9)) return;
#else
- if (!get_string("Proficiency: ", tmp_val, 9, TRUE)) return;
+ if (!get_string("Proficiency: ", tmp_val, 9)) return;
#endif
/* Extract */
sprintf(tmp_val, "%ld", (long)(p_ptr->au));
/* Query */
- if (!get_string("Gold: ", tmp_val, 9, TRUE)) return;
+ if (!get_string("Gold: ", tmp_val, 9)) return;
/* Extract */
tmp_long = atol(tmp_val);
sprintf(tmp_val, "%ld", (long)(p_ptr->max_exp));
/* Query */
- if (!get_string("Experience: ", tmp_val, 9, TRUE)) return;
+ if (!get_string("Experience: ", tmp_val, 9)) return;
/* Extract */
tmp_long = atol(tmp_val);
p = "Enter new 'pval' setting: ";
sprintf(tmp_val, "%d", o_ptr->pval);
- if (!get_string(p, tmp_val, 5, TRUE)) return;
+ if (!get_string(p, tmp_val, 5)) 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, TRUE)) return;
+ if (!get_string(p, tmp_val, 5)) 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, TRUE)) return;
+ if (!get_string(p, tmp_val, 5)) 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, TRUE)) return;
+ if (!get_string(p, tmp_val, 5)) return;
o_ptr->to_d = atoi(tmp_val);
wiz_display_item(o_ptr);
}
}
sprintf(tmp_val, "%ld", test_roll);
- if (get_string(p, tmp_val, 10, TRUE)) test_roll = atol(tmp_val);
+ if (get_string(p, tmp_val, 10)) test_roll = atol(tmp_val);
test_roll = MAX(1, test_roll);
/* Let us know what we are doing */
sprintf(tmp_val, "%d", o_ptr->number);
/* Query */
- if (get_string("Quantity: ", tmp_val, 2, TRUE))
+ if (get_string("Quantity: ", tmp_val, 2))
{
/* Extract */
tmp_int = atoi(tmp_val);
sprintf(tmp_val, "%d", dungeon_type);
/* Ask for a level */
- if (!get_string(ppp, tmp_val, 2, TRUE)) return;
+ if (!get_string(ppp, tmp_val, 2)) 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;
sprintf(tmp_val, "%d", dun_level);
/* Ask for a level */
- if (!get_string(ppp, tmp_val, 10, TRUE)) return;
+ if (!get_string(ppp, tmp_val, 10)) return;
/* Extract request */
command_arg = atoi(tmp_val);
/* Query */
#ifdef JP
- if (!get_string("ÃÏ·Á: ", tmp_val, 3, TRUE)) return;
+ if (!get_string("ÃÏ·Á: ", tmp_val, 3)) return;
#else
- if (!get_string("Feature: ", tmp_val, 3, TRUE)) return;
+ if (!get_string("Feature: ", tmp_val, 3)) return;
#endif
/* Extract */
/* Query */
#ifdef JP
- if (!get_string("ÃÏ·Á (mimic): ", tmp_val, 3, TRUE)) return;
+ if (!get_string("ÃÏ·Á (mimic): ", tmp_val, 3)) return;
#else
- if (!get_string("Feature (mimic): ", tmp_val, 3, TRUE)) return;
+ if (!get_string("Feature (mimic): ", tmp_val, 3)) return;
#endif
/* Extract */