summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1994-10-28 03:12:46 +0000
committerache <ache@FreeBSD.org>1994-10-28 03:12:46 +0000
commitef4e01e47291ccde39ac2a102b512b740c5625d8 (patch)
treeb27392a531c8201d4312ef27e8748ae65a8d9039 /gnu
parenta984cc06a4664f37ee078344f9d75728f8d68a75 (diff)
downloadFreeBSD-src-ef4e01e47291ccde39ac2a102b512b740c5625d8.zip
FreeBSD-src-ef4e01e47291ccde39ac2a102b512b740c5625d8.tar.gz
Add --prgbox option to test new prgbox() function
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/dialog/Makefile4
-rw-r--r--gnu/usr.bin/dialog/dialog.c16
2 files changed, 18 insertions, 2 deletions
diff --git a/gnu/usr.bin/dialog/Makefile b/gnu/usr.bin/dialog/Makefile
index 0a19e46..436519a 100644
--- a/gnu/usr.bin/dialog/Makefile
+++ b/gnu/usr.bin/dialog/Makefile
@@ -1,10 +1,10 @@
# Makefile for dialog
-# $Id: Makefile,v 1.2 1994/10/09 00:46:16 pst Exp $
+# $Id: Makefile,v 1.3 1994/10/11 23:51:06 ache Exp $
PROG= dialog
MAN1= dialog.1
-CFLAGS+= -Wall -Wstrict-prototypes -DHAVE_NCURSES
+CFLAGS+= -Wall -Wstrict-prototypes
DPADD+= $(LIBDIALOG) $(LIBNCURSES) $(LIBMYTINFO)
LDADD+= -ldialog -lncurses -lmytinfo
diff --git a/gnu/usr.bin/dialog/dialog.c b/gnu/usr.bin/dialog/dialog.c
index b79a423..ead70f0 100644
--- a/gnu/usr.bin/dialog/dialog.c
+++ b/gnu/usr.bin/dialog/dialog.c
@@ -176,6 +176,21 @@ int main(int argc, unsigned char *argv[])
end_dialog();
return retval;
}
+ else if (!strcmp(argv[offset+1], "--prgbox")) {
+ if (argc-offset != 5) {
+ Usage(argv[0]);
+ exit(-1);
+ }
+ init_dialog();
+ retval = dialog_prgbox(title, argv[offset+2], atoi(argv[offset+3]),
+ atoi(argv[offset+4]), TRUE, TRUE);
+
+ dialog_update();
+ if (clear_screen) /* clear screen before exit */
+ dialog_clear();
+ end_dialog();
+ return retval;
+ }
else if (!strcmp(argv[offset+1], "--infobox")) {
if (argc-offset != 5) {
Usage(argv[0]);
@@ -316,6 +331,7 @@ void Usage(unsigned char *name)
\n\
\n --yesno <text> <height> <width>\
\n --msgbox <text> <height> <width>\
+\n --prgbox \"<command line>\" <height> <width>\
\n --infobox <text> <height> <width>\
\n --inputbox <text> <height> <width>\
\n --textbox <file> <height> <width>\
OpenPOWER on IntegriCloud