From: mogami Date: Tue, 26 Feb 2002 09:39:10 +0000 (+0000) Subject: コマンドメニューがリターンキーを識別するコードを '\r' だけでなく X-Git-Tag: v2.1.2~2490 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=8ea010e83d7efb333350156c05ac09f4036fc2d1;p=hengbandforosx%2Fhengbandosx.git コマンドメニューがリターンキーを識別するコードを '\r' だけでなく '\n' も加えた。MPW用。 --- diff --git a/src/cmd5.c b/src/cmd5.c index 374a96115..a8a929dfa 100644 --- a/src/cmd5.c +++ b/src/cmd5.c @@ -186,6 +186,7 @@ static int get_spell(int *sn, cptr prompt, int sval, bool learned, int use_realm case 'x': case 'X': case '\r': + case '\n': { i = menu_line - 1; ask = FALSE; @@ -5882,11 +5883,6 @@ strnfmt(out_val, 78, "( continue; } - if (choice == '\r' && num == 1) - { - choice = 'a'; - } - if (isalpha(choice)) { /* Note verify */ diff --git a/src/hissatsu.c b/src/hissatsu.c index 8af4f786b..1132062c4 100644 --- a/src/hissatsu.c +++ b/src/hissatsu.c @@ -169,6 +169,7 @@ cptr p = "ɬ case 'x': case 'X': case '\r': + case '\n': { i = menu_line - 1; ask = FALSE; diff --git a/src/mind.c b/src/mind.c index a4b529815..4b48357f4 100644 --- a/src/mind.c +++ b/src/mind.c @@ -610,6 +610,7 @@ void mindcraft_info(char *p, int use_mind, int power) case 'x': case 'X': case '\r': + case '\n': { i = menu_line - 1; ask = FALSE; diff --git a/src/object1.c b/src/object1.c index 8ea85ca1e..74fe9bef9 100644 --- a/src/object1.c +++ b/src/object1.c @@ -5501,6 +5501,7 @@ if (allow_floor) strcat(out_val, " '-' case 'x': case 'X': case '\r': + case '\n': { /* Validate the item */ if (!get_item_okay(get_item_label)) diff --git a/src/object2.c b/src/object2.c index d40119720..823c4332e 100644 --- a/src/object2.c +++ b/src/object2.c @@ -7012,6 +7012,7 @@ static int choose_essence() menu_line+= 4; break; case '\r': + case '\n': case 'x': case 'X': mode = menu_line; @@ -7175,6 +7176,7 @@ static void add_essence(int mode) case 'x': case 'X': case '\r': + case '\n': { i = menu_line - 1; ask = FALSE; @@ -7843,6 +7845,7 @@ void do_cmd_kaji(bool only_browse) menu_line+= 4; break; case '\r': + case '\n': case 'x': case 'X': mode = menu_line; diff --git a/src/util.c b/src/util.c index f624630b5..9f19b58dc 100644 --- a/src/util.c +++ b/src/util.c @@ -4017,7 +4017,7 @@ static char inkey_from_menu(void) /* Get a command */ sub_cmd = inkey(); - if ((sub_cmd == ' ') || (sub_cmd == 'x') || (sub_cmd == 'X') || (sub_cmd == '\r')) + if ((sub_cmd == ' ') || (sub_cmd == 'x') || (sub_cmd == 'X') || (sub_cmd == '\r') || (sub_cmd == '\n')) { if (menu_info[menu][num].fin) {