Add --prgbox option to test new prgbox() function

This commit is contained in:
Andrey A. Chernov 1994-10-28 03:12:46 +00:00
parent 3f20de5a5f
commit 78e71dffd1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=3951
2 changed files with 18 additions and 2 deletions

View File

@ -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

View File

@ -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>\