summaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/lxdialog/util.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-01-29 22:46:14 +1100
committerLinus Torvalds <torvalds@linux-foundation.org>2008-01-29 22:46:14 +1100
commit5ea293a9048d3a58cb0c840fa719d85ad14cba47 (patch)
tree88d1dd1eece2cfcbd858ff2c00fb0240dcfab3c7 /scripts/kconfig/lxdialog/util.c
parent03bc26cfefd6db756e6bc7fcda11dc17ada7be16 (diff)
parentd3883ecebbf9e095b9e379dabbbe8b2c1ee7a41c (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (79 commits) Remove references to "make dep" kconfig: document use of HAVE_* Introduce new section reference annotations tags: __ref, __refdata, __refconst kbuild: warn about ld added unique sections kbuild: add verbose option to Section mismatch reporting in modpost kconfig: tristate choices with mixed tristate and boolean values asm-generic/vmlix.lds.h: simplify __mem{init,exit}* dependencies remove __attribute_used__ kbuild: support ARCH=x86 in buildtar kconfig: remove "enable" kbuild: simplified warning report in modpost kbuild: introduce a few helpers in modpost kbuild: use simpler section mismatch warnings in modpost kbuild: link vmlinux.o before kallsyms passes kbuild: introduce new option to enhance section mismatch analysis Use separate sections for __dev/__cpu/__mem code/data compiler.h: introduce __section() all archs: consolidate init and exit sections in vmlinux.lds.h kbuild: check section names consistently in modpost kbuild: introduce blacklisting in modpost ...
Diffstat (limited to 'scripts/kconfig/lxdialog/util.c')
-rw-r--r--scripts/kconfig/lxdialog/util.c32
1 files changed, 21 insertions, 11 deletions
diff --git a/scripts/kconfig/lxdialog/util.c b/scripts/kconfig/lxdialog/util.c
index a1bddefe73d0..86d95cca46a7 100644
--- a/scripts/kconfig/lxdialog/util.c
+++ b/scripts/kconfig/lxdialog/util.c
@@ -266,31 +266,41 @@ void dialog_clear(void)
/*
* Do some initialization for dialog
*/
-void init_dialog(const char *backtitle)
+int init_dialog(const char *backtitle)
{
- dlg.backtitle = backtitle;
- color_setup(getenv("MENUCONFIG_COLOR"));
-}
+ int height, width;
+
+ initscr(); /* Init curses */
+ getmaxyx(stdscr, height, width);
+ if (height < 19 || width < 80) {
+ endwin();
+ return -ERRDISPLAYTOOSMALL;
+ }
-void set_dialog_backtitle(const char *backtitle)
-{
dlg.backtitle = backtitle;
-}
+ color_setup(getenv("MENUCONFIG_COLOR"));
-void reset_dialog(void)
-{
- initscr(); /* Init curses */
keypad(stdscr, TRUE);
cbreak();
noecho();
dialog_clear();
+
+ return 0;
+}
+
+void set_dialog_backtitle(const char *backtitle)
+{
+ dlg.backtitle = backtitle;
}
/*
* End using dialog functions.
*/
-void end_dialog(void)
+void end_dialog(int x, int y)
{
+ /* move cursor back to original position */
+ move(y, x);
+ refresh();
endwin();
}