summaryrefslogtreecommitdiffstats
path: root/package/config/lxdialog/util.c
diff options
context:
space:
mode:
authorAlper Yildirim <ayildirim@aselsan.com>2009-07-20 18:50:58 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2009-07-27 16:06:50 +0200
commit4b3e11b3e7d00881878f45cddbfe8f4bf07d1ebe (patch)
tree3740632b5196497242055f7ecdfe4be3c6210409 /package/config/lxdialog/util.c
parentea536503331aea875e84ae598b4610fbd059f167 (diff)
downloadbuildroot-novena-4b3e11b3e7d00881878f45cddbfe8f4bf07d1ebe.tar.gz
buildroot-novena-4b3e11b3e7d00881878f45cddbfe8f4bf07d1ebe.zip
config: Update package/config to Kconfig 2.6.30
Update the package/config stuff with the code available in the Linux kernel 2.6.30. Signed-off-by: Alper Yildirim <ayildirim@aselsan.com>
Diffstat (limited to 'package/config/lxdialog/util.c')
-rw-r--r--package/config/lxdialog/util.c32
1 files changed, 21 insertions, 11 deletions
diff --git a/package/config/lxdialog/util.c b/package/config/lxdialog/util.c
index a1bddefe7..86d95cca4 100644
--- a/package/config/lxdialog/util.c
+++ b/package/config/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();
}