From: Ramkumar Ramachandra <artagnon@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Michal Marek <mmarek@suse.cz>
Subject: [PATCH 1/3] menuconfig: factor out reserved letters
Date: Wed, 10 Jul 2013 20:45:16 +0530 [thread overview]
Message-ID: <1373469318-13956-2-git-send-email-artagnon@gmail.com> (raw)
In-Reply-To: <1373469318-13956-1-git-send-email-artagnon@gmail.com>
These letters that should not be used in menu selection.
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
| 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--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
next prev parent reply other threads:[~2013-07-10 15:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-10 15:15 [PATCH v2 0/3] Modernize menuconfig a bit Ramkumar Ramachandra
2013-07-10 15:15 ` Ramkumar Ramachandra [this message]
2013-07-10 15:15 ` [PATCH 2/3] menuconfig: remove redundant info from RESERVED_LETTERS Ramkumar Ramachandra
2013-07-10 15:15 ` [PATCH 3/3] menuconfig: allow j/k to move down/up the menu Ramkumar Ramachandra
2013-07-14 6:08 ` [PATCH v2 0/3] Modernize menuconfig a bit Rob Landley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1373469318-13956-2-git-send-email-artagnon@gmail.com \
--to=artagnon@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mmarek@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox