summaryrefslogtreecommitdiffstats
path: root/contrib/dialog/yesno.c
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2013-06-17 10:28:55 +0000
committerbapt <bapt@FreeBSD.org>2013-06-17 10:28:55 +0000
commit417e87f740ac4d85234428776a69e163d33517bd (patch)
tree9f45a4b095479f9ca544ff3abb716d5aefc15eb1 /contrib/dialog/yesno.c
parentf7c70f4181a12b76d1a7454b166af41fb2cabe98 (diff)
parent2b5579c9bdbbca29e7b2df1ee9a9e5d1cce2b06f (diff)
downloadFreeBSD-src-417e87f740ac4d85234428776a69e163d33517bd.zip
FreeBSD-src-417e87f740ac4d85234428776a69e163d33517bd.tar.gz
Update dialog to 1.2-20130523
Level up WARNS
Diffstat (limited to 'contrib/dialog/yesno.c')
-rw-r--r--contrib/dialog/yesno.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/contrib/dialog/yesno.c b/contrib/dialog/yesno.c
index 4efb073..d8a0c0b 100644
--- a/contrib/dialog/yesno.c
+++ b/contrib/dialog/yesno.c
@@ -1,9 +1,9 @@
/*
- * $Id: yesno.c,v 1.51 2011/06/27 08:20:57 tom Exp $
+ * $Id: yesno.c,v 1.57 2012/12/01 01:48:21 tom Exp $
*
* yesno.c -- implements the yes/no box
*
- * Copyright 1999-2010,2011 Thomas E. Dickey
+ * Copyright 1999-2011,2012 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -37,13 +37,7 @@ dialog_yesno(const char *title, const char *cprompt, int height, int width)
static DLG_KEYS_BINDING binding[] = {
HELPKEY_BINDINGS,
ENTERKEY_BINDINGS,
- DLG_KEYS_DATA( DLGK_ENTER, ' ' ),
- DLG_KEYS_DATA( DLGK_FIELD_NEXT, KEY_DOWN ),
- DLG_KEYS_DATA( DLGK_FIELD_NEXT, KEY_RIGHT ),
- DLG_KEYS_DATA( DLGK_FIELD_NEXT, TAB ),
- DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_UP ),
- DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_BTAB ),
- DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_LEFT ),
+ TRAVERSE_BINDINGS,
SCROLLKEY_BINDINGS,
END_KEYS_BINDING
};
@@ -52,7 +46,7 @@ dialog_yesno(const char *title, const char *cprompt, int height, int width)
int x, y;
int key = 0, fkey;
int code;
- int button = dlg_defaultno_button();
+ int button = dlg_default_button();
WINDOW *dialog = 0;
int result = DLG_EXIT_UNKNOWN;
char *prompt = dlg_strclone(cprompt);
@@ -87,12 +81,12 @@ dialog_yesno(const char *title, const char *cprompt, int height, int width)
dlg_register_buttons(dialog, "yesno", buttons);
}
- dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
- dlg_draw_bottom_box(dialog);
+ dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr);
+ dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
dlg_draw_title(dialog, title);
dlg_draw_helpline(dialog, FALSE);
- wattrset(dialog, dialog_attr);
+ (void) wattrset(dialog, dialog_attr);
page = height - (1 + 3 * MARGIN);
dlg_draw_buttons(dialog,
@@ -103,6 +97,7 @@ dialog_yesno(const char *title, const char *cprompt, int height, int width)
if (show) {
last = dlg_print_scrolled(dialog, prompt, offset,
page, width, TRUE);
+ dlg_trace_win(dialog);
show = FALSE;
}
key = dlg_mouse_wgetch(dialog, &fkey);
OpenPOWER on IntegriCloud