OSDN Git Service

コマンドメニューがリターンキーを識別するコードを '\r' だけでなく
authormogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Tue, 26 Feb 2002 09:39:10 +0000 (09:39 +0000)
committermogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Tue, 26 Feb 2002 09:39:10 +0000 (09:39 +0000)
'\n' も加えた。MPW用。

src/cmd5.c
src/hissatsu.c
src/mind.c
src/object1.c
src/object2.c
src/util.c

index 374a961..a8a929d 100644 (file)
@@ -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 */
index 8af4f78..1132062 100644 (file)
@@ -169,6 +169,7 @@ cptr            p = "ɬ
                                case 'x':
                                case 'X':
                                case '\r':
+                               case '\n':
                                {
                                        i = menu_line - 1;
                                        ask = FALSE;
index a4b5298..4b48357 100644 (file)
@@ -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;
index 8ea85ca..74fe9be 100644 (file)
@@ -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))
index d401197..823c433 100644 (file)
@@ -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;
index f624630..9f19b58 100644 (file)
@@ -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)
                        {