kconfig: help includes dependency information

From: Sam Ravnborg
Date: Thu Dec 30 2004 - 18:58:49 EST


# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/12/31 00:43:45+01:00 sam@xxxxxxxxxxxxxxxxx
# kconfig: help includes dependency information
#
# When selecting help on a menu item display
# "depends on:"
# "selects:"
# "selected by:"
#
# Only relevant headlines are displayed - so if no "selects:" appear then this menu
# does not select a specific symbol.
# Loosly based on a patch by: Cal Peake <cp@xxxxxxxxxxxxxxxxxxx>
#
# Signed-off-by: Sam Ravnborg <sam@xxxxxxxxxxxx>
#
# scripts/kconfig/mconf.c
# 2004/12/31 00:43:27+01:00 sam@xxxxxxxxxxxxxxxxx +5 -5
# display
# "depends on:"
# "selects:"
# "selected by:"
#
# information when selecting help on a menu
#
diff -Nru a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
--- a/scripts/kconfig/mconf.c 2004-12-31 00:46:29 +01:00
+++ b/scripts/kconfig/mconf.c 2004-12-31 00:46:29 +01:00
@@ -732,17 +732,17 @@
static void show_help(struct menu *menu)
{
const char *help;
- char *helptext;
struct symbol *sym = menu->sym;

help = sym->help;
if (!help)
help = nohelp_text;
if (sym->name) {
- helptext = malloc(strlen(sym->name) + strlen(help) + 16);
- sprintf(helptext, "CONFIG_%s:\n\n%s", sym->name, help);
- show_helptext(menu_get_prompt(menu), helptext);
- free(helptext);
+ struct gstr str = str_init();
+ str_printf(&str, "CONFIG_%s:\n\n%s", sym->name, help);
+ show_expr(menu, &str);
+ show_helptext(menu_get_prompt(menu), str_get(&str));
+ str_del(&str);
} else
show_helptext(menu_get_prompt(menu), help);
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/