diff options
| author | Jordan K. Hubbard <jkh@FreeBSD.org> | 1995-05-23 02:41:18 +0000 |
|---|---|---|
| committer | Jordan K. Hubbard <jkh@FreeBSD.org> | 1995-05-23 02:41:18 +0000 |
| commit | 7ccad8a96ac9dfd823c31913c2ed67ea486c9202 (patch) | |
| tree | 1be6c68d1b91dc89c4abcef6f02b842e08f96593 /usr.sbin/sysinstall/msg.c | |
| parent | 424e4f7c42735dea82dac9385d7901950e12b207 (diff) | |
Notes
Diffstat (limited to 'usr.sbin/sysinstall/msg.c')
| -rw-r--r-- | usr.sbin/sysinstall/msg.c | 42 |
1 files changed, 37 insertions, 5 deletions
diff --git a/usr.sbin/sysinstall/msg.c b/usr.sbin/sysinstall/msg.c index c78621db40980..b2f4bafcda1b9 100644 --- a/usr.sbin/sysinstall/msg.c +++ b/usr.sbin/sysinstall/msg.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: msg.c,v 1.21 1995/05/20 19:12:12 phk Exp $ + * $Id: msg.c,v 1.22 1995/05/22 14:10:25 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -73,21 +73,32 @@ msgInfo(char *fmt, ...) { va_list args; char *errstr; - int attrs; + int i, attrs; + char line[81]; + attrs = getattrs(stdscr); /* NULL is a special convention meaning "erase the old stuff" */ if (!fmt) { move(OnVTY ? VTY_STATLINE : TTY_STATLINE, 0); + attrset(A_REVERSE); clrtoeol(); + attrset(attrs); return; } errstr = (char *)safe_malloc(FILENAME_MAX); va_start(args, fmt); vsnprintf(errstr, FILENAME_MAX, fmt, args); va_end(args); - attrs = getattrs(stdscr); - attrset(A_NORMAL); - mvaddstr(OnVTY ? VTY_STATLINE : TTY_STATLINE, 0, errstr); + memset(line, ' ', 80); + for (i = 0; i < 80; i++) { + if (errstr[i]) + line[i] = errstr[i]; + else + break; + } + line[80] = '\0'; + attrset(A_REVERSE); + mvaddstr(OnVTY ? VTY_STATLINE : TTY_STATLINE, 0, line); attrset(attrs); refresh(); if (OnVTY) { @@ -303,3 +314,24 @@ msgDebug(char *fmt, ...) write(DebugFD, dbg, strlen(dbg)); free(dbg); } + +/* Tell the user there's some output to go look at */ +void +msgWeHaveOutput(char *fmt, ...) +{ + va_list args; + char *errstr; + + errstr = (char *)safe_malloc(FILENAME_MAX); + va_start(args, fmt); + vsnprintf(errstr, FILENAME_MAX, fmt, args); + va_end(args); + use_helpline(NULL); + use_helpfile(NULL); + msgDebug("Notify: %s\n", errstr); + dialog_clear(); + dialog_msgbox("Information Dialog", errstr, -1, -1, 0); + free(errstr); + if (OnVTY) + msgInfo("Command output is on debugging screen - type ALT-F2 to see it"); +} |
