kconfig: update to follow upstream more closely
This might break a bunch of stuff (eg. win32 support),
but otherwise introduces nconfig (ncurses based configuration
frontend), partial configuration headers for improved dependency
tracking (which requires some more build system support) and
various bug fixes.
Change-Id: I5d8a280810c6a26fc3fd056d5d94cb9e591a0ff5
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/5487
Tested-by: build bot (Jenkins)
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
diff --git a/util/kconfig/lxdialog/yesno.c b/util/kconfig/lxdialog/yesno.c
index 4614d0f..676fb2f 100644
--- a/util/kconfig/lxdialog/yesno.c
+++ b/util/kconfig/lxdialog/yesno.c
@@ -45,14 +45,14 @@
WINDOW *dialog;
do_resize:
- if (getmaxy(stdscr) < (height + 4))
+ if (getmaxy(stdscr) < (height + YESNO_HEIGTH_MIN))
return -ERRDISPLAYTOOSMALL;
- if (getmaxx(stdscr) < (width + 4))
+ if (getmaxx(stdscr) < (width + YESNO_WIDTH_MIN))
return -ERRDISPLAYTOOSMALL;
/* center dialog box on screen */
- x = (COLS - width) / 2;
- y = (LINES - height) / 2;
+ x = (getmaxx(stdscr) - width) / 2;
+ y = (getmaxy(stdscr) - height) / 2;
draw_shadow(stdscr, y, x, height, width);
@@ -102,12 +102,10 @@
case KEY_ESC:
key = on_key_esc(dialog);
break;
-#ifdef NCURSES_VERSION
case KEY_RESIZE:
delwin(dialog);
on_key_resize();
goto do_resize;
-#endif
}
}