From ef4e01e47291ccde39ac2a102b512b740c5625d8 Mon Sep 17 00:00:00 2001 From: ache Date: Fri, 28 Oct 1994 03:12:46 +0000 Subject: Add --prgbox option to test new prgbox() function --- gnu/usr.bin/dialog/Makefile | 4 ++-- gnu/usr.bin/dialog/dialog.c | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) (limited to 'gnu/usr.bin/dialog') 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 \ \n --msgbox \ +\n --prgbox \"\" \ \n --infobox \ \n --inputbox \ \n --textbox \ -- cgit v1.1