summaryrefslogtreecommitdiffstats
path: root/gnu/lib/libdialog/yesno.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1995-04-20 17:39:37 +0000
committerache <ache@FreeBSD.org>1995-04-20 17:39:37 +0000
commit64d059015a846d87cebe34d7ab5c1c60826bc78b (patch)
tree704f5dc77611312a174a02ade2261d68f64fe0c2 /gnu/lib/libdialog/yesno.c
parent936b7c1314ac293785af1174e3070079001615ba (diff)
downloadFreeBSD-src-64d059015a846d87cebe34d7ab5c1c60826bc78b.zip
FreeBSD-src-64d059015a846d87cebe34d7ab5c1c60826bc78b.tar.gz
Upgrade.
Submitted by: Marc van Kempen <wmbfmk@urc.tue.nl>
Diffstat (limited to 'gnu/lib/libdialog/yesno.c')
-rw-r--r--gnu/lib/libdialog/yesno.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gnu/lib/libdialog/yesno.c b/gnu/lib/libdialog/yesno.c
index 45ff649..14ec47d 100644
--- a/gnu/lib/libdialog/yesno.c
+++ b/gnu/lib/libdialog/yesno.c
@@ -30,6 +30,11 @@ int dialog_yesno(unsigned char *title, unsigned char * prompt, int height, int w
{
int i, j, x, y, key = 0, button = 0;
WINDOW *dialog;
+ char *tmphlp;
+
+ /* disable helpline */
+ tmphlp = get_helpline();
+ use_helpline(NULL);
if (height < 0)
height = strheight(prompt)+4;
@@ -97,10 +102,12 @@ int dialog_yesno(unsigned char *title, unsigned char * prompt, int height, int w
case 'Y':
case 'y':
delwin(dialog);
+ restore_helpline(tmphlp);
return 0;
case 'N':
case 'n':
delwin(dialog);
+ restore_helpline(tmphlp);
return 1;
case KEY_BTAB:
case TAB:
@@ -124,6 +131,7 @@ int dialog_yesno(unsigned char *title, unsigned char * prompt, int height, int w
case '\r':
case '\n':
delwin(dialog);
+ restore_helpline(tmphlp);
return button;
case ESC:
break;
@@ -135,6 +143,7 @@ int dialog_yesno(unsigned char *title, unsigned char * prompt, int height, int w
}
delwin(dialog);
+ restore_helpline(tmphlp);
return -1; /* ESC pressed */
}
/* End of dialog_yesno() */
OpenPOWER on IntegriCloud