From: Bjorn Helgaas <bjorn.helgaas@hp.com>

This patch fixes menuconfig so it can display help text for individual
choice group config entries.

Previously it would only display the help text attached to the "choice"
item.  There was no way to display the help attached to individual config
entries inside the choice group.  Typically, the "choice" item has no help
text, and all the useful help is attached to the individual entries, so
this was a bit of a problem.



---

 25-akpm/scripts/kconfig/mconf.c      |    4 +++-
 25-akpm/scripts/lxdialog/checklist.c |    9 ++++++++-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff -puN scripts/kconfig/mconf.c~menuconfig-choice-display-fix scripts/kconfig/mconf.c
--- 25/scripts/kconfig/mconf.c~menuconfig-choice-display-fix	Tue Jan 27 15:58:10 2004
+++ 25-akpm/scripts/kconfig/mconf.c	Tue Jan 27 15:58:10 2004
@@ -635,7 +635,9 @@ static void conf_choice(struct menu *men
 			sym_set_tristate_value(menu->sym, yes);
 			return;
 		case 1:
-			show_help(menu);
+			if (sscanf(input_buf, "%p", &child) != 1)
+				break;
+			show_help(child);
 			break;
 		case 255:
 			return;
diff -puN scripts/lxdialog/checklist.c~menuconfig-choice-display-fix scripts/lxdialog/checklist.c
--- 25/scripts/lxdialog/checklist.c~menuconfig-choice-display-fix	Tue Jan 27 15:58:10 2004
+++ 25-akpm/scripts/lxdialog/checklist.c	Tue Jan 27 15:58:10 2004
@@ -303,6 +303,9 @@ dialog_checklist (const char *title, con
 	case 'h':
 	case '?':
 	    delwin (dialog);
+	    fprintf(stderr, "%s \"%s\"\n",
+		    items[(scroll + choice) * 3],
+		    items[(scroll + choice) * 3 + 1]);
 	    free (status);
 	    return 1;
 	case TAB:
@@ -318,7 +321,11 @@ dialog_checklist (const char *title, con
 	case 's':
 	case ' ':
 	case '\n':
-	    if (!button) {
+	    if (button)
+		    fprintf(stderr, "%s \"%s\"\n",
+			    items[(scroll + choice) * 3],
+			    items[(scroll + choice) * 3 + 1]);
+	    else {
 		if (flag == FLAG_CHECK) {
 		    status[scroll + choice] = !status[scroll + choice];
 		    wmove (list, choice, check_x);

_