From: Mitch Adair <mitch@theneteffect.com>
To: linux-kernel@vger.kernel.org
Cc: torvalds@osdl.org, zippel@linux-m68k.org
Subject: [PATCH] fix menuconfig help for "choice" groups
Date: Fri, 11 Jul 2003 14:07:37 -0500 (CDT) [thread overview]
Message-ID: <200307111907.h6BJ7bY19821@mako.theneteffect.com> (raw)
Following patch fixes menuconfig so that it shows the help entries for
items inside a "choice" group. (an example of this choice group is
Processor type and features -> Processor family -- try to select
help for one of the processors in there and you'll see...)
I've been hawking this patch since 2.5.64... it's fairly trivial and
don't we want working Help for the poor souls jumping into 2.6-pre
for the first time? :)
M
diff -urN linux-2.5.75/scripts/kconfig/mconf.c linux-2.5.75-mod/scripts/kconfig/mconf.c
--- linux-2.5.75/scripts/kconfig/mconf.c Fri Jul 11 12:17:22 2003
+++ linux-2.5.75-mod/scripts/kconfig/mconf.c Fri Jul 11 12:24:01 2003
@@ -635,7 +635,8 @@
sym_set_tristate_value(menu->sym, yes);
return;
case 1:
- show_help(menu);
+ if (sscanf(input_buf, "%p", &child) == 1)
+ show_help(child);
break;
case 255:
return;
diff -urN linux-2.5.75/scripts/lxdialog/checklist.c linux-2.5.75-mod/scripts/lxdialog/checklist.c
--- linux-2.5.75/scripts/lxdialog/checklist.c Tue Mar 4 21:29:18 2003
+++ linux-2.5.75-mod/scripts/lxdialog/checklist.c Fri Jul 11 12:24:01 2003
@@ -302,6 +302,21 @@
case 'H':
case 'h':
case '?':
+ if (!status[scroll + choice]) {
+ for (i = 0; i < item_no; i++)
+ status[i] = 0;
+ status[scroll + choice] = 1;
+ for (i = 0; i < max_choice; i++)
+ print_item (list, items[(scroll + i) * 3 + 1],
+ status[scroll + i], i, i == choice);
+ }
+ wnoutrefresh (list);
+ wrefresh (dialog);
+
+ for (i = 0; i < item_no; i++) {
+ if (status[i])
+ fprintf (stderr, "%s", items[i * 3]);
+ }
delwin (dialog);
free (status);
return 1;
@@ -318,36 +333,33 @@
case 's':
case ' ':
case '\n':
- if (!button) {
- if (flag == FLAG_CHECK) {
- status[scroll + choice] = !status[scroll + choice];
- wmove (list, choice, check_x);
- wattrset (list, check_selected_attr);
- wprintw (list, "[%c]", status[scroll + choice] ? 'X' : ' ');
- } else {
- if (!status[scroll + choice]) {
- for (i = 0; i < item_no; i++)
- status[i] = 0;
- status[scroll + choice] = 1;
- for (i = 0; i < max_choice; i++)
- print_item (list, items[(scroll + i) * 3 + 1],
- status[scroll + i], i, i == choice);
- }
+ if (flag == FLAG_CHECK) {
+ status[scroll + choice] = !status[scroll + choice];
+ wmove (list, choice, check_x);
+ wattrset (list, check_selected_attr);
+ wprintw (list, "[%c]", status[scroll + choice] ? 'X' : ' ');
+ } else {
+ if (!status[scroll + choice]) {
+ for (i = 0; i < item_no; i++)
+ status[i] = 0;
+ status[scroll + choice] = 1;
+ for (i = 0; i < max_choice; i++)
+ print_item (list, items[(scroll + i) * 3 + 1],
+ status[scroll + i], i, i == choice);
}
- wnoutrefresh (list);
- wrefresh (dialog);
-
- for (i = 0; i < item_no; i++) {
- if (status[i]) {
- if (flag == FLAG_CHECK) {
- fprintf (stderr, "\"%s\" ", items[i * 3]);
- } else {
- fprintf (stderr, "%s", items[i * 3]);
- }
+ }
+ wnoutrefresh (list);
+ wrefresh (dialog);
+ for (i = 0; i < item_no; i++) {
+ if (status[i]) {
+ if (flag == FLAG_CHECK) {
+ fprintf (stderr, "\"%s\" ", items[i * 3]);
+ } else {
+ fprintf (stderr, "%s", items[i * 3]);
}
}
- }
+ }
delwin (dialog);
free (status);
return button;
reply other threads:[~2003-07-11 18:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200307111907.h6BJ7bY19821@mako.theneteffect.com \
--to=mitch@theneteffect.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
--cc=zippel@linux-m68k.org \
/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
all inboxes | Powered by JetHome®