summaryrefslogtreecommitdiff
path: root/kconfig/lxdialog/yesno.c
diff options
context:
space:
mode:
authorBryan Hundven <bryanhundven@gmail.com>2015-09-01 23:11:30 (GMT)
committerBryan Hundven <bryanhundven@gmail.com>2015-09-04 02:00:28 (GMT)
commit0cffa79d9fb3d5476d7a1dbeda617aea7a6851b2 (patch)
tree7339c7fff49ed2cd2e06c042bc1bc35a20f5a381 /kconfig/lxdialog/yesno.c
parent74b09f9c4a07a8f561001f4a727259b2d5eced77 (diff)
kconfig: Update kconfig. Sync with Linux-4.2
This change updates the kconfig utility to what is shipped with 4.2.0. Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
Diffstat (limited to 'kconfig/lxdialog/yesno.c')
-rw-r--r--kconfig/lxdialog/yesno.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kconfig/lxdialog/yesno.c b/kconfig/lxdialog/yesno.c
index 4e6e809..676fb2f 100644
--- a/kconfig/lxdialog/yesno.c
+++ b/kconfig/lxdialog/yesno.c
@@ -45,14 +45,14 @@ int dialog_yesno(const char *title, const char *prompt, int height, int width)
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);