diff options
author | nir.tzachar@gmail.com <nir.tzachar@gmail.com> | 2009-11-25 05:28:43 -0500 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2010-02-02 08:33:55 -0500 |
commit | 692d97c380c6dce2c35a04c5dcbce4e831a42fa0 (patch) | |
tree | eff5fc88659da67cce720dd643f50137ef5b906a /scripts/kconfig/menu.c | |
parent | c64152bfd0106807c8d3ddbe6d0928e14a64f7bb (diff) |
kconfig: new configuration interface (nconfig)
This patch was inspired by the kernel projects page, where an ncurses
replacement for menuconfig was mentioned (by Sam Ravnborg).
Building on menuconfig, this patch implements a more modern look
interface using ncurses and ncurses' satellite libraries (menu, panel,
form). The implementation does not depend on lxdialog, which is
currently distributed with the kernel.
Signed-off-by: Nir Tzachar <nir.tzachar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/kconfig/menu.c')
-rw-r--r-- | scripts/kconfig/menu.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index 059a2465c574..21bfb3dbc87a 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c | |||
@@ -38,7 +38,7 @@ static void prop_warn(struct property *prop, const char *fmt, ...) | |||
38 | va_end(ap); | 38 | va_end(ap); |
39 | } | 39 | } |
40 | 40 | ||
41 | void menu_init(void) | 41 | void _menu_init(void) |
42 | { | 42 | { |
43 | current_entry = current_menu = &rootmenu; | 43 | current_entry = current_menu = &rootmenu; |
44 | last_entry_ptr = &rootmenu.list; | 44 | last_entry_ptr = &rootmenu.list; |
@@ -515,6 +515,20 @@ void get_symbol_str(struct gstr *r, struct symbol *sym) | |||
515 | str_append(r, "\n\n"); | 515 | str_append(r, "\n\n"); |
516 | } | 516 | } |
517 | 517 | ||
518 | struct gstr get_relations_str(struct symbol **sym_arr) | ||
519 | { | ||
520 | struct symbol *sym; | ||
521 | struct gstr res = str_new(); | ||
522 | int i; | ||
523 | |||
524 | for (i = 0; sym_arr && (sym = sym_arr[i]); i++) | ||
525 | get_symbol_str(&res, sym); | ||
526 | if (!i) | ||
527 | str_append(&res, _("No matches found.\n")); | ||
528 | return res; | ||
529 | } | ||
530 | |||
531 | |||
518 | void menu_get_ext_help(struct menu *menu, struct gstr *help) | 532 | void menu_get_ext_help(struct menu *menu, struct gstr *help) |
519 | { | 533 | { |
520 | struct symbol *sym = menu->sym; | 534 | struct symbol *sym = menu->sym; |