[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1373469318-13956-2-git-send-email-artagnon@gmail.com>
Date: Wed, 10 Jul 2013 20:45:16 +0530
From: Ramkumar Ramachandra <artagnon@...il.com>
To: LKML <linux-kernel@...r.kernel.org>
Cc: Michal Marek <mmarek@...e.cz>
Subject: [PATCH 1/3] menuconfig: factor out reserved letters
These letters that should not be used in menu selection.
Cc: Michal Marek <mmarek@...e.cz>
Signed-off-by: Ramkumar Ramachandra <artagnon@...il.com>
---
scripts/kconfig/lxdialog/menubox.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/scripts/kconfig/lxdialog/menubox.c b/scripts/kconfig/lxdialog/menubox.c
index 38cd69c..5923f2c 100644
--- a/scripts/kconfig/lxdialog/menubox.c
+++ b/scripts/kconfig/lxdialog/menubox.c
@@ -57,6 +57,7 @@
*/
#include "dialog.h"
+#define RESERVED_LETTERS "YyNnMmHh"
static int menu_width, item_x;
@@ -71,7 +72,7 @@ static void do_print_item(WINDOW * win, const char *item, int line_y,
strncpy(menu_item, item, menu_width - item_x);
menu_item[menu_width - item_x] = '\0';
- j = first_alpha(menu_item, "YyNnMmHh");
+ j = first_alpha(menu_item, RESERVED_LETTERS);
/* Clear 'residue' of last item */
wattrset(win, dlg.menubox.atr);
@@ -290,14 +291,14 @@ do_resize:
else {
for (i = choice + 1; i < max_choice; i++) {
item_set(scroll + i);
- j = first_alpha(item_str(), "YyNnMmHh");
+ j = first_alpha(item_str(), RESERVED_LETTERS);
if (key == tolower(item_str()[j]))
break;
}
if (i == max_choice)
for (i = 0; i < max_choice; i++) {
item_set(scroll + i);
- j = first_alpha(item_str(), "YyNnMmHh");
+ j = first_alpha(item_str(), RESERVED_LETTERS);
if (key == tolower(item_str()[j]))
break;
}
--
1.8.3.2.736.g869de25
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists