nconfig v5
From: Nir Tzachar <[email protected]>
Quoted 2 lines
Thought I'd give this a try, but compared with V4 this patch looks incomplete. It's missing e.g. the
Makefilechanges.
Sorry. I am not used to git.... Here is the full patch.
Signed-off-by Nir Tzachar <[email protected]>
--- scripts/kconfig/Makefile | 16 +- scripts/kconfig/lkc.h | 2 +- scripts/kconfig/lkc_proto.h | 3 +- scripts/kconfig/mconf.c | 13 - scripts/kconfig/menu.c | 16 +- scripts/kconfig/nconf.c | 1545 +++++++++++++++++++++++++++++++++++ scripts/kconfig/nconf.gui.c | 613 ++++++++++++++ scripts/kconfig/nconf.h | 93 +++ scripts/kconfig/zconf.tab.c_shipped | 2 +- scripts/kconfig/zconf.y | 2 +- 10 files changed, 2285 insertions(+), 20 deletions(-) create mode 100644 scripts/kconfig/nconf.c create mode 100644 scripts/kconfig/nconf.gui.c create mode 100644 scripts/kconfig/nconf.h
scripts/kconfig/Makefile +14 -2
@@ -23,6 +23,9 @@ menuconfig: $(obj)/mconf config: $(obj)/conf $< $(Kconfig) +nconfig: $(obj)/nconf + $< $(Kconfig) + oldconfig: $(obj)/conf $< -o $(Kconfig)
@@ -109,6 +112,7 @@ endif # Help text used by make help help: @echo ' config - Update current config utilising a line-oriented program' + @echo ' nconfig - Update current config utilising a ncurses menu based program' @echo ' menuconfig - Update current config utilising a menu based program' @echo ' xconfig - Update current config utilising a QT based front-end' @echo ' gconfig - Update current config utilising a GTK based front-end'
@@ -136,6 +140,8 @@ HOST_EXTRACFLAGS += -DLOCALE # =========================================================================== # Shared Makefile for the various kconfig executables: # conf: Used for defconfig, oldconfig and related targets +# nconf: Used for the nconfig target. +# Utilizes ncurses # mconf: Used for the menuconfig target # Utilizes the lxdialog package # qconf: Used for the xconfig target
@@ -148,11 +154,16 @@ lxdialog := lxdialog/checklist.o lxdialog/util.o lxdialog/inputbox.o lxdialog += lxdialog/textbox.o lxdialog/yesno.o lxdialog/menubox.o conf-objs := conf.o zconf.tab.o -mconf-objs := mconf.o zconf.tab.o $(lxdialog) +mconf-objs := mconf.o zconf.tab.o $(lxdialog) +nconf-objs := nconf.o zconf.tab.o nconf.gui.o kxgettext-objs := kxgettext.o zconf.tab.o hostprogs-y := conf qconf gconf kxgettext +ifeq ($(MAKECMDGOALS),nconfig) + hostprogs-y += nconf +endif + ifeq ($(MAKECMDGOALS),menuconfig) hostprogs-y += mconf endif
@@ -176,7 +187,7 @@ endif clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \ .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h -clean-files += mconf qconf gconf +clean-files += mconf qconf gconf nconf clean-files += config.pot linux.pot # Check that we have the required ncurses stuff installed for lxdialog (menuconfig)
@@ -201,6 +212,7 @@ HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0` HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \ -D LKC_DIRECT_LINK +HOSTLOADLIBES_nconf = -lmenu -lpanel -lncurses $(obj)/qconf.o: $(obj)/.tmp_qtcheck ifeq ($(qconf-target),1)
scripts/kconfig/lkc.h +1 -1
@@ -84,7 +84,7 @@ void conf_set_all_new_symbols(enum conf_def_mode mode);void kconfig_load (void );/* menu.c */ -void menu_init (void ); +void _menu_init (void );void menu_warn (struct menu *menu,const char *fmt, ...);struct menu *menu_add_menu (void );void menu_end_menu (void );
scripts/kconfig/lkc_proto.h +2 -1
@@ -17,7 +17,8 @@ P(menu_get_root_menu,struct menu *,(struct menu *menu)); P(menu_get_parent_menu,struct menu *,(struct menu *menu)); P(menu_has_help,bool,(struct menu *menu)); P(menu_get_help,const char *,(struct menu *menu)); -P(get_symbol_str,void,(struct gstr *r, struct symbol *sym)); +P(get_symbol_str, void, (struct gstr *r, struct symbol *sym)); +P(get_relations_str, struct gstr, (struct symbol **sym_arr)); P(menu_get_ext_help,void,(struct menu *menu, struct gstr *help));/* symbol.c */
scripts/kconfig/mconf.c +0 -13
@@ -282,19 +282,6 @@ static void show_textbox(const char *title, const char *text, int r, int c);static void show_helptext (const char *title,const char *text);static void show_help (struct menu *menu); -static struct gstr get_relations_str (struct symbol **sym_arr) -{ -struct symbol *sym; -struct gstr res =str_new (); -int i; - -for (i =0 ; sym_arr && (sym = sym_arr[i]); i++) -get_symbol_str (&res, sym); -if (!i) -str_append (&res,_ ("No matches found.\n" )); -return res; -} -static char filename[PATH_MAX +1 ];static void set_config_filename (const char *config_filename) {
scripts/kconfig/menu.c +15 -1
@@ -38,7 +38,7 @@ static void prop_warn(struct property *prop, const char *fmt, ...)va_end (ap); } -void menu_init (void ) +void _menu_init (void ) { current_entry = current_menu = &rootmenu; last_entry_ptr = &rootmenu.list;
@@ -515,6 +515,20 @@ void get_symbol_str(struct gstr *r, struct symbol *sym)str_append (r,"\n\n" ); } +struct gstr get_relations_str (struct symbol **sym_arr) +{ +struct symbol *sym; +struct gstr res =str_new (); +int i; + +for (i =0 ; sym_arr && (sym = sym_arr[i]); i++) +get_symbol_str (&res, sym); +if (!i) +str_append (&res,_ ("No matches found.\n" )); +return res; +} + +void menu_get_ext_help (struct menu *menu,struct gstr *help) {struct symbol *sym = menu->sym;
scripts/kconfig/nconf.c new file +1545 -0
1,545 lines not on this page · raw message
scripts/kconfig/nconf.gui.c new file +613 -0
613 lines not on this page · raw message
scripts/kconfig/nconf.h new file +93 -0
93 lines not on this page · raw message
scripts/kconfig/zconf.tab.c_shipped +1 -1
@@ -2255,7 +2255,7 @@ void conf_parse(const char *name) zconf_initscan(name); sym_init(); - menu_init(); + _menu_init(); modules_sym = sym_lookup(NULL, 0); modules_sym->type = S_BOOLEAN; modules_sym->flags |= SYMBOL_AUTO;
scripts/kconfig/zconf.y +1 -1
@@ -472,7 +472,7 @@ void conf_parse(const char *name) zconf_initscan(name); sym_init(); - menu_init(); + _menu_init(); modules_sym = sym_lookup(NULL, 0); modules_sym->type = S_BOOLEAN; modules_sym->flags |= SYMBOL_AUTO;
Signature · 1 line
1.6.4.4