ncurses based config
PATCH 1/1 ncurses based config
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.
The only change outside of nconf.c is due to a name clash: both ncurses and lkc.h define a fucntion named menu_init(). I changed the internal version's name.
Please consider the patch for merging. Comments are appreciated.
--- scripts/kconfig/Makefile | 16 +- scripts/kconfig/lkc.h | 2 +- scripts/kconfig/mconf.c | 2 + scripts/kconfig/menu.c | 2 +- scripts/kconfig/nconf.c | 1852 ++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 1871 insertions(+), 3 deletions(-) create mode 100644 scripts/kconfig/nconf.c
scripts/kconfig/Makefile +15 -1
@@ -15,6 +15,9 @@ gconfig: $(obj)/gconf menuconfig: $(obj)/mconf $< $(Kconfig) +nconfig: $(obj)/nconf + $< $(Kconfig) + config: $(obj)/conf $< $(Kconfig)
@@ -102,6 +105,8 @@ HOST_EXTRACFLAGS += -DLOCALE # conf: Used for defconfig, oldconfig and related targets # mconf: Used for the mconfig target. # Utilizes the lxdialog package +# nconf: Used for the nconfig target. +# Utilizes ncurses # qconf: Used for the xconfig target # Based on QT which needs to be installed to compile it # gconf: Used for the gconfig target
@@ -113,6 +118,7 @@ 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) +nconf-objs := nconf.o zconf.tab.o kxgettext-objs := kxgettext.o zconf.tab.o hostprogs-y := conf qconf gconf kxgettext
@@ -121,6 +127,10 @@ ifeq ($(MAKECMDGOALS),menuconfig) hostprogs-y += mconf endif +ifeq ($(MAKECMDGOALS),nconfig) + hostprogs-y += nconf +endif + ifeq ($(MAKECMDGOALS),xconfig) qconf-target := 1 endif
@@ -140,7 +150,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)
@@ -158,6 +168,10 @@ HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) HOSTCFLAGS_lex.zconf.o := -I$(src) HOSTCFLAGS_zconf.tab.o := -I$(src) +HOSTLOADLIBES_nconf = -lmenu -lpanel -lform -lncurses +HOSTCFLAGS_nconf.o = +LDFLAGS_nconf.o = + HOSTLOADLIBES_qconf = $(KC_QT_LIBS) -ldl HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS) -D LKC_DIRECT_LINK
scripts/kconfig/lkc.h +1 -1
@@ -83,7 +83,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/mconf.c +2 -0
@@ -6,6 +6,8 @@* 2002-11-06 Petr Baudis <[email protected]> * * i18n, 2005, Arnaldo Carvalho de Melo <[email protected]> +* +* ncurses interface, 2008, Nir Tzachar <[email protected]> */ #include <ctype.h>
scripts/kconfig/menu.c +1 -1
@@ -35,7 +35,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;
scripts/kconfig/nconf.c new file +1852 -0
1,852 lines not on this page · raw message
Signature · 1 line
1.5.6.4
Hi,
Quoted 7 lines · Nir Tzachar
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.
Quoted 5 lines
The only change outside of
nconf.cis due to a name clash: both ncurses andlkc.hdefine a fucntion namedmenu_init(). I changed the internal version's name.Please consider the patch for merging. Comments are appreciated.
Could you please tell what kernel version is it against?
I'm getting the following error on make nconfig (and also on make menuconfig which works fine without this patch) with the current Linus' tree:
HOSTCC scripts/kconfig/conf.o HOSTCC scripts/kconfig/kxgettext.o HOSTCC scripts/kconfig/nconf.o HOSTCC scripts/kconfig/zconf.tab.o
scripts/kconfig/zconf.tab.c: In function ‘conf_parse’:scripts/kconfig/zconf.tab.c:2258: warning: implicit declaration of function ‘menu_init’
HOSTLD scripts/kconfig/nconfscripts/kconfig/nconf arch/x86/Kconfig
make[1]: *** [nconfig] Segmentation fault
make: *** [nconfig] Error 2
Quoted 11 lines · Bartlomiej Zolnierkiewicz
Hi,
Quoted 7 lines · Nir Tzachar
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.
Quoted 7 lines
Quoted 5 lines
The only change outside of
nconf.cis due to a name clash: both ncurses andlkc.hdefine a fucntion namedmenu_init(). I changed the internal version's name.Please consider the patch for merging. Comments are appreciated.
Could you please tell what kernel version is it against?
It applies cleanly to 2.6.27-rc5-git4 FWIW.
Quoted 7 lines
I'm getting the following error on make nconfig (and also on make menuconfig which works fine without this patch) with the current Linus' tree:
HOSTCC scripts/kconfig/conf.o HOSTCC scripts/kconfig/kxgettext.o HOSTCC scripts/kconfig/nconf.o HOSTCC scripts/kconfig/zconf.tab.o
Quoted 6 lines
scripts/kconfig/zconf.tab.c: In function ÿÿconf_parseÿÿ:scripts/kconfig/zconf.tab.c:2258: warning: implicit declaration of function ÿÿmenu_initÿÿ
HOSTLDscripts/kconfig/nconfscripts/kconfig/nconfarch/x86/Kconfig
make[1]: *** [nconfig] Segmentation fault
make: *** [nconfig] Error 2
Need to change all /menu_init/ in zconf.tab.c* to /_menu_init/.
Need to strip trailing whitespace on new source code lines.
I'm seeing cyan (?) foreground on black background. Is that the colors that were planned?
Instructions are dark blue on black -- cannot read them.
Signature · 1 line
~Randy
Quoted 37 lines · Randy.Dunlap
Quoted 11 lines · Bartlomiej Zolnierkiewicz
Hi,
Quoted 7 lines · Nir Tzachar
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.
Quoted 7 lines
Quoted 5 lines
The only change outside of
nconf.cis due to a name clash: both ncurses andlkc.hdefine a fucntion namedmenu_init(). I changed the internal version's name.Please consider the patch for merging. Comments are appreciated.
Could you please tell what kernel version is it against?
It applies cleanly to 2.6.27-rc5-git4 FWIW.
Quoted 7 lines
I'm getting the following error on make nconfig (and also on make menuconfig which works fine without this patch) with the current Linus' tree:
HOSTCC scripts/kconfig/conf.o HOSTCC scripts/kconfig/kxgettext.o HOSTCC scripts/kconfig/nconf.o HOSTCC scripts/kconfig/zconf.tab.oQuoted 6 lines
scripts/kconfig/zconf.tab.c: In function ÿÿconf_parseÿÿ:scripts/kconfig/zconf.tab.c:2258: warning: implicit declaration of function ÿÿmenu_initÿÿ
HOSTLDscripts/kconfig/nconfscripts/kconfig/nconfarch/x86/Kconfig
make[1]: *** [nconfig] Segmentation fault
make: *** [nconfig] Error 2
Quoted 8 lines
Need to change all /menu_init/ in zconf.tab.c* to /_menu_init/.
Need to strip trailing whitespace on new source code lines.
I'm seeing cyan (?) foreground on black background. Is that the colors that were planned?
Instructions are dark blue on black -- cannot read them.
"make help" needs to have "nconfig" added to it.
Signature · 1 line
~Randy
Quoted 37 lines · Randy.Dunlap
Quoted 11 lines · Bartlomiej Zolnierkiewicz
Hi,
Quoted 7 lines · Nir Tzachar
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.
Quoted 7 lines
Quoted 5 lines
The only change outside of
nconf.cis due to a name clash: both ncurses andlkc.hdefine a fucntion namedmenu_init(). I changed the internal version's name.Please consider the patch for merging. Comments are appreciated.
Could you please tell what kernel version is it against?
It applies cleanly to 2.6.27-rc5-git4 FWIW.
Quoted 7 lines
I'm getting the following error on make nconfig (and also on make menuconfig which works fine without this patch) with the current Linus' tree:
HOSTCC scripts/kconfig/conf.o HOSTCC scripts/kconfig/kxgettext.o HOSTCC scripts/kconfig/nconf.o HOSTCC scripts/kconfig/zconf.tab.oQuoted 6 lines
scripts/kconfig/zconf.tab.c: In function ÿÿconf_parseÿÿ:scripts/kconfig/zconf.tab.c:2258: warning: implicit declaration of function ÿÿmenu_initÿÿ
HOSTLDscripts/kconfig/nconfscripts/kconfig/nconfarch/x86/Kconfig
make[1]: *** [nconfig] Segmentation fault
make: *** [nconfig] Error 2
Quoted 1 line
Need to change all /menu_init/ in zconf.tab.c* to /_menu_init/.
Thanks, this fixed it.
Quoted 6 lines
Need to strip trailing whitespace on new source code lines.
I'm seeing cyan (?) foreground on black background. Is that the colors that were planned?
Instructions are dark blue on black -- cannot read them.
Yeah. Additionally the main window for selecting options is limited to ~40 characters x 5 lines. Is this intended?
Also it seems that hotkeys are not highlighted/working... :(
Thanks,
Bart
Quoted 37 lines · El Wed, 3 Sep 2008 13:02:42 -0700 (PDT) "Randy.Dunlap" <[email protected]>…
Quoted 11 lines · Bartlomiej Zolnierkiewicz
Hi,
Quoted 7 lines · Nir Tzachar
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.
Quoted 7 lines
Quoted 5 lines
The only change outside of
nconf.cis due to a name clash: both ncurses andlkc.hdefine a fucntion namedmenu_init(). I changed the internal version's name.Please consider the patch for merging. Comments are appreciated.
Could you please tell what kernel version is it against?
It applies cleanly to 2.6.27-rc5-git4 FWIW.
Quoted 7 lines
I'm getting the following error on make nconfig (and also on make menuconfig which works fine without this patch) with the current Linus' tree:
HOSTCC scripts/kconfig/conf.o HOSTCC scripts/kconfig/kxgettext.o HOSTCC scripts/kconfig/nconf.o HOSTCC scripts/kconfig/zconf.tab.oQuoted 6 lines
scripts/kconfig/zconf.tab.c: In function ÿÿconf_parseÿÿ:scripts/kconfig/zconf.tab.c:2258: warning: implicit declaration of function ÿÿmenu_initÿÿ
HOSTLDscripts/kconfig/nconfscripts/kconfig/nconfarch/x86/Kconfig
make[1]: *** [nconfig] Segmentation fault
make: *** [nconfig] Error 2
Quoted 1 line
Need to change all /menu_init/ in zconf.tab.c* to /_menu_init/.
Tried it
Quoted 5 lines
Need to strip trailing whitespace on new source code lines.
I'm seeing cyan (?) foreground on black background. Is that the colors that were planned?
much nicer colors here (ubuntu)
http://img177.imageshack.us/my.php?image=pantallazonm7.png
Quoted 3 lines
Instructions are dark blue on black -- cannot read them.
On Wednesday 03 September 2008, Alejandro Riveira Fernández wrote:
[...]
Quoted 5 lines
Quoted 2 lines
I'm seeing cyan (?) foreground on black background. Is that the colors that were planned?
much nicer colors here (ubuntu)
http://img177.imageshack.us/my.php?image=pantallazonm7.png
Update: under Fedora9 with default settings:
- X + xterm: colors are OK
- X + konsole: colors are not OK
- console (on vesafb): colors are OK except that frames are "invisible"
Seems like there are some compatibility issues to be resolved...
Thanks,
Bart
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 23 lines · Nir Tzachar
Good morning.
Sorry for the delay, it was night here...
Quoted 19 lines
Hi,
Quoted 6 lines · Nir Tzachar
Quoted 4 lines
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
Quoted 1 line
Quoted 1 line
ncurses and ncurses' satellite libraries (menu, panel, form). The
implementation
Quoted 1 line
Quoted 1 line
does not depend on lxdialog, which is currently distributed with the
kernel.
Quoted 2 lines
Quoted 2 lines
The only change outside of
nconf.cis due to a name clash: both ncursesand
Quoted 1 line
Quoted 1 line
lkc.hdefine a fucntion namedmenu_init(). I changed the internalversion's
Quoted 2 lines
Quoted 2 lines
name.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Please consider the patch for merging. Comments are appreciated.
Could you please tell what kernel version is it against?
It applies cleanly to 2.6.27-rc5-git4 FWIW.
I based the patch on current git tree. Is a more stable version preferable?
No, that's fine.
Quoted 17 lines
Quoted 17 lines
Quoted 2 lines
I'm getting the following error on make nconfig (and also on make
menuconfig
Quoted 8 lines
which works fine without this patch) with the current Linus' tree:
HOSTCC scripts/kconfig/conf.o HOSTCC scripts/kconfig/kxgettext.o HOSTCC scripts/kconfig/nconf.o HOSTCC scripts/kconfig/zconf.tab.o
scripts/kconfig/zconf.tab.c: In function ÿÿconf_parseÿÿ:scripts/kconfig/zconf.tab.c:2258: warning: implicit declaration offunction ÿÿmenu_initÿÿ
Quoted 4 lines
HOSTLD
scripts/kconfig/nconfscripts/kconfig/nconfarch/x86/Kconfig
make[1]: *** [nconfig] Segmentation fault
make: *** [nconfig] Error 2
Quoted 4 lines
Quoted 2 lines
Need to change all /menu_init/ in zconf.tab.c* to /_menu_init/.
I believe the patch does change these lines.
Perhaps the patch was missing some pieces then. It does not contain any changes to the zconf* files.
Quoted 6 lines
Quoted 3 lines
Need to strip trailing whitespace on new source code lines.
scripts/checkpatch.pldid not report anything here. Maybe git-email-send messed up the patch??
Too bad.
quilt reported several of those when I applied the patch. AFAIK, git also will report that.
These lines have trailing spaces:
57:+nconf-objs := nconf.o zconf.tab.o 85:+HOSTLOADLIBES_nconf = -lmenu -lpanel -lform -lncurses 86:+HOSTCFLAGS_nconf.o =
87:+LDFLAGS_nconf.o =
Quoted 9 lines
Quoted 6 lines
I'm seeing cyan (?) foreground on black background. Is that the colors that were planned?
Instructions are dark blue on black -- cannot read them.
Well, colors were never my strong point ;) If someone can come up with a better color scheme I'll be more than happy to change.
Signature · 1 line
~Randy
Hi
Quoted 7 lines
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.
Quoted 5 lines
The only change outside of
nconf.cis due to a name clash: both ncurses andlkc.hdefine a fucntion namedmenu_init(). I changed the internal version's name.Please consider the patch for merging. Comments are appreciated.
if I run "make nconfig" on GNU screen, I can't see cursor position. is this intensional?
Quoted 7 lines · El Wed, 3 Sep 2008 22:11:16 +0300 "Nir Tzachar" <[email protected]>…
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.
Quoted 5 lines
The only change outside of
nconf.cis due to a name clash: both ncurses andlkc.hdefine a fucntion namedmenu_init(). I changed the internal version's name.Please consider the patch for merging. Comments are appreciated.
i apliedd your patches and the fixlet pointed out by Randy rebased on todays git and the menu crashes when i select help on Kernel Hacking>Spinlock and rw-...
is a Segmentation fault
Quoted 10 lines
--- scripts/kconfig/Makefile | 16 +- scripts/kconfig/lkc.h | 2 +- scripts/kconfig/mconf.c | 2 + scripts/kconfig/menu.c | 2 +- scripts/kconfig/nconf.c | 1852 ++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 1871 insertions(+), 3 deletions(-) create mode 100644 scripts/kconfig/nconf.c
PATCH 1/1 ncurses based config V2
In reply to Nir TzacharChanges:
1) Fixed segfaults in help window.
2) Removed the instructions window, made the instructions appear as a button which displays a popup window.
3) Added hot keys support. As ncurses does not support several colors inside a menu, keys are highlighted using "()".
4) Optimized for 80x24 terminals.
6) Fixed zconf.y to use _menu_init
7) added nconfig to "make help"
8) Misc fixes.
Comments are appreciated.
Cheers.
--- scripts/kconfig/Makefile | 17 +- scripts/kconfig/lkc.h | 2 +- scripts/kconfig/mconf.c | 2 + scripts/kconfig/menu.c | 2 +- scripts/kconfig/nconf.c | 2019 +++++++++++++++++++++++++++++++++++ scripts/kconfig/zconf.tab.c_shipped | 2 +- scripts/kconfig/zconf.y | 2 +- 7 files changed, 2041 insertions(+), 5 deletions(-) create mode 100644 scripts/kconfig/nconf.c
scripts/kconfig/Makefile +16 -1
@@ -15,6 +15,9 @@ gconfig: $(obj)/gconf menuconfig: $(obj)/mconf $< $(Kconfig) +nconfig: $(obj)/nconf + $< $(Kconfig) + config: $(obj)/conf $< $(Kconfig)
@@ -75,6 +78,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'
@@ -102,6 +106,8 @@ HOST_EXTRACFLAGS += -DLOCALE # conf: Used for defconfig, oldconfig and related targets # mconf: Used for the mconfig target. # Utilizes the lxdialog package +# nconf: Used for the nconfig target. +# Utilizes ncurses # qconf: Used for the xconfig target # Based on QT which needs to be installed to compile it # gconf: Used for the gconfig target
@@ -113,6 +119,7 @@ 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) +nconf-objs := nconf.o zconf.tab.o kxgettext-objs := kxgettext.o zconf.tab.o hostprogs-y := conf qconf gconf kxgettext
@@ -121,6 +128,10 @@ ifeq ($(MAKECMDGOALS),menuconfig) hostprogs-y += mconf endif +ifeq ($(MAKECMDGOALS),nconfig) + hostprogs-y += nconf +endif + ifeq ($(MAKECMDGOALS),xconfig) qconf-target := 1 endif
@@ -140,7 +151,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)
@@ -158,6 +169,10 @@ HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) HOSTCFLAGS_lex.zconf.o := -I$(src) HOSTCFLAGS_zconf.tab.o := -I$(src) +HOSTLOADLIBES_nconf = -lmenu -lpanel -lform -lncurses +HOSTCFLAGS_nconf.o = +LDFLAGS_nconf.o = + HOSTLOADLIBES_qconf = $(KC_QT_LIBS) -ldl HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS) -D LKC_DIRECT_LINK
scripts/kconfig/lkc.h +1 -1
@@ -83,7 +83,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/mconf.c +2 -0
@@ -6,6 +6,8 @@* 2002-11-06 Petr Baudis <[email protected]> * * i18n, 2005, Arnaldo Carvalho de Melo <[email protected]> +* +* ncurses interface, 2008, Nir Tzachar <[email protected]> */ #include <ctype.h>
scripts/kconfig/menu.c +1 -1
@@ -35,7 +35,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;
scripts/kconfig/nconf.c new file +2019 -0
2,019 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.5.6.4
Re: [PATCH] ncurses based config V2
Quoted 13 lines · El Fri, 5 Sep 2008 11:27:00 +0300 "Nir Tzachar" <[email protected]>…
Changes:
1) Fixed segfaults in help window.
2) Removed the instructions window, made the instructions appear as a button which displays a popup window.
3) Added hot keys support. As ncurses does not support several colors inside a menu, keys are highlighted using "()".
4) Optimized for 80x24 terminals.
6) Fixed zconf.y to use_menu_init
7) added nconfig to "make help"
8) Misc fixes.Comments are appreciated. Cheers.
Quoted 10 lines
--- scripts/kconfig/Makefile | 17 +- scripts/kconfig/lkc.h | 2 +- scripts/kconfig/mconf.c | 2 + scripts/kconfig/menu.c | 2 +- scripts/kconfig/nconf.c | 2019 +++++++++++++++++++++++++++++++++++ scripts/kconfig/zconf.tab.c_shipped | 2 +- scripts/kconfig/zconf.y | 2 +- 7 files changed, 2041 insertions(+), 5 deletions(-) create mode 100644 scripts/kconfig/nconf.c
Tried it and the segmentation fault disappeared
Quoted 1 line
Re: [PATCH] ncurses based config V2
In reply to Nir TzacharHello,
Quoted 11 lines · Nir Tzachar
Changes:
1) Fixed segfaults in help window.
2) Removed the instructions window, made the instructions appear as a button which displays a popup window.
3) Added hot keys support. As ncurses does not support several colors inside a menu, keys are highlighted using "()".
4) Optimized for 80x24 terminals.
6) Fixed zconf.y to use_menu_init
7) added nconfig to "make help"
8) Misc fixes.
Quoted 1 line
Comments are appreciated.
OK, I've just tried it. Here are the first comments I can make :
- colors are too dark. Cyan on black is barely readable, red on black is almost unreadable and blue on black is not readable at all, I have to switch off the light to read it. Most often you'll see light shades of grey (even white) in interfaces because it's hard to see dark shades, and bright flashy letters would dazzle and be seen as fuzzy. Many colors are perfectly readable on while or even light grey (except yellow and sometimes cyan). Blue backgrounds were often used under DOS and were OK with almost all colors except red (well-known eye focus problem). But there was a trick, pixels were very large in 640x200, nowaydays we have small pixels and letters are not much readable anymore on blue backgrounds. For your tests, you can try to load
xterm -bg <color> -fg <color> and ensure that you're using a medium font (tickness of 1-pixel).
- pressing arrows too fast regularly escapes (probably because of the ESC prefix, I don't know). This is rather strange, because no other application does this to me. Is there a specific initialization sequence with ncurses to state that arrows should return special codes instead of the ESC prefix ? (I have no idea)
- entering text in boxes (eg: local version) does not move the cursor, it remains at the beginning of the line. If I press any arrow, the box immediately closes (most likely the Esc prefix again).
- in the input boxes, spaces are missing aroung the title, which touches the frame (eg: Local version again).
- in "instructions", it's not explained how to leave that box. I found both Enter and Esc to work, but a last line with a small message would be better.
- I noticed I was tempted a lot to press "?" to get help, but the key is not bound. It would be nice to have it bound to Help since make oldconfig and menuconfig to both report help that way.
- I'm not convinced that the parenthesis around hotkeys make the menu that much readable, especially when there are lots of short words or even acronyms. Eg :
[ ] (U)TS namespace
[ ] (I)PC namespace
[ ] (U)ser namespace (EXPERIMENTAL)
[ ] (P)ID Namespaces (EXPERIMENTAL)
I don't know if there is something such as a bold attribute in ncurses, it would make sense to use it IMHO because you don't force a color on people's terms, you rely on the style which works well for them.
I'm sorry I don't go further for now, the arrows causing frequent exits is too bothersome, I've started it about 30 times just for this report, it's too hard to navigate. I hope that the points above are already helpful.
Regards,
Willy
Re: [PATCH] ncurses based config V2
Hello.
Quoted 18 lines · Willy Tarreau
Hello,
Quoted 11 lines · Nir Tzachar
Changes:
1) Fixed segfaults in help window.
2) Removed the instructions window, made the instructions appear as a button which displays a popup window.
3) Added hot keys support. As ncurses does not support several colors inside a menu, keys are highlighted using "()".
4) Optimized for 80x24 terminals.
6) Fixed zconf.y to use_menu_init
7) added nconfig to "make help"
8) Misc fixes.Quoted 1 line
Comments are appreciated.
OK, I've just tried it. Here are the first comments I can make :
Quoted 13 lines
- colors are too dark. Cyan on black is barely readable, red on black is almost unreadable and blue on black is not readable at all, I have to switch off the light to read it. Most often you'll see light shades of grey (even white) in interfaces because it's hard to see dark shades, and bright flashy letters would dazzle and be seen as fuzzy. Many colors are perfectly readable on while or even light grey (except yellow and sometimes cyan). Blue backgrounds were often used under DOS and were OK with almost all colors except red (well-known eye focus problem). But there was a trick, pixels were very large in 640x200, nowaydays we have small pixels and letters are not much readable anymore on blue backgrounds. For your tests, you can try to load
xterm -bg <color> -fg <color> and ensure that you're using a medium font (tickness of 1-pixel).
The thing with colors is that they are very personal... The colors I have work great on my terminals. I don't think I can come up with one scheme which looks nice to everybody, hence the support for color schemes. If you can come up with a color scheme which works gr8 for you, I'll be happy to add it. If you are interested, check the INIT_PAIR macros of the patch.
Quoted 3 lines
- pressing arrows too fast regularly escapes (probably because of the ESC prefix, I don't know). This is rather strange, because no other application does this to me.
I cannot reproduce this. What terminal emulator are you using, and which ncurses version? Also, can you please send me the terminal emulator config file?
Quoted 3 lines
Is there a specific initialization
sequence with ncurses to state that arrows should return special codes instead of the ESC prefix ? (I have no idea)
Yes. You need to specify you want to get keypad events, otherwise they just appear as ESC.
Quoted 3 lines
- entering text in boxes (eg: local version) does not move the cursor, it remains at the beginning of the line. If I press any arrow, the box immediately closes (most likely the Esc prefix again).
Fixed.
Quoted 2 lines
- in the input boxes, spaces are missing aroung the title, which touches the frame (eg: Local version again).
Fixed.
Quoted 3 lines
- in "instructions", it's not explained how to leave that box. I found both Enter and Esc to work, but a last line with a small message would be better.
Done.
Quoted 3 lines
- I noticed I was tempted a lot to press "?" to get help, but the key is not bound. It would be nice to have it bound to Help since make oldconfig and menuconfig to both report help that way.
It was supposed to work, I mistyped '?' with ':' . Fixed.
Quoted 7 lines
- I'm not convinced that the parenthesis around hotkeys make the menu that much readable, especially when there are lots of short words or even acronyms. Eg :
[ ] (U)TS namespace [ ] (I)PC namespace [ ] (U)ser namespace (EXPERIMENTAL) [ ] (P)ID Namespaces (EXPERIMENTAL)
I agree, but could not come up with any other visible mark to note the hotkey.
Quoted 3 lines
I don't know if there is something such as a bold attribute in ncurses, it would make sense to use it IMHO because you don't force a color on people's terms, you rely on the style which works well for them.
There is a bold attribute, but you cannot set it for a single letter of a menu item, as far as I know.
Quoted 3 lines
I'm sorry I don't go further for now, the arrows causing frequent exits is too bothersome, I've started it about 30 times just for this report, it's too hard to navigate. I hope that the points above are already helpful.
Thanks for the input. I would really like to solve the issue you have with arrow keys. Can you also send a trace of key presses which cause you to exit, and which window is active?
Cheers.
Re: [PATCH] ncurses based config V2
Hello,
sorry, it seems I missed this mail.
Quoted 35 lines · Nir Tzachar
Hello.
Quoted 18 lines · Willy Tarreau
Hello,
Quoted 11 lines · Nir Tzachar
Changes:
1) Fixed segfaults in help window.
2) Removed the instructions window, made the instructions appear as a button which displays a popup window.
3) Added hot keys support. As ncurses does not support several colors inside a menu, keys are highlighted using "()".
4) Optimized for 80x24 terminals.
6) Fixed zconf.y to use_menu_init
7) added nconfig to "make help"
8) Misc fixes.Quoted 1 line
Comments are appreciated.
OK, I've just tried it. Here are the first comments I can make :
Quoted 13 lines
- colors are too dark. Cyan on black is barely readable, red on black is almost unreadable and blue on black is not readable at all, I have to switch off the light to read it. Most often you'll see light shades of grey (even white) in interfaces because it's hard to see dark shades, and bright flashy letters would dazzle and be seen as fuzzy. Many colors are perfectly readable on while or even light grey (except yellow and sometimes cyan). Blue backgrounds were often used under DOS and were OK with almost all colors except red (well-known eye focus problem). But there was a trick, pixels were very large in 640x200, nowaydays we have small pixels and letters are not much readable anymore on blue backgrounds. For your tests, you can try to load
xterm -bg <color> -fg <color> and ensure that you're using a medium font (tickness of 1-pixel).
Quoted 1 line
The thing with colors is that they are very personal...
"personal" is true when it comes from a matter of taste. Here it's a matter of readability.
Quoted 4 lines
The colors I
have work great on my terminals. I don't think I can come up with one scheme which looks nice to everybody, hence the support for color schemes.
I understand. I think that the original colors of make menuconfig are OK and readable everywhere.
Quoted 3 lines
If you can come up with a color scheme which works gr8 for you, I'll be happy to add it. If you are interested, check the
INIT_PAIRmacros of the patch.
OK I might do (I just don't have time right now).
Quoted 6 lines
Quoted 3 lines
- pressing arrows too fast regularly escapes (probably because of the ESC prefix, I don't know). This is rather strange, because no other application does this to me.
I cannot reproduce this. What terminal emulator are you using, and which ncurses version?
I've just checked, ncurses-5.3. I also ensured that it's the same I use with all my other progs (including mutt, vim, emacs, alsamixer, less, gnuplot, kismet, lynx, ...). It is possible that there is something very subtle, but I can't imagine what :-/
Quoted 1 line
Also, can you please send me the terminal emulator config file?
It's just a bare xterm running with TERM=xterm-color. I forgot to test on the console.
Quoted 6 lines
Quoted 3 lines
Is there a specific initialization
sequence with ncurses to state that arrows should return special codes instead of the ESC prefix ? (I have no idea)Yes. You need to specify you want to get keypad events, otherwise they just appear as ESC.
OK. I just found there is the ESCDELAY variable to define the ESC timeout. They also talk about notimeout() in curs_inopts(3), which sounds pretty well related to what I observe.
[skipping all fixed reports]
Quoted 8 lines
Quoted 7 lines
- I'm not convinced that the parenthesis around hotkeys make the menu that much readable, especially when there are lots of short words or even acronyms. Eg :
[ ] (U)TS namespace [ ] (I)PC namespace [ ] (U)ser namespace (EXPERIMENTAL) [ ] (P)ID Namespaces (EXPERIMENTAL)
Quoted 8 lines
I agree, but could not come up with any other visible mark to note the hotkey.
Quoted 3 lines
I don't know if there is something such as a bold attribute in ncurses, it would make sense to use it IMHO because you don't force a color on people's terms, you rely on the style which works well for them.
There is a bold attribute, but you cannot set it for a single letter of a menu item, as far as I know.
OK I understand. You might want to use the brighter color set (as menuconfig does). Terminals sometimes translate them to bold characters.
Quoted 7 lines
Quoted 3 lines
I'm sorry I don't go further for now, the arrows causing frequent exits is too bothersome, I've started it about 30 times just for this report, it's too hard to navigate. I hope that the points above are already helpful.
Thanks for the input. I would really like to solve the issue you have with arrow keys. Can you also send a trace of key presses which cause you to exit, and which window is active?
Sorry, the directory in which I built has been removed since. But it happened in any window, starting with the main menu. That's why I think it's just an initialization issue.
Regards,
Willy
Re: [PATCH] ncurses based config V2
Hi.
Quoted 44 lines · Willy Tarreau
Hello,
sorry, it seems I missed this mail.
Quoted 35 lines · Nir Tzachar
Hello.
Quoted 18 lines · Willy Tarreau
Hello,
Quoted 11 lines · Nir Tzachar
Changes:
1) Fixed segfaults in help window.
2) Removed the instructions window, made the instructions appear as a button which displays a popup window.
3) Added hot keys support. As ncurses does not support several colors inside a menu, keys are highlighted using "()".
4) Optimized for 80x24 terminals.
6) Fixed zconf.y to use_menu_init
7) added nconfig to "make help"
8) Misc fixes.Quoted 1 line
Comments are appreciated.
OK, I've just tried it. Here are the first comments I can make :
Quoted 13 lines
- colors are too dark. Cyan on black is barely readable, red on black is almost unreadable and blue on black is not readable at all, I have to switch off the light to read it. Most often you'll see light shades of grey (even white) in interfaces because it's hard to see dark shades, and bright flashy letters would dazzle and be seen as fuzzy. Many colors are perfectly readable on while or even light grey (except yellow and sometimes cyan). Blue backgrounds were often used under DOS and were OK with almost all colors except red (well-known eye focus problem). But there was a trick, pixels were very large in 640x200, nowaydays we have small pixels and letters are not much readable anymore on blue backgrounds. For your tests, you can try to load
xterm -bg <color> -fg <color> and ensure that you're using a medium font (tickness of 1-pixel).Quoted 1 line
The thing with colors is that they are very personal...
"personal" is true when it comes from a matter of taste. Here it's a matter of readability.
Quoted 7 lines
Quoted 4 lines
The colors I
have work great on my terminals. I don't think I can come up with one scheme which looks nice to everybody, hence the support for color schemes.I understand. I think that the original colors of make menuconfig are OK and readable everywhere.
But they give it a very archaic look. We should come up with something better.
Quoted 5 lines
Quoted 3 lines
If you can come up with a color scheme which works gr8 for you, I'll be happy to add it. If you are interested, check the
INIT_PAIRmacros of the patch.OK I might do (I just don't have time right now).
That would be gr8.
Quoted 11 lines
Quoted 6 lines
Quoted 3 lines
- pressing arrows too fast regularly escapes (probably because of the ESC prefix, I don't know). This is rather strange, because no other application does this to me.
I cannot reproduce this. What terminal emulator are you using, and which ncurses version?
I've just checked, ncurses-5.3. I also ensured that it's the same I use with all my other progs (including mutt, vim, emacs, alsamixer, less, gnuplot, kismet, lynx, ...). It is possible that there is something very subtle, but I can't imagine what :-/
I can't reproduce this. I tried with ncurses 5.3 and a clean xterm, and it works ok. Try to
$> export TERM=vt100 before and tell me if this helps. In any way, can you please send me your termcap file? I'm grabbing at straws here...
Quoted 9 lines
Quoted 1 line
Also, can you please send me the terminal emulator config file?
It's just a bare xterm running with TERM=xterm-color. I forgot to test on the console.
Quoted 4 lines
Quoted 3 lines
Is there a specific initialization
sequence with ncurses to state that arrows should return special codes instead of the ESC prefix ? (I have no idea)
Quoted 6 lines
Quoted 2 lines
Yes. You need to specify you want to get keypad events, otherwise they just appear as ESC.
OK. I just found there is the ESCDELAY variable to define the ESC timeout. They also talk about
notimeout()incurs_inopts(3), which sounds pretty well related to what I observe.
They do not have the same effect. Using ESCDELAY is a hack, but there is no better option to get a plain ESC key without a timeout.
Quoted 16 lines
[skipping all fixed reports]
Quoted 14 lines
Quoted 7 lines
- I'm not convinced that the parenthesis around hotkeys make the menu that much readable, especially when there are lots of short words or even acronyms. Eg :
[ ] (U)TS namespace [ ] (I)PC namespace [ ] (U)ser namespace (EXPERIMENTAL) [ ] (P)ID Namespaces (EXPERIMENTAL)I agree, but could not come up with any other visible mark to note the hotkey.
Quoted 3 lines
I don't know if there is something such as a bold attribute in ncurses, it would make sense to use it IMHO because you don't force a color on people's terms, you rely on the style which works well for them.
Quoted 5 lines
Quoted 2 lines
There is a bold attribute, but you cannot set it for a single letter of a menu item, as far as I know.
OK I understand. You might want to use the brighter color set (as menuconfig does). Terminals sometimes translate them to bold characters.
All the text in a menu item must be in the same color and with the same attributes. There is no way to emphasize a single section, either by coloring it differently or making it bold.
Quoted 11 lines
Quoted 7 lines
Quoted 3 lines
I'm sorry I don't go further for now, the arrows causing frequent exits is too bothersome, I've started it about 30 times just for this report, it's too hard to navigate. I hope that the points above are already helpful.
Thanks for the input. I would really like to solve the issue you have with arrow keys. Can you also send a trace of key presses which cause you to exit, and which window is active?
Sorry, the directory in which I built has been removed since. But it happened in any window, starting with the main menu. That's why I think it's just an initialization issue.
What do you mean by an "initialization issue" ?
Thanks.
Re: [PATCH] ncurses based config V2
In reply to Willy TarreauHi Nir.
Some comments as followup to Willy.
Quoted 3 lines
OK, I've just tried it. Here are the first comments I can make :
- colors are too dark.
Seconded. Please try to find a lighter set of default colors. You may be inspired by one of the menuconfig color-sets.
I agree that we could use a lift here - so please do not go for the default color set of menuconfig.
Quoted 3 lines
- entering text in boxes (eg: local version) does not move the cursor, it remains at the beginning of the line. If I press any arrow, the box immediately closes (most likely the Esc prefix again).
I do not see any cursor which is annoying. menuconfig has the same issue.
Quoted 3 lines
- I noticed I was tempted a lot to press "?" to get help, but the key is not bound. It would be nice to have it bound to Help since make oldconfig and menuconfig to both report help that way.
Please bound this.
Quoted 7 lines
- I'm not convinced that the parenthesis around hotkeys make the menu that much readable, especially when there are lots of short words or even acronyms. Eg :
[ ] (U)TS namespace
[ ] (I)PC namespace
[ ] (U)ser namespace (EXPERIMENTAL)
[ ] (P)ID Namespaces (EXPERIMENTAL)
This looks like some ancient stuff and it must be a better way to show the short-cuts.
I would really appreciate if you could look into the above issues. If you do a repost with this fixed I will try to do a proper review, including code-review next time.
Sam
Re: [PATCH] ncurses based config V2
Hi,
Quoted 6 lines · Sam Ravnborg
Quoted 1 line
- colors are too dark.
Seconded. Please try to find a lighter set of default colors. You may be inspired by one of the menuconfig color-sets.
I agree that we could use a lift here - so please do not go for the default color set of menuconfig.
Well, the current colors seems to usable on wide variety of terminals, but I'm not colorblind, so I can't really complain. :)
Before we keep discussing the colors, I'd rather suggest to drop them completely and maybe use colors for what actually needs attention.
Quoted 10 lines
Quoted 7 lines
- I'm not convinced that the parenthesis around hotkeys make the menu that much readable, especially when there are lots of short words or even acronyms. Eg :
[ ] (U)TS namespace
[ ] (I)PC namespace
[ ] (U)ser namespace (EXPERIMENTAL)
[ ] (P)ID Namespaces (EXPERIMENTAL)This looks like some ancient stuff and it must be a better way to show the short-cuts.
The parenthesis make it really annoying to read...
Quoted 3 lines
I would really appreciate if you could look into the above issues. If you do a repost with this fixed I will try to do a proper review, including code-review next time.
The code is rather large, so it might be better to split the code into two sources, one for kconfig logic and the other for the interface logic, so it becomes easier to read and maintain.
bye, Roman
Re: [PATCH] ncurses based config V2
Hello.
Quoted 8 lines · Roman Zippel
Hi,
Quoted 4 lines · Sam Ravnborg
Quoted 1 line
- colors are too dark.
Seconded. Please try to find a lighter set of default colors. You may be inspired by one of the menuconfig color-sets.
Quoted 7 lines
Quoted 2 lines
I agree that we could use a lift here - so please do not go for the default color set of menuconfig.
Well, the current colors seems to usable on wide variety of terminals, but I'm not colorblind, so I can't really complain. :)
Before we keep discussing the colors, I'd rather suggest to drop them completely and maybe use colors for what actually needs attention.
The idea is using colors to give it a more modern look. Dropping colors will bring us back to the "dark ages"...
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
- I'm not convinced that the parenthesis around hotkeys make the menu that much readable, especially when there are lots of short words or even acronyms. Eg :
[ ] (U)TS namespace
[ ] (I)PC namespace
[ ] (U)ser namespace (EXPERIMENTAL)
[ ] (P)ID Namespaces (EXPERIMENTAL)
Quoted 4 lines
Quoted 2 lines
This looks like some ancient stuff and it must be a better way to show the short-cuts.
The parenthesis make it really annoying to read...
I agree. See my earlier response to Sam.
Quoted 7 lines
Quoted 3 lines
I would really appreciate if you could look into the above issues. If you do a repost with this fixed I will try to do a proper review, including code-review next time.
The code is rather large, so it might be better to split the code into two sources, one for kconfig logic and the other for the interface logic, so it becomes easier to read and maintain.
Ok.
Thanks for your interest.
Cheers.
Re: [PATCH] ncurses based config V2
Hi,
Quoted 5 lines · Nir Tzachar
Quoted 2 lines
Before we keep discussing the colors, I'd rather suggest to drop them completely and maybe use colors for what actually needs attention.
The idea is using colors to give it a more modern look. Dropping colors will bring us back to the "dark ages"...
After that came the "child ages", where every available color was used because it was there. :-)
For modern interfaces less is more, so if color is used, it should have a purpose.
bye, Roman
Re: [PATCH] ncurses based config V2
In reply to Sam RavnborgHello Sam.
Quoted 4 lines · Sam Ravnborg
Hi Nir.
Some comments as followup to Willy.
Quoted 8 lines
Quoted 3 lines
OK, I've just tried it. Here are the first comments I can make :
- colors are too dark.
Seconded. Please try to find a lighter set of default colors. You may be inspired by one of the menuconfig color-sets.
I agree that we could use a lift here - so please do not go for the default color set of menuconfig.
Personally, I like lighter text on a dark background. But this is just me. I'll try to implement an easier color scheme chooser so everyone will be able to play with it and come up with something they like.
Quoted 4 lines
Quoted 3 lines
- entering text in boxes (eg: local version) does not move the cursor, it remains at the beginning of the line. If I press any arrow, the box immediately closes (most likely the Esc prefix again).
This is fixed in my current version (I have not subitted a patch yet)
Quoted 1 line
I do not see any cursor which is annoying. menuconfig has the same issue.
also fixed.
Quoted 5 lines
Quoted 3 lines
- I noticed I was tempted a lot to press "?" to get help, but the key is not bound. It would be nice to have it bound to Help since make oldconfig and menuconfig to both report help that way.
Please bound this.
consider it bounded..
Quoted 10 lines
Quoted 7 lines
- I'm not convinced that the parenthesis around hotkeys make the menu that much readable, especially when there are lots of short words or even acronyms. Eg :
[ ] (U)TS namespace
[ ] (I)PC namespace
[ ] (U)ser namespace (EXPERIMENTAL)
[ ] (P)ID Namespaces (EXPERIMENTAL)This looks like some ancient stuff and it must be a better way to show the short-cuts.
This was the best I could come up with, as ncurses does not let you use color attributed for menu items. I'll try a different scheme, where the first capitalized letter is the shortcut. What do u say?
Quoted 3 lines
I would really appreciate if you could look into the above issues. If you do a repost with this fixed I will try to do a proper review, including code-review next time.
Sure. I'll have a patch ready in a few days.
Cheers.
Re: [PATCH] ncurses based config V2
Hi Nir.
Quoted 11 lines
Quoted 7 lines
Quoted 4 lines
[ ] (U)TS namespace [ ] (I)PC namespace [ ] (U)ser namespace (EXPERIMENTAL) [ ] (P)ID Namespaces (EXPERIMENTAL)This looks like some ancient stuff and it must be a better way to show the short-cuts.
This was the best I could come up with, as ncurses does not let you use color attributed for menu items. I'll try a different scheme, where the first capitalized letter is the shortcut. What do u say?
Better than the above - let me see it in action and I will judge. I had preferred something with a colored highlight - but if ncurses do not support that then I think first catital letter i ok.
Alternative is to use first letter in the prompt and accept the ambiguity.
Quoted 5 lines
Quoted 3 lines
I would really appreciate if you could look into the above issues. If you do a repost with this fixed I will try to do a proper review, including code-review next time.
Sure. I'll have a patch ready in a few days.
Great - loks forward to see it.
Sam
Re: [PATCH] ncurses based config V2
Hi.
Quoted 14 lines · Sam Ravnborg
Hi Nir.
Quoted 11 lines
Quoted 7 lines
Quoted 4 lines
[ ] (U)TS namespace [ ] (I)PC namespace [ ] (U)ser namespace (EXPERIMENTAL) [ ] (P)ID Namespaces (EXPERIMENTAL)This looks like some ancient stuff and it must be a better way to show the short-cuts.
This was the best I could come up with, as ncurses does not let you use color attributed for menu items. I'll try a different scheme, where the first capitalized letter is the shortcut. What do u say?
Quoted 7 lines
Better than the above - let me see it in action and I will judge. I had preferred something with a colored highlight - but if ncurses do not support that then I think first catital letter i ok.
Alternative is to use first letter in the prompt and accept the ambiguity.
There is too much ambiguity here -- what if the first letter is 'm'? or 'n'? you have problems then.
Quoted 10 lines
Quoted 5 lines
Quoted 3 lines
I would really appreciate if you could look into the above issues. If you do a repost with this fixed I will try to do a proper review, including code-review next time.
Sure. I'll have a patch ready in a few days.
Great - loks forward to see it.
Sam
sss
In reply to Nir TzacharPATCH 1/1 nconfig V3
Changes since last version:
1) Added cursor to input dialog boxes.
2) ? key is bound to help messages.
3) Removed the "()" logic of hot keys. Now, the first upper cased letter of an item is the hot key.
4) Source was split into two parts; for gui logic (nconf.gui.c) and kconfig interface (nconf.c).
5) Shared code with mconf.c has been moved to share.c .
6) General improvements (e.g., all text is centered, etc.)
Open issues:
1) The problem Willy reported with pressing the keypad too quickly. As I cannot reproduce this, I would appreciate a recheck.
2) The color scheme.
Regarding the color scheme, I think we should first agree that the patch is worth including before we procceed. Tweaking the colors will be the easy part ;)
--- scripts/kconfig/Makefile | 23 +- scripts/kconfig/conf.c | 123 ++-- scripts/kconfig/confdata.c | 11 +- scripts/kconfig/lkc.h | 2 +- scripts/kconfig/mconf.c | 76 +-- scripts/kconfig/menu.c | 2 +- scripts/kconfig/nconf.c | 1378 +++++++++++++++++++++++++++++++++++ scripts/kconfig/nconf.gui.c | 653 +++++++++++++++++ scripts/kconfig/nconf.h | 86 +++ scripts/kconfig/shared.c | 82 +++ scripts/kconfig/shared.h | 13 + scripts/kconfig/zconf.tab.c_shipped | 2 +- scripts/kconfig/zconf.y | 2 +- 13 files changed, 2306 insertions(+), 147 deletions(-) create mode 100644 scripts/kconfig/nconf.c create mode 100644 scripts/kconfig/nconf.gui.c create mode 100644 scripts/kconfig/nconf.h create mode 100644 scripts/kconfig/shared.c create mode 100644 scripts/kconfig/shared.h
scripts/kconfig/Makefile +17 -6
@@ -4,11 +4,7 @@ PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config -ifdef KBUILD_KCONFIG -Kconfig := $(KBUILD_KCONFIG) -else Kconfig := arch/$(SRCARCH)/Kconfig -endif xconfig: $(obj)/qconf $< $(Kconfig)
@@ -19,6 +15,9 @@ gconfig: $(obj)/gconf menuconfig: $(obj)/mconf $< $(Kconfig) +nconfig: $(obj)/nconf + $< $(Kconfig) + config: $(obj)/conf $< $(Kconfig)
@@ -79,6 +78,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'
@@ -106,6 +106,8 @@ HOST_EXTRACFLAGS += -DLOCALE # conf: Used for defconfig, oldconfig and related targets # mconf: Used for the mconfig target. # Utilizes the lxdialog package +# nconf: Used for the nconfig target. +# Utilizes ncurses # qconf: Used for the xconfig target # Based on QT which needs to be installed to compile it # gconf: Used for the gconfig target
@@ -116,7 +118,8 @@ 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 shared.o $(lxdialog) +nconf-objs := nconf.o zconf.tab.o shared.o nconf.gui.o kxgettext-objs := kxgettext.o zconf.tab.o hostprogs-y := conf qconf gconf kxgettext
@@ -125,6 +128,10 @@ ifeq ($(MAKECMDGOALS),menuconfig) hostprogs-y += mconf endif +ifeq ($(MAKECMDGOALS),nconfig) + hostprogs-y += nconf +endif + ifeq ($(MAKECMDGOALS),xconfig) qconf-target := 1 endif
@@ -144,7 +151,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)
@@ -162,6 +169,10 @@ HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) HOSTCFLAGS_lex.zconf.o := -I$(src) HOSTCFLAGS_zconf.tab.o := -I$(src) +HOSTLOADLIBES_nconf = -lmenu -lpanel -lncurses +HOSTCFLAGS_nconf.o = +LDFLAGS_nconf.o = + HOSTLOADLIBES_qconf = $(KC_QT_LIBS) -ldl HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS) -D LKC_DIRECT_LINK
scripts/kconfig/conf.c +66 -57
179 lines not on this page · raw message
scripts/kconfig/confdata.c +4 -7
@@ -222,10 +222,8 @@ load:continue ;if (def ==S_DEF_USER ) { sym =sym_find (line +9 ); -if (!sym) { -sym_add_change_count (1 ); +if (!sym)break ; - } }else { sym =sym_lookup (line +9 ,0 );if (sym->type ==S_UNKNOWN )
@@ -261,10 +259,8 @@ load: }if (def ==S_DEF_USER ) { sym =sym_find (line +7 ); -if (!sym) { -sym_add_change_count (1 ); +if (!sym)break ; - } }else { sym =sym_lookup (line +7 ,0 );if (sym->type ==S_UNKNOWN )
@@ -852,7 +848,8 @@ void conf_set_all_new_symbols(enum conf_def_mode mode) } -sym_clear_all_valid (); +if (modules_sym) +sym_calc_value (modules_sym);if (mode != def_random)return ;
scripts/kconfig/lkc.h +1 -1
@@ -83,7 +83,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/mconf.c +3 -73
100 lines not on this page · raw message
scripts/kconfig/menu.c +1 -1
@@ -35,7 +35,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;
scripts/kconfig/nconf.c new file +1378 -0
1,378 lines not on this page · raw message
scripts/kconfig/nconf.gui.c new file +653 -0
653 lines not on this page · raw message
scripts/kconfig/nconf.h new file +86 -0
86 lines not on this page · raw message
scripts/kconfig/shared.c new file +82 -0
82 lines not on this page · raw message
scripts/kconfig/shared.h new file +13 -0
@@ -0,0 +1,13 @@ +/* +* Copyright (C) 2008 Nir Tzachar <[email protected]? +* Released under the terms of the GNU GPL v2.0. +* +* Derived from menuconfig. +* +*/ +#define LKC_DIRECT_LINK +#include "lkc.h" + +void get_prompt_str (struct gstr *r,struct property *prop); +void get_symbol_str (struct gstr *r,struct symbol *sym); +struct gstr get_relations_str (struct symbol **sym_arr);
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.5.6.4