summaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/nconf.c
Commit message (Collapse)AuthorAgeFilesLines
* kconfig/[mn]conf: shorten title in search-boxYann E. MORIN2013-07-161-2/+2
| | | | | | | | | No need to repeat the 'CONFIG_' string in the title, once is explicit enough. Reported-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Jean Delvare <jdelvare@suse.de>
* kconfig/[mn]conf: make it explicit in the search box that a regexp is possibleYann E. MORIN2013-06-241-1/+1
| | | | | | | Reported-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Jean Delvare <jdelvare@suse.de> Cc: Michal Marek <mmarek@suse.cz>
* mconf/nconf: mark empty menus/menuconfigs different from non-empty onesDirk Gouders2013-06-181-8/+8
| | | | | | | | | | | | | | | | | Submenus are sometimes empty and it would be nice if there is something that notifies us that we should not expect any content _before_ we enter a submenu. A new function menu_is_empty() was introduced and empty menus and menuconfigs are now marked by "----" as opposed to non-empty ones that are marked by "--->". This scheme was suggested by "Yann E. MORIN" <yann.morin.1998@free.fr>. Signed-off-by: Dirk Gouders <dirk@gouders.net> Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
* nconf: use function calls instead of ncurses' variables LINES and COLSDirk Gouders2013-06-181-7/+14
| | | | | | | | | | | | | | | | | | | | According to the documentation [1], LINES and COLS are initialized by initscr(); it does not say anything about the behavior when windows are resized. Do not rely on the current implementation of ncurses that updates these variables on resize, but use the propper function calls or macros to get window dimensions. The use of the variables in main() was OK, but for the sake of consistency it was modified to use the macro getmaxyx(). [1] ncurses(3X) Signed-off-by: Dirk Gouders <dirk@gouders.net> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> [yann.morin.1998@free.fr: declare 'lines' and 'columns' on a single line] Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
* kconfig: nconf: rewrite labels of function keys lineRoland Eggner2013-02-091-4/+4
| | | | | | | | | | | | | >From: Roland Eggner <edvx1@systemanalysen.net> More reasonable labels of function keys line. Rename labels and keep menu width, as required for fitting on COLUMNS=80 terminals: • s/Insts/Help 2/ • s/Config/ShowAll/ Signed-off-by: Roland Eggner <edvx1@systemanalysen.net> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
* kconfig: nconf: rewrite help textsRoland Eggner2013-02-091-164/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | >From: Roland Eggner <edvx1@systemanalysen.net> Rewrite all help texts. During several years lazy (incomplete) updates have left behind a rather thick layer of dust. Intentions: (1) Global help called by <F1> should document all _currently_ implemented keybindings. (2) Different help texts called by <F3> resp. <F8><F1> should be consistent with (1) and with implementation: • on plain menu entry • in radiolist window • in input windows for text, decimal or hexadecimal values • in filename selection windows <F6> <F7> • SymSearch specific help called by <F8> followed by <F1> (3) More reasonable window titles: Rename window title s/README/Global help/ Rename variable s/nconf_readme/nconf_global_help/ Rename window title s/Instructions/Short help/ (4) Consider which hints are most useful for first-time-users. Signed-off-by: Roland Eggner <edvx1@systemanalysen.net> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> [yann.morin.1998@free.fr: a few additional fixes] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
* kconfig: get CONFIG_ prefix from the environmentYann E. MORIN2012-11-201-0/+1
| | | | | | | | | | | | Currently, the CONFIG_ prefix is hard-coded in the kconfig frontends executables. This means that two projects that use kconfig with different prefixes can not share the same kconfig frontends. Instead of hard-coding the prefix in the frontends, get it from the environment, and revert back to hard-coded value if not found. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
* kconfig: remove CONFIG_ from string constantsYann E. MORIN2012-11-201-2/+9
| | | | | | | | | | | Having the CONFIG_ prefix in string constants gets in the way of using a run-time-defined CONFIG_ prefix. Fix that by using temp growable strings (gstr) in which we printf the text. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
* menuconfig: Add jump keys to search resultsBenjamin Poirier2012-09-271-1/+1
| | | | | | | | | | | makes it possible to jump directly to the menu for a configuration entry after having searched for it with '/'. If this menu is not currently accessible we jump to the nearest accessible parent instead. After exiting this menu, the user is returned to the search results where he may jump further in or elsewhere. Signed-off-by: Benjamin Poirier <bpoirier@suse.de> Signed-off-by: Michal Marek <mmarek@suse.cz>
* nconf: add u, d command keys in scroll windowsBenjamin Poirier2012-07-261-3/+3
| | | | | | | | | They function just like they do in less(1). Also correct some discrepancy between the help text and the code wrt function keys. Signed-off-by: Benjamin Poirier <bpoirier@suse.de> Signed-off-by: Michal Marek <mmarek@suse.cz>
* kconfig/nconf: fix compile with ncurses reentrant APIYaakov Selkowitz2012-07-041-0/+4
| | | | | | | | | | | ESCDELAY is a global variable which is replaced by getter and setter functions with NCURSES_REENTRANT. This fixes the following error: nconf.c: In function ‘main’: nconf.c:1506:2: error: lvalue required as left operand of assignment Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Signed-off-by: Michal Marek <mmarek@suse.cz>
* MCA: delete all remaining traces of microchannel bus support.Paul Gortmaker2012-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Hardware with MCA bus is limited to 386 and 486 class machines that are now 20+ years old and typically with less than 32MB of memory. A quick search on the internet, and you see that even the MCA hobbyist/enthusiast community has lost interest in the early 2000 era and never really even moved ahead from the 2.4 kernels to the 2.6 series. This deletes anything remaining related to CONFIG_MCA from core kernel code and from the x86 architecture. There is no point in carrying this any further into the future. One complication to watch for is inadvertently scooping up stuff relating to machine check, since there is overlap in the TLA name space (e.g. arch/x86/boot/mca.c). Cc: Thomas Gleixner <tglx@linutronix.de> Cc: James Bottomley <JBottomley@Parallels.com> Cc: x86@kernel.org Acked-by: Ingo Molnar <mingo@elte.hu> Acked-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* scripts/kconfig/nconf: dynamically alloc dialog_input_resultCheng Renquan2011-09-091-11/+10
| | | | | | | | | | To support unlimited length string config items; No check for realloc return value keeps code simple, and to be consistent with other existing unchecked malloc in kconfig. Signed-off-by: Cheng Renquan <crquan@gmail.com> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
* kconfig/nconf: nuke unreferenced `nohelp_text'Arnaud Lacombe2011-08-081-2/+0
| | | | | | | | After commit 5416857867c9cc94aba641898c567d9707de30f1, nohelp_text' is no longer referenced, nuke it. Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
* kconfig/nconf: remove useless conditionnalArnaud Lacombe2011-07-131-4/+1
| | | | | | | | | | | | | | After the test if (!submenu || ...) continue; the variable `submenu' can _not_ be NULL, so do not test for this situation. Cc: Nir Tzachar <nir.tzachar@gmail.com> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
* kconfig/nconf: prevent segfault on empty menuArnaud Lacombe2011-07-131-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nconf does not check the validity of the current menu when help is requested (with either <F2>, '?' or 'h'). This leads to a NULL pointer dereference when an empty menu is encountered. The following reduced testcase exposes the problem: config DEP bool menu "FOO" config BAR bool "BAR" depends on DEP endmenu Issue will happen when entering menu "FOO" and requesting help. nconf is the only front-end which do not filter the validity of the current menu. Such filter can not really happen beforehand as other key which does not deals with the current menu might be entered by the user, so just bails out earlier if we encounter an invalid menu. Cc: Nir Tzachar <nir.tzachar@gmail.com> Cc: Andrej Gelenberg <andrej.gelenberg@udo.edu> Reported-by: Andrej Gelenberg <andrej.gelenberg@udo.edu> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
* kconfig/nconf: use the generic menu_get_ext_help()Arnaud Lacombe2011-07-131-13/+1
| | | | | | | | | | | | | | | | nconf is the only front-end which does not use this helper, but prefer to copy/paste the code. The test wrt. menu validity added in this version of the code is bogus anyway as an invalid menu will get dereferenced a few line below by calling menu_get_prompt(). For now, convert nconf to use menu_get_ext_help(), as do every other front-end. We will deals with menu validity checks properly in a separate commit. Cc: Nir Tzachar <nir.tzachar@gmail.com> Cc: Andrej Gelenberg <andrej.gelenberg@udo.edu> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
* nconfig: Avoid Wunused-but-set warningRaghavendra D Prabhu2011-07-131-2/+0
| | | | | | | | | I am seeing Wunused-but-set warning while make nconfig. Looks like active_menu is not used. Removing it fixes the warning. Signed-off-by: Raghavendra D Prabhu <rprabhu@wnohang.net> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
* kconfig: nuke LKC_DIRECT_LINK cruftArnaud Lacombe2011-06-061-1/+1
| | | | | | | This interface is not (and has never been ?) used by any frontend, just get rid of it. Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
* nconfig: Silence unused return values from wattrsetStephen Boyd2011-04-191-7/+7
| | | | | | | | | | | | | | | | | | | Ignore the return value from wattrset since we ignore the return value in nconf.gui.c as well. scripts/kconfig/nconf.c: In function 'print_function_line': scripts/kconfig/nconf.c:376: warning: value computed is not used scripts/kconfig/nconf.c:380: warning: value computed is not used scripts/kconfig/nconf.c:387: warning: value computed is not used scripts/kconfig/nconf.c: In function 'show_menu': scripts/kconfig/nconf.c:956: warning: value computed is not used scripts/kconfig/nconf.c:961: warning: value computed is not used scripts/kconfig/nconf.c:963: warning: value computed is not used scripts/kconfig/nconf.c:965: warning: value computed is not used Cc: Nir Tzachar <nir.tzachar@gmail.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
* nconf: handle comment entries within choice/endchoicePeter Korsgaard2011-01-071-2/+6
| | | | | | | | | | | | Equivalent to af6c1598 (kconfig: handle comment entries within choice/endchoice), but for nconfig instead. Implement support for comment entries within choice groups. Comment entries are displayed visually distinct from normal configs, and selecting them is a no-op. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Michal Marek <mmarek@suse.cz>
* kbuild/nconf: fix spaces damageArnaud Lacombe2010-12-151-1/+1
| | | | | Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
* Merge branch 'message-callback' into kbuild/kconfigMichal Marek2010-10-281-42/+9
|\ | | | | | | | | Conflicts: scripts/kconfig/nconf.c
| * kconfig: Allow frontends to display messages themselvesMichal Marek2010-08-171-42/+9
| | | | | | | | Signed-off-by: Michal Marek <mmarek@suse.cz>
* | Merge branch 'kbuild/kconfig/kbuild-generic-v7' of ↵Michal Marek2010-09-271-41/+32
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | http://github.com/lacombar/linux-2.6 into kbuild/kconfig * 'kbuild/kconfig/kbuild-generic-v7' of http://github.com/lacombar/linux-2.6: kbuild: migrate all arch to the kconfig mainmenu upgrade kconfig: expand file names kconfig: use the file's name of sourced file kconfig: constify file name kconfig: don't emit warning upon rootmenu's prompt redefinition kconfig: replace KERNELVERSION usage by the mainmenu's prompt kconfig: delay gconf window initialization kconfig: expand by default the rootmenu's prompt kconfig: add a symbol string expansion helper kconfig: regen parser kconfig: implement the `mainmenu' directive kconfig: allow PACKAGE to be defined on the compiler's command-line kconfig: rephrase help texts/comments not to include the package name kconfig: allow build-time definition of the internal config prefix kconfig: rephrase help text not to mention the internal prefix kconfig: replace a `switch()' statement by a more flexible `if()' statement
| * | kconfig: replace KERNELVERSION usage by the mainmenu's promptArnaud Lacombe2010-09-191-5/+1
| | | | | | | | | | | | | | | | | | Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Michal Marek <mmarek@suse.cz>
| * | kconfig: rephrase help texts/comments not to include the package nameArnaud Lacombe2010-09-191-24/+19
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Reviewed-by: Randy Dunlap <rdunlap@xenotime.net> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Michal Marek <mmarek@suse.cz>
| * | kconfig: allow build-time definition of the internal config prefixArnaud Lacombe2010-09-191-6/+6
| | | | | | | | | | | | | | | | | | Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Michal Marek <mmarek@suse.cz>
| * | kconfig: rephrase help text not to mention the internal prefixArnaud Lacombe2010-09-191-6/+6
| |/ | | | | | | | | | | Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Michal Marek <mmarek@suse.cz>
* | nconfig: Fix help for choice menusStephen Boyd2010-09-131-0/+2
|/ | | | | | | | | | | | | | When getting the help for a choice menu with a help section (for example the "Choose SLAB allocator" menu) nconfig pops up a window with nothing inside it. This is due to show_help() passing an empty string to show_scroll_win()'s 3rd argument. The option really does have help though, but it isn't a config symbol, so just add the help text for the option, and don't try to add anything else like the config option name. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Acked-by: Nir Tzachar <nir.tzachar@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
* nconfig: add search supportNir Tzachar2010-08-161-169/+196
| | | | | | | | | | | | | | | | | | | | Remove the old hotkeys feature, and replace it by an interactive string search. From nconfig help: Searching: pressing '/' triggers interactive search mode. nconfig performs a case insensitive search for the string in the menu prompts (no regex support). Pressing the up/down keys highlights the previous/next matching item. Backspace removes one character from the match string. Pressing either '/' again or ESC exits search mode. All other keys behave normally. Miscellaneous other changes (including Rundy's and Justin's input). Signed-off-by: Nir Tzachar <nir.tzachar@gmail.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
* nconfig: Fix segfault when menu is emptyAndrej Gelenberg2010-08-131-0/+2
| | | | | | | nconf crush with segfault if press right arrow in empty menu. Signed-off-by: Andrej Gelenberg <andrej.gelenberg@udo.edu> Signed-off-by: Michal Marek <mmarek@suse.cz>
* nconfig: minor fixNir Tzachar2010-02-021-3/+3
| | | | | | | | | | This patch fixes two problems reported by Jan Engelhardt: 1) Border is now properly placed, to always be visible 2) Long menu items are properly displayed Reported-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Nir Tzachar <nir.tzachar@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
* nconfig: mark local functions as suchMichal Marek2010-02-021-12/+12
| | | | | | | | | | | | | | | | | | | | scripts/kconfig/nconf.gui.c:23: warning: no previous prototype for 'set_normal_colors' scripts/kconfig/nconf.gui.c:68: warning: no previous prototype for 'normal_color_theme' scripts/kconfig/nconf.gui.c:100: warning: no previous prototype for 'no_colors_theme' scripts/kconfig/nconf.c:455: warning: no previous prototype for 'process_special_keys' scripts/kconfig/nconf.c:487: warning: no previous prototype for 'get_next_hot' scripts/kconfig/nconf.c:506: warning: no previous prototype for 'canbhot' scripts/kconfig/nconf.c:514: warning: no previous prototype for 'is_hot' scripts/kconfig/nconf.c:522: warning: no previous prototype for 'make_hot' scripts/kconfig/nconf.c:582: warning: no previous prototype for 'item_make' scripts/kconfig/nconf.c:626: warning: no previous prototype for 'item_add_str' scripts/kconfig/nconf.c:656: warning: no previous prototype for 'item_tag' scripts/kconfig/nconf.c:668: warning: no previous prototype for 'curses_item_index' scripts/kconfig/nconf.c:673: warning: no previous prototype for 'item_data' scripts/kconfig/nconf.c:684: warning: no previous prototype for 'item_is_tag' scripts/kconfig/nconf.c:691: warning: no previous prototype for 'set_config_filename' Signed-off-by: Michal Marek <mmarek@suse.cz>
* kconfig: new configuration interface (nconfig)nir.tzachar@gmail.com2010-02-021-0/+1568
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>
OpenPOWER on IntegriCloud