aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/sysinstall/msg.c
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1999-12-14 04:25:29 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1999-12-14 04:25:29 +0000
commit7025aeb16e091cf9515535424d0532b53c618b83 (patch)
treea4fa2148685a8fd9c12ca7648603d5499e521f49 /usr.sbin/sysinstall/msg.c
parent34fa0973611c929a22ea016ed691c4e152ba0054 (diff)
downloadsrc-7025aeb16e091cf9515535424d0532b53c618b83.tar.gz
src-7025aeb16e091cf9515535424d0532b53c618b83.zip
Completely rip-out and redesign sysinstall's refresh model as well
as redoing all the menus to have proper, or at least non-hallucinogenic, keyboard accelerators. This requires my recent update to libdialog to work properly and will probably also exhibit some other "interesting" behavior while the last few missing screen clears are found (which is why I'm not going to MFC immediately). At least now, however, sysinstall does not gratuitously redraw random screens at the drop of a hat and drive serial console installers out of their minds.
Notes
Notes: svn path=/head/; revision=54587
Diffstat (limited to 'usr.sbin/sysinstall/msg.c')
-rw-r--r--usr.sbin/sysinstall/msg.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/usr.sbin/sysinstall/msg.c b/usr.sbin/sysinstall/msg.c
index 29867797cf7d..3d7affe40fc6 100644
--- a/usr.sbin/sysinstall/msg.c
+++ b/usr.sbin/sysinstall/msg.c
@@ -184,6 +184,7 @@ msgConfirm(char *fmt, ...)
{
va_list args;
char *errstr;
+ WINDOW *w = savescr();
errstr = (char *)alloca(FILENAME_MAX);
va_start(args, fmt);
@@ -196,6 +197,7 @@ msgConfirm(char *fmt, ...)
msgInfo(NULL);
}
dialog_notify(errstr);
+ restorescr(w);
}
/* Put up a message in a popup information box */
@@ -204,6 +206,7 @@ msgNotify(char *fmt, ...)
{
va_list args;
char *errstr;
+ WINDOW *w = savescr();
errstr = (char *)alloca(FILENAME_MAX);
va_start(args, fmt);
@@ -213,8 +216,9 @@ msgNotify(char *fmt, ...)
use_helpfile(NULL);
if (isDebug())
msgDebug("Notify: %s\n", errstr);
- dialog_clear_norefresh();
dialog_msgbox(NULL, errstr, -1, -1, 0);
+ sleep(1);
+ restorescr(w);
}
/* Put up a message in a popup yes/no box and return 1 for YES, 0 for NO */
@@ -224,7 +228,8 @@ msgYesNo(char *fmt, ...)
va_list args;
char *errstr;
int ret;
-
+ WINDOW *w = savescr();
+
errstr = (char *)alloca(FILENAME_MAX);
va_start(args, fmt);
vsnprintf(errstr, FILENAME_MAX, fmt, args);
@@ -236,6 +241,7 @@ msgYesNo(char *fmt, ...)
msgInfo(NULL);
}
ret = dialog_yesno("User Confirmation Requested", errstr, -1, -1);
+ restorescr(w);
return ret;
}
@@ -247,6 +253,7 @@ msgGetInput(char *buf, char *fmt, ...)
char *errstr;
static char input_buffer[256];
int rval;
+ WINDOW *w = savescr();
errstr = (char *)alloca(FILENAME_MAX);
va_start(args, fmt);
@@ -263,6 +270,7 @@ msgGetInput(char *buf, char *fmt, ...)
msgInfo(NULL);
}
rval = dialog_inputbox("Value Required", errstr, -1, -1, input_buffer);
+ restorescr(w);
if (!rval)
return input_buffer;
else
@@ -292,7 +300,8 @@ msgWeHaveOutput(char *fmt, ...)
{
va_list args;
char *errstr;
-
+ WINDOW *w = savescr();
+
errstr = (char *)alloca(FILENAME_MAX);
va_start(args, fmt);
vsnprintf(errstr, FILENAME_MAX, fmt, args);
@@ -302,6 +311,7 @@ msgWeHaveOutput(char *fmt, ...)
msgDebug("Notify: %s\n", errstr);
dialog_clear_norefresh();
dialog_msgbox(NULL, errstr, -1, -1, 0);
+ restorescr(w);
}
/* Simple versions of msgConfirm() and msgNotify() for calling from scripts */