diff options
author | jkh <jkh@FreeBSD.org> | 1995-05-01 21:56:32 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1995-05-01 21:56:32 +0000 |
commit | e3598880e349017837533ba4e1967b87751ddeff (patch) | |
tree | 66e8a7a94085501f4c4c4f035003b8f42ba879d5 /usr.sbin/sysinstall/msg.c | |
parent | d0d51976ab3315b9d155a3551f319e36b88b260c (diff) | |
download | FreeBSD-src-e3598880e349017837533ba4e1967b87751ddeff.zip FreeBSD-src-e3598880e349017837533ba4e1967b87751ddeff.tar.gz |
Commit my latest changes before having a nap. Still not close to done,
nor is it in sync with my working sources, but it leaves me less CVS hassles
to bring in the new files at this time. Still no documentation to translate
quite yet, but soon. This stuff is actually very close now.
Diffstat (limited to 'usr.sbin/sysinstall/msg.c')
-rw-r--r-- | usr.sbin/sysinstall/msg.c | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/usr.sbin/sysinstall/msg.c b/usr.sbin/sysinstall/msg.c index c9fd5ce..bbb918b 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$ + * $Id: msg.c,v 1.1.1.1 1995/04/27 12:50:34 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -129,3 +129,38 @@ msgFatal(char *fmt, ...) systemShutdown(); } +/* Put up a message in a popup confirmation box */ +void +msgConfirm(char *fmt, ...) +{ + va_list args; + char *errstr; + + errstr = (char *)malloc(FILENAME_MAX); + va_start(args, fmt); + vsnprintf(errstr, FILENAME_MAX, fmt, args); + va_end(args); + use_helpline(NULL); + use_helpfile(NULL); + dialog_mesgbox("User Confirmation Request", errstr, -1, -1); + free(errstr); +} + +/* Put up a message in a popup yes/no box and return 1 for YES, 0 for NO */ +int +msgYesNo(char *fmt, ...) +{ + va_list args; + char *errstr; + int ret; + + errstr = (char *)malloc(FILENAME_MAX); + va_start(args, fmt); + vsnprintf(errstr, FILENAME_MAX, fmt, args); + va_end(args); + use_helpline(NULL); + use_helpfile(NULL); + ret = dialog_yesno("User Confirmation Request", errstr, -1, -1); + free(errstr); + return ret; +} |