diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2011-01-12 14:55:02 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2011-01-12 14:55:02 +0000 |
commit | 3d4e8889889e5e36302454225999f7e146d3219c (patch) | |
tree | fa315b999f531039df54ab7af8e99f7e8daad77c /gnu | |
parent | b905920a72950a63c9782b4911d252bfac08db6e (diff) | |
download | FreeBSD-src-3d4e8889889e5e36302454225999f7e146d3219c.zip FreeBSD-src-3d4e8889889e5e36302454225999f7e146d3219c.tar.gz |
Update dialog to version 20100428. This changes the license under which
dialog is distributed from GPLv2 to LGPLv2 and introduces a number of new
features and a new and better libdialog API. The existing libdialog will
be kept temporarily as libodialog for compatibility purposes until sade,
sysinstall and tzsetup have been either updated or replaced.
__FreeBSD_version is now 900030.
Discussed on: -current
Approved by: core
Obtained from: http://invisible-island.net/dialog
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/lib/Makefile | 3 | ||||
-rw-r--r-- | gnu/lib/libdialog/Makefile | 58 | ||||
-rw-r--r-- | gnu/lib/libdialog/dlg_config.h | 91 | ||||
-rw-r--r-- | gnu/lib/libodialog/CHANGES (renamed from gnu/lib/libdialog/CHANGES) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/COPYING (renamed from gnu/lib/libdialog/COPYING) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/Makefile | 24 | ||||
-rw-r--r-- | gnu/lib/libodialog/README (renamed from gnu/lib/libdialog/README) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/TESTS/Makefile (renamed from gnu/lib/libdialog/TESTS/Makefile) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/TESTS/check1.c (renamed from gnu/lib/libdialog/TESTS/check1.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/TESTS/check2.c (renamed from gnu/lib/libdialog/TESTS/check2.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/TESTS/check3.c (renamed from gnu/lib/libdialog/TESTS/check3.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/TESTS/dselect.c (renamed from gnu/lib/libdialog/TESTS/dselect.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/TESTS/fselect.c (renamed from gnu/lib/libdialog/TESTS/fselect.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/TESTS/ftree1.c (renamed from gnu/lib/libdialog/TESTS/ftree1.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/TESTS/ftree1.test (renamed from gnu/lib/libdialog/TESTS/ftree1.test) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/TESTS/ftree2.c (renamed from gnu/lib/libdialog/TESTS/ftree2.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/TESTS/ftree2.test (renamed from gnu/lib/libdialog/TESTS/ftree2.test) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/TESTS/gauge.c (renamed from gnu/lib/libdialog/TESTS/gauge.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/TESTS/input1.c (renamed from gnu/lib/libdialog/TESTS/input1.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/TESTS/input2.c (renamed from gnu/lib/libdialog/TESTS/input2.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/TESTS/menu1.c (renamed from gnu/lib/libdialog/TESTS/menu1.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/TESTS/menu2.c (renamed from gnu/lib/libdialog/TESTS/menu2.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/TESTS/menu3.c (renamed from gnu/lib/libdialog/TESTS/menu3.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/TESTS/msg.c (renamed from gnu/lib/libdialog/TESTS/msg.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/TESTS/prgbox.c (renamed from gnu/lib/libdialog/TESTS/prgbox.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/TESTS/radio1.c (renamed from gnu/lib/libdialog/TESTS/radio1.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/TESTS/radio2.c (renamed from gnu/lib/libdialog/TESTS/radio2.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/TESTS/radio3.c (renamed from gnu/lib/libdialog/TESTS/radio3.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/TESTS/text.c (renamed from gnu/lib/libdialog/TESTS/text.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/TESTS/tree.c (renamed from gnu/lib/libdialog/TESTS/tree.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/TESTS/yesno.c (renamed from gnu/lib/libdialog/TESTS/yesno.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/TODO (renamed from gnu/lib/libdialog/TODO) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/checklist.c (renamed from gnu/lib/libdialog/checklist.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/colors.h (renamed from gnu/lib/libdialog/colors.h) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/dialog.3 (renamed from gnu/lib/libdialog/dialog.3) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/dialog.h (renamed from gnu/lib/libdialog/dialog.h) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/dialog.priv.h (renamed from gnu/lib/libdialog/dialog.priv.h) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/dir.c (renamed from gnu/lib/libdialog/dir.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/dir.h (renamed from gnu/lib/libdialog/dir.h) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/fselect.c (renamed from gnu/lib/libdialog/fselect.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/gauge.c (renamed from gnu/lib/libdialog/gauge.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/help.c (renamed from gnu/lib/libdialog/help.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/inputbox.c (renamed from gnu/lib/libdialog/inputbox.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/kernel.c (renamed from gnu/lib/libdialog/kernel.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/lineedit.c (renamed from gnu/lib/libdialog/lineedit.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/menubox.c (renamed from gnu/lib/libdialog/menubox.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/msgbox.c (renamed from gnu/lib/libdialog/msgbox.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/notify.c (renamed from gnu/lib/libdialog/notify.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/prgbox.c (renamed from gnu/lib/libdialog/prgbox.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/radiolist.c (renamed from gnu/lib/libdialog/radiolist.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/raw_popen.c (renamed from gnu/lib/libdialog/raw_popen.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/rc.c (renamed from gnu/lib/libdialog/rc.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/rc.h (renamed from gnu/lib/libdialog/rc.h) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/textbox.c (renamed from gnu/lib/libdialog/textbox.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/tree.c (renamed from gnu/lib/libdialog/tree.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/ui_objects.c (renamed from gnu/lib/libdialog/ui_objects.c) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/ui_objects.h (renamed from gnu/lib/libdialog/ui_objects.h) | 0 | ||||
-rw-r--r-- | gnu/lib/libodialog/yesno.c (renamed from gnu/lib/libdialog/yesno.c) | 0 | ||||
-rw-r--r-- | gnu/usr.bin/dialog/COPYING | 339 | ||||
-rw-r--r-- | gnu/usr.bin/dialog/Makefile | 16 | ||||
-rw-r--r-- | gnu/usr.bin/dialog/README | 161 | ||||
-rw-r--r-- | gnu/usr.bin/dialog/README.lib | 3 | ||||
-rw-r--r-- | gnu/usr.bin/dialog/TESTS/Makefile | 8 | ||||
-rw-r--r-- | gnu/usr.bin/dialog/TESTS/README | 15 | ||||
-rwxr-xr-x | gnu/usr.bin/dialog/TESTS/checklist | 33 | ||||
-rwxr-xr-x | gnu/usr.bin/dialog/TESTS/ftreebox | 27 | ||||
-rwxr-xr-x | gnu/usr.bin/dialog/TESTS/infobox | 15 | ||||
-rwxr-xr-x | gnu/usr.bin/dialog/TESTS/inputbox | 28 | ||||
-rwxr-xr-x | gnu/usr.bin/dialog/TESTS/menubox | 35 | ||||
-rwxr-xr-x | gnu/usr.bin/dialog/TESTS/msgbox | 14 | ||||
-rwxr-xr-x | gnu/usr.bin/dialog/TESTS/prgbox | 12 | ||||
-rwxr-xr-x | gnu/usr.bin/dialog/TESTS/radiolist | 33 | ||||
-rwxr-xr-x | gnu/usr.bin/dialog/TESTS/textbox | 42 | ||||
-rwxr-xr-x | gnu/usr.bin/dialog/TESTS/treebox | 25 | ||||
-rwxr-xr-x | gnu/usr.bin/dialog/TESTS/yesno | 23 | ||||
-rw-r--r-- | gnu/usr.bin/dialog/dialog.1 | 326 | ||||
-rw-r--r-- | gnu/usr.bin/dialog/dialog.c | 394 |
77 files changed, 138 insertions, 1587 deletions
diff --git a/gnu/lib/Makefile b/gnu/lib/Makefile index 00b77e2..cae52c3 100644 --- a/gnu/lib/Makefile +++ b/gnu/lib/Makefile @@ -2,7 +2,8 @@ .include <bsd.own.mk> -SUBDIR= csu libgcc libgcov libdialog libgomp libregex libreadline libssp +SUBDIR= csu libgcc libgcov libdialog libgomp libodialog libregex libreadline \ + libssp # libsupc++ uses libstdc++ headers, although 'make includes' should # have taken care of that already. diff --git a/gnu/lib/libdialog/Makefile b/gnu/lib/libdialog/Makefile index 49e9d0f..5d1c84b 100644 --- a/gnu/lib/libdialog/Makefile +++ b/gnu/lib/libdialog/Makefile @@ -1,47 +1,19 @@ -# Makefile for libdialog # $FreeBSD$ -.include <bsd.own.mk> - -LIB= dialog -INCS= dialog.h -MAN= dialog.3 - -SHLIB_MAJOR= 7 -SRCS= kernel.c rc.c checklist.c inputbox.c menubox.c msgbox.c \ - lineedit.c radiolist.c textbox.c yesno.c prgbox.c raw_popen.c \ - fselect.c ui_objects.c dir.c notify.c help.c gauge.c tree.c - -EXAMPLES= Makefile check1.c check2.c check3.c dselect.c fselect.c \ - ftree1.c ftree1.test ftree2.c ftree2.test gauge.c input1.c \ - input2.c menu1.c menu2.c menu3.c msg.c prgbox.c radio1.c \ - radio2.c radio3.c text.c tree.c yesno.c - -CFLAGS+= -I${.CURDIR} -Wall -Wstrict-prototypes -DLOCALE - -DPADD= ${LIBNCURSES} -LDADD= -lncurses - -.if ${MK_HTML} != "no" -FILES= ${EXAMPLES:C;^;${.CURDIR}/TESTS/;} -FILESDIR= ${SHAREDIR}/examples/libdialog -.endif - -MLINKS+=dialog.3 draw_shadow.3 dialog.3 draw_box.3 \ - dialog.3 line_edit.3 dialog.3 strheight.3 \ - dialog.3 strwidth.3 dialog.3 dialog_create_rc.3 \ - dialog.3 dialog_yesno.3 dialog.3 dialog_noyes.3 \ - dialog.3 dialog_prgbox.3 \ - dialog.3 dialog_textbox.3 dialog.3 dialog_menu.3 \ - dialog.3 dialog_checklist.3 dialog.3 dialog_radiolist.3 \ - dialog.3 dialog_inputbox.3 dialog.3 dialog_clear_norefresh.3 \ - dialog.3 dialog_clear.3 dialog.3 dialog_update.3 \ - dialog.3 dialog_fselect.3 dialog.3 dialog_notify.3 \ - dialog.3 dialog_mesgbox.3 dialog.3 dialog_gauge.3 \ - dialog.3 init_dialog.3 dialog.3 end_dialog.3 \ - dialog.3 use_helpfile.3 dialog.3 use_helpline.3 \ - dialog.3 get_helpline.3 dialog.3 restore_helpline.3 \ - dialog.3 dialog_msgbox.3 dialog.3 dialog_ftree.3 \ - dialog.3 dialog_tree.3 +DIALOG= ${.CURDIR}/../../../contrib/dialog + +LIB= dialog +SHLIB_MAJOR= 7 +SRCS= arrows.c buttons.c calendar.c checklist.c columns.c dlg_keys.c \ + editbox.c fselect.c formbox.c guage.c inputbox.c inputstr.c \ + menubox.c mixedform.c mixedgauge.c mouse.c mousewget.c \ + msgbox.c pause.c progressbox.c rc.c tailbox.c textbox.c \ + timebox.c trace.c ui_getc.c util.c version.c yesno.c +INCS= dialog.h dlg_colors.h dlg_config.h dlg_keys.h +MAN= dialog.3 + +CFLAGS+= -I${.CURDIR} -I${DIALOG} +.PATH: ${DIALOG} +WARNS?= 3 .include <bsd.lib.mk> diff --git a/gnu/lib/libdialog/dlg_config.h b/gnu/lib/libdialog/dlg_config.h new file mode 100644 index 0000000..ffe205b --- /dev/null +++ b/gnu/lib/libdialog/dlg_config.h @@ -0,0 +1,91 @@ +/* dlg_config.h. Generated automatically by configure. */ +/* + * The configure script expands this as a set of definitions + * + * $FreeBSD$ + */ + + +#define DIALOG_PATCHDATE 20100428 +#define DIALOG_VERSION "1.1" +#define HAVE_ALLOCA 1 +#define HAVE_COLOR 1 +#define HAVE_CURSES_H 1 +#define HAVE_DIRENT_H 1 +#define HAVE_DLG_FORMBOX 1 +#define HAVE_DLG_GAUGE 1 +#define HAVE_DLG_MIXEDFORM 1 +#define HAVE_DLG_TAILBOX 1 +#define HAVE_DLG_TRACE 1 +#define HAVE_FEOF_UNLOCKED 1 +#define HAVE_FLUSHINP 1 +#define HAVE_FSEEKO 1 +#define HAVE_GETBEGX 1 +#define HAVE_GETBEGY 1 +#define HAVE_GETBEGYX 1 +#define HAVE_GETCURX 1 +#define HAVE_GETCURY 1 +#define HAVE_GETCWD 1 +#define HAVE_GETEGID 1 +#define HAVE_GETEUID 1 +#define HAVE_GETGID 1 +#define HAVE_GETMAXX 1 +#define HAVE_GETMAXY 1 +#define HAVE_GETMAXYX 1 +#define HAVE_GETPAGESIZE 1 +#define HAVE_GETPARX 1 +#define HAVE_GETPARY 1 +#define HAVE_GETPARYX 1 +#define HAVE_GETUID 1 +#define HAVE_ICONV 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_LANGINFO_CODESET 1 +#define HAVE_LC_MESSAGES 1 +#define HAVE_LIMITS_H 1 +#define HAVE_LOCALE_H 1 +#define HAVE_MBSTATE_T 1 +#define HAVE_MEMORY_H 1 +#define HAVE_MIXEDGAUGE 1 +#define HAVE_MMAP 1 +#define HAVE_MUNMAP 1 +#define HAVE_NL_TYPES_H 1 +#define HAVE_PUTENV 1 +#define HAVE_RC_FILE 1 +#define HAVE_SEARCH_H 1 +#define HAVE_SETENV 1 +#define HAVE_SETLOCALE 1 +#define HAVE_STDDEF_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STPCPY 1 +#define HAVE_STRCASECMP 1 +#define HAVE_STRCHR 1 +#define HAVE_STRDUP 1 +#define HAVE_STRFTIME 1 +#define HAVE_STRINGS_H 1 +#define HAVE_STRING_H 1 +#define HAVE_STRTOUL 1 +#define HAVE_SYS_PARAM_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_WAIT_H 1 +#define HAVE_TERM_H 1 +#define HAVE_TSEARCH 1 +#define HAVE_TYPE_CHTYPE 1 +#define HAVE_UNCTRL_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_USE_DEFAULT_COLORS 1 +#define HAVE_WAITPID 1 +#define HAVE_WGET_WCH 1 +#define HAVE_XDIALOG 1 +#define HAVE__NC_FREE_AND_EXIT 1 +#define ICONV_CONST const +#define MIXEDCASE_FILENAMES 1 +#define NCURSES 1 +#define NEED_WCHAR_H 1 +#define PACKAGE "dialog" +#define RETSIGTYPE void +#define STDC_HEADERS 1 +#define SYSTEM_NAME "freebsd9.0" +#define TIME_WITH_SYS_TIME 1 +#define TYPE_CHTYPE_IS_SCALAR 1 diff --git a/gnu/lib/libdialog/CHANGES b/gnu/lib/libodialog/CHANGES index 1467a0e..1467a0e 100644 --- a/gnu/lib/libdialog/CHANGES +++ b/gnu/lib/libodialog/CHANGES diff --git a/gnu/lib/libdialog/COPYING b/gnu/lib/libodialog/COPYING index a43ea21..a43ea21 100644 --- a/gnu/lib/libdialog/COPYING +++ b/gnu/lib/libodialog/COPYING diff --git a/gnu/lib/libodialog/Makefile b/gnu/lib/libodialog/Makefile new file mode 100644 index 0000000..b03bb4a --- /dev/null +++ b/gnu/lib/libodialog/Makefile @@ -0,0 +1,24 @@ +# Makefile for libdialog +# $FreeBSD$ + +.include <bsd.own.mk> + +LIB= odialog +#MAN= NOMAN + +SHLIB_MAJOR= 7 +SRCS= kernel.c rc.c checklist.c inputbox.c menubox.c msgbox.c \ + lineedit.c radiolist.c textbox.c yesno.c prgbox.c raw_popen.c \ + fselect.c ui_objects.c dir.c notify.c help.c gauge.c tree.c + +CFLAGS+= -I${.CURDIR} -Wall -Wstrict-prototypes -DLOCALE + +DPADD= ${LIBNCURSES} +LDADD= -lncurses + +.if ${MK_HTML} != "no" +FILES= ${EXAMPLES:C;^;${.CURDIR}/TESTS/;} +FILESDIR= ${SHAREDIR}/examples/libdialog +.endif + +.include <bsd.lib.mk> diff --git a/gnu/lib/libdialog/README b/gnu/lib/libodialog/README index e5e6d56..e5e6d56 100644 --- a/gnu/lib/libdialog/README +++ b/gnu/lib/libodialog/README diff --git a/gnu/lib/libdialog/TESTS/Makefile b/gnu/lib/libodialog/TESTS/Makefile index 65e3d71..65e3d71 100644 --- a/gnu/lib/libdialog/TESTS/Makefile +++ b/gnu/lib/libodialog/TESTS/Makefile diff --git a/gnu/lib/libdialog/TESTS/check1.c b/gnu/lib/libodialog/TESTS/check1.c index a2bec62..a2bec62 100644 --- a/gnu/lib/libdialog/TESTS/check1.c +++ b/gnu/lib/libodialog/TESTS/check1.c diff --git a/gnu/lib/libdialog/TESTS/check2.c b/gnu/lib/libodialog/TESTS/check2.c index 3608261..3608261 100644 --- a/gnu/lib/libdialog/TESTS/check2.c +++ b/gnu/lib/libodialog/TESTS/check2.c diff --git a/gnu/lib/libdialog/TESTS/check3.c b/gnu/lib/libodialog/TESTS/check3.c index f117bd6..f117bd6 100644 --- a/gnu/lib/libdialog/TESTS/check3.c +++ b/gnu/lib/libodialog/TESTS/check3.c diff --git a/gnu/lib/libdialog/TESTS/dselect.c b/gnu/lib/libodialog/TESTS/dselect.c index 1110379..1110379 100644 --- a/gnu/lib/libdialog/TESTS/dselect.c +++ b/gnu/lib/libodialog/TESTS/dselect.c diff --git a/gnu/lib/libdialog/TESTS/fselect.c b/gnu/lib/libodialog/TESTS/fselect.c index 6cefaf3..6cefaf3 100644 --- a/gnu/lib/libdialog/TESTS/fselect.c +++ b/gnu/lib/libodialog/TESTS/fselect.c diff --git a/gnu/lib/libdialog/TESTS/ftree1.c b/gnu/lib/libodialog/TESTS/ftree1.c index f21e0e5..f21e0e5 100644 --- a/gnu/lib/libdialog/TESTS/ftree1.c +++ b/gnu/lib/libodialog/TESTS/ftree1.c diff --git a/gnu/lib/libdialog/TESTS/ftree1.test b/gnu/lib/libodialog/TESTS/ftree1.test index 4a8f0fa..4a8f0fa 100644 --- a/gnu/lib/libdialog/TESTS/ftree1.test +++ b/gnu/lib/libodialog/TESTS/ftree1.test diff --git a/gnu/lib/libdialog/TESTS/ftree2.c b/gnu/lib/libodialog/TESTS/ftree2.c index aa4663a..aa4663a 100644 --- a/gnu/lib/libdialog/TESTS/ftree2.c +++ b/gnu/lib/libodialog/TESTS/ftree2.c diff --git a/gnu/lib/libdialog/TESTS/ftree2.test b/gnu/lib/libodialog/TESTS/ftree2.test index 0850862..0850862 100644 --- a/gnu/lib/libdialog/TESTS/ftree2.test +++ b/gnu/lib/libodialog/TESTS/ftree2.test diff --git a/gnu/lib/libdialog/TESTS/gauge.c b/gnu/lib/libodialog/TESTS/gauge.c index bf0cfc9..bf0cfc9 100644 --- a/gnu/lib/libdialog/TESTS/gauge.c +++ b/gnu/lib/libodialog/TESTS/gauge.c diff --git a/gnu/lib/libdialog/TESTS/input1.c b/gnu/lib/libodialog/TESTS/input1.c index 3751071..3751071 100644 --- a/gnu/lib/libdialog/TESTS/input1.c +++ b/gnu/lib/libodialog/TESTS/input1.c diff --git a/gnu/lib/libdialog/TESTS/input2.c b/gnu/lib/libodialog/TESTS/input2.c index 827c052..827c052 100644 --- a/gnu/lib/libdialog/TESTS/input2.c +++ b/gnu/lib/libodialog/TESTS/input2.c diff --git a/gnu/lib/libdialog/TESTS/menu1.c b/gnu/lib/libodialog/TESTS/menu1.c index 640157a..640157a 100644 --- a/gnu/lib/libdialog/TESTS/menu1.c +++ b/gnu/lib/libodialog/TESTS/menu1.c diff --git a/gnu/lib/libdialog/TESTS/menu2.c b/gnu/lib/libodialog/TESTS/menu2.c index 1545cd8..1545cd8 100644 --- a/gnu/lib/libdialog/TESTS/menu2.c +++ b/gnu/lib/libodialog/TESTS/menu2.c diff --git a/gnu/lib/libdialog/TESTS/menu3.c b/gnu/lib/libodialog/TESTS/menu3.c index 3a7a137..3a7a137 100644 --- a/gnu/lib/libdialog/TESTS/menu3.c +++ b/gnu/lib/libodialog/TESTS/menu3.c diff --git a/gnu/lib/libdialog/TESTS/msg.c b/gnu/lib/libodialog/TESTS/msg.c index c6f590f..c6f590f 100644 --- a/gnu/lib/libdialog/TESTS/msg.c +++ b/gnu/lib/libodialog/TESTS/msg.c diff --git a/gnu/lib/libdialog/TESTS/prgbox.c b/gnu/lib/libodialog/TESTS/prgbox.c index 2da4611..2da4611 100644 --- a/gnu/lib/libdialog/TESTS/prgbox.c +++ b/gnu/lib/libodialog/TESTS/prgbox.c diff --git a/gnu/lib/libdialog/TESTS/radio1.c b/gnu/lib/libodialog/TESTS/radio1.c index c4eeffd..c4eeffd 100644 --- a/gnu/lib/libdialog/TESTS/radio1.c +++ b/gnu/lib/libodialog/TESTS/radio1.c diff --git a/gnu/lib/libdialog/TESTS/radio2.c b/gnu/lib/libodialog/TESTS/radio2.c index 15e353c..15e353c 100644 --- a/gnu/lib/libdialog/TESTS/radio2.c +++ b/gnu/lib/libodialog/TESTS/radio2.c diff --git a/gnu/lib/libdialog/TESTS/radio3.c b/gnu/lib/libodialog/TESTS/radio3.c index 2175358..2175358 100644 --- a/gnu/lib/libdialog/TESTS/radio3.c +++ b/gnu/lib/libodialog/TESTS/radio3.c diff --git a/gnu/lib/libdialog/TESTS/text.c b/gnu/lib/libodialog/TESTS/text.c index e071937..e071937 100644 --- a/gnu/lib/libdialog/TESTS/text.c +++ b/gnu/lib/libodialog/TESTS/text.c diff --git a/gnu/lib/libdialog/TESTS/tree.c b/gnu/lib/libodialog/TESTS/tree.c index c69b52e..c69b52e 100644 --- a/gnu/lib/libdialog/TESTS/tree.c +++ b/gnu/lib/libodialog/TESTS/tree.c diff --git a/gnu/lib/libdialog/TESTS/yesno.c b/gnu/lib/libodialog/TESTS/yesno.c index 647b51c..647b51c 100644 --- a/gnu/lib/libdialog/TESTS/yesno.c +++ b/gnu/lib/libodialog/TESTS/yesno.c diff --git a/gnu/lib/libdialog/TODO b/gnu/lib/libodialog/TODO index 132a4a4..132a4a4 100644 --- a/gnu/lib/libdialog/TODO +++ b/gnu/lib/libodialog/TODO diff --git a/gnu/lib/libdialog/checklist.c b/gnu/lib/libodialog/checklist.c index e349ca6..e349ca6 100644 --- a/gnu/lib/libdialog/checklist.c +++ b/gnu/lib/libodialog/checklist.c diff --git a/gnu/lib/libdialog/colors.h b/gnu/lib/libodialog/colors.h index 7cea0a0..7cea0a0 100644 --- a/gnu/lib/libdialog/colors.h +++ b/gnu/lib/libodialog/colors.h diff --git a/gnu/lib/libdialog/dialog.3 b/gnu/lib/libodialog/dialog.3 index 2e4b8fb..2e4b8fb 100644 --- a/gnu/lib/libdialog/dialog.3 +++ b/gnu/lib/libodialog/dialog.3 diff --git a/gnu/lib/libdialog/dialog.h b/gnu/lib/libodialog/dialog.h index 369b139..369b139 100644 --- a/gnu/lib/libdialog/dialog.h +++ b/gnu/lib/libodialog/dialog.h diff --git a/gnu/lib/libdialog/dialog.priv.h b/gnu/lib/libodialog/dialog.priv.h index 06c01a5..06c01a5 100644 --- a/gnu/lib/libdialog/dialog.priv.h +++ b/gnu/lib/libodialog/dialog.priv.h diff --git a/gnu/lib/libdialog/dir.c b/gnu/lib/libodialog/dir.c index 5348c2f..5348c2f 100644 --- a/gnu/lib/libdialog/dir.c +++ b/gnu/lib/libodialog/dir.c diff --git a/gnu/lib/libdialog/dir.h b/gnu/lib/libodialog/dir.h index eadc0c5..eadc0c5 100644 --- a/gnu/lib/libdialog/dir.h +++ b/gnu/lib/libodialog/dir.h diff --git a/gnu/lib/libdialog/fselect.c b/gnu/lib/libodialog/fselect.c index 6669edc..6669edc 100644 --- a/gnu/lib/libdialog/fselect.c +++ b/gnu/lib/libodialog/fselect.c diff --git a/gnu/lib/libdialog/gauge.c b/gnu/lib/libodialog/gauge.c index d8138f6..d8138f6 100644 --- a/gnu/lib/libdialog/gauge.c +++ b/gnu/lib/libodialog/gauge.c diff --git a/gnu/lib/libdialog/help.c b/gnu/lib/libodialog/help.c index de49c6a..de49c6a 100644 --- a/gnu/lib/libdialog/help.c +++ b/gnu/lib/libodialog/help.c diff --git a/gnu/lib/libdialog/inputbox.c b/gnu/lib/libodialog/inputbox.c index 1f61ed5..1f61ed5 100644 --- a/gnu/lib/libdialog/inputbox.c +++ b/gnu/lib/libodialog/inputbox.c diff --git a/gnu/lib/libdialog/kernel.c b/gnu/lib/libodialog/kernel.c index 9ed5eac..9ed5eac 100644 --- a/gnu/lib/libdialog/kernel.c +++ b/gnu/lib/libodialog/kernel.c diff --git a/gnu/lib/libdialog/lineedit.c b/gnu/lib/libodialog/lineedit.c index 7bfe0e0..7bfe0e0 100644 --- a/gnu/lib/libdialog/lineedit.c +++ b/gnu/lib/libodialog/lineedit.c diff --git a/gnu/lib/libdialog/menubox.c b/gnu/lib/libodialog/menubox.c index a01acd5..a01acd5 100644 --- a/gnu/lib/libdialog/menubox.c +++ b/gnu/lib/libodialog/menubox.c diff --git a/gnu/lib/libdialog/msgbox.c b/gnu/lib/libodialog/msgbox.c index 41d78c8..41d78c8 100644 --- a/gnu/lib/libdialog/msgbox.c +++ b/gnu/lib/libodialog/msgbox.c diff --git a/gnu/lib/libdialog/notify.c b/gnu/lib/libodialog/notify.c index 7fc22eb..7fc22eb 100644 --- a/gnu/lib/libdialog/notify.c +++ b/gnu/lib/libodialog/notify.c diff --git a/gnu/lib/libdialog/prgbox.c b/gnu/lib/libodialog/prgbox.c index bcafacf..bcafacf 100644 --- a/gnu/lib/libdialog/prgbox.c +++ b/gnu/lib/libodialog/prgbox.c diff --git a/gnu/lib/libdialog/radiolist.c b/gnu/lib/libodialog/radiolist.c index 4b865a6..4b865a6 100644 --- a/gnu/lib/libdialog/radiolist.c +++ b/gnu/lib/libodialog/radiolist.c diff --git a/gnu/lib/libdialog/raw_popen.c b/gnu/lib/libodialog/raw_popen.c index 163c09a..163c09a 100644 --- a/gnu/lib/libdialog/raw_popen.c +++ b/gnu/lib/libodialog/raw_popen.c diff --git a/gnu/lib/libdialog/rc.c b/gnu/lib/libodialog/rc.c index 36631a6..36631a6 100644 --- a/gnu/lib/libdialog/rc.c +++ b/gnu/lib/libodialog/rc.c diff --git a/gnu/lib/libdialog/rc.h b/gnu/lib/libodialog/rc.h index fc19d03..fc19d03 100644 --- a/gnu/lib/libdialog/rc.h +++ b/gnu/lib/libodialog/rc.h diff --git a/gnu/lib/libdialog/textbox.c b/gnu/lib/libodialog/textbox.c index 19a13bb..19a13bb 100644 --- a/gnu/lib/libdialog/textbox.c +++ b/gnu/lib/libodialog/textbox.c diff --git a/gnu/lib/libdialog/tree.c b/gnu/lib/libodialog/tree.c index ceacf05..ceacf05 100644 --- a/gnu/lib/libdialog/tree.c +++ b/gnu/lib/libodialog/tree.c diff --git a/gnu/lib/libdialog/ui_objects.c b/gnu/lib/libodialog/ui_objects.c index dde1513..dde1513 100644 --- a/gnu/lib/libdialog/ui_objects.c +++ b/gnu/lib/libodialog/ui_objects.c diff --git a/gnu/lib/libdialog/ui_objects.h b/gnu/lib/libodialog/ui_objects.h index b30feb8..b30feb8 100644 --- a/gnu/lib/libdialog/ui_objects.h +++ b/gnu/lib/libodialog/ui_objects.h diff --git a/gnu/lib/libdialog/yesno.c b/gnu/lib/libodialog/yesno.c index 24eb41a..24eb41a 100644 --- a/gnu/lib/libdialog/yesno.c +++ b/gnu/lib/libodialog/yesno.c diff --git a/gnu/usr.bin/dialog/COPYING b/gnu/usr.bin/dialog/COPYING deleted file mode 100644 index a43ea21..0000000 --- a/gnu/usr.bin/dialog/COPYING +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 675 Mass Ave, Cambridge, MA 02139, USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - Appendix: How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) 19yy <name of author> - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) 19yy name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - <signature of Ty Coon>, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/gnu/usr.bin/dialog/Makefile b/gnu/usr.bin/dialog/Makefile index 8e50ad3..bdda638 100644 --- a/gnu/usr.bin/dialog/Makefile +++ b/gnu/usr.bin/dialog/Makefile @@ -1,17 +1,13 @@ -# Makefile for dialog # $FreeBSD$ -.include <bsd.own.mk> - -.if ${MK_EXAMPLES} != "no" -SUBDIR= TESTS -.endif - +DIALOG= ${.CURDIR}/../../../contrib/dialog PROG= dialog -CFLAGS+= -Wall -Wstrict-prototypes - DPADD= $(LIBDIALOG) $(LIBNCURSES) -LDADD= -ldialog -lncurses +LDADD= -ldialog -lncursesw -lm +CFLAGS+= -I${.CURDIR} -I${DIALOG} +.PATH: ${DIALOG} + +WARNS?= 3 .include <bsd.prog.mk> diff --git a/gnu/usr.bin/dialog/README b/gnu/usr.bin/dialog/README deleted file mode 100644 index 975bdac..0000000 --- a/gnu/usr.bin/dialog/README +++ /dev/null @@ -1,161 +0,0 @@ - - dialog - Display dialog boxes in shell script (version 0.3) - =========================================================== - -This is a program that will enable you to present a variety of questions or -display messages using dialog boxes from a shell script. Currently, these -types of dialog boxes are implemented: yes/no box, menu box, input box, -message box, text box, info box, checklist box. The idea of writing this -program came from the fact that most questions asked in a shell script (and -many interactive programs as well) can be classified into these few types: - - - 1) One that requires the user to answer either yes or no. - - 2) One that presents a number of options for the user to choose. - - 3) One that requires the user to input a string. - - 4) One that displays a message and optionally wait for a key press - before continuing. - - 5) One that presents a list of options that can be turned on or off. - - -The program 'dialog' can, say for example, be called in a shell script to -present the first type of questions like this: - - - if dialog --yesno <question text> <height> <width> - then - ... - fi - - - e.g. if dialog --yesno "Do you want to continue?" 7 51 - then - echo "Continuing..." - else - echo "Aborting..." - fi - - -I've included a sample shell script for each type of boxes in the directory -samples. The program requires ncurses to compile. Running 'dialog' without -arguments will display the usage. - - - -FEATURES --------- - - * Friendly dialog box interface with buttons, etc. - - * Auto wrap around of question text if it's too long to fit on - one line. - - * "\n" can be inserted in question text to control line breaking - explicitly. The real newline character '\n' can also be used. - - * run-time configruation of color settings and other options using - a configuration file. - - - -WHAT'S NEW SINCE VERSION 0.21? ------------------------------- - - * some changes for faster screen update. - - * much more flexible color settings. Can use all 16 colors - (8 normal, 8 highlight) of the Linux console. - - * added run-time configuration using configuration file. - - * some minor bug fixes and cleanups for menubox, checklist and - textbox. - - * added a man page. - - * some changes for easier porting to other Unix systems (tested - on Ultrix, SunOS and HPUX) - - - -INSTALLATION ------------- - - 1. cd ./src - - 2. Go to step 3 if your system has ncurses (e.g. Linux). - Edit Makefile and remove -DHAVE_NCURSES from DEFS. Also - remove rc.c from SRCS and rc.o from OBJS. Change LIBS as - appropriate (Usually, it should be '-lcurses -ltermcap'). - Go to step 6. - - 3. Edit Makefile and remove -DBROKEN_WSCRL from DEFS if you - are using ncurses 1.8.3 or newer. Menu scrolling should - be faster. DON'T REMOVE IT IF YOU ARE NOT USING AT LEAST - VERSION 1.8.3 OF NCURSES. - - 4. Edit dialog.h and change USE_SHADOW to FALSE if you don't - want shadowed dialog boxes. Also change USE_COLORS to - FALSE if you don't want colors. Note that 'dialog' will - check if the terminal supports colors, and will use mono - settings if it doesn't, so USE_COLORS won't do any harm - even if you have a mono display. Also note that USE_SHADOW - implies USE_COLORS. These two options can be changed at - run-time using the run-time configuration file (see below). - - 5. Edit colors.h to change default color definitions if you - don't like the defaults. These are only compiled in defaults, - you can change them at run-time using the run-time - configuration file. - - 6. 'make depend; make install' will compile and install the - binaries in /usr/local/bin (change BINDIR in Makefile if - you want to install elsewhere). - - 7. 'make install.man' will install the man page to - /usr/local/man (change MANDIR in Makefile if you want to - install elsewhere). - - 8. You can then try the sample shell scripts in the samples - directory (make sure the environment variable DIALOG is - not set, the scripts use it to find the dialog binary, if - it's not set, "../src/dialog" will be used). - - 9. Don't forget to mail me (mail address at end of this file) - if you find any bugs, have some good color settings to - contribute or just want to tell me that you like it, Don't - mail me if you don't like it :-) - - - -RUN-TIME CONFIGURATION ----------------------- - - 1. Create a sample configuration file by typing: - - "dialog --create-rc <file>" - - 2. At start, 'dialog' determines the settings to use as follows: - - a) if environment variable DIALOGRC is set, it's value - determines the name of the configuration file. - - b) if the file in (a) can't be found, use the file - $HOME/.dialogrc as the configuration file. - - c) if the file in (b) can't be found, use compiled in - defaults. - - 3. Edit the sample configuration file and copy it to some place - that 'dialog' can find, as stated in step 2 above. - - - - -Comments and bug reports welcome. - -- Savio Lam (lam836@cs.cuhk.hk) diff --git a/gnu/usr.bin/dialog/README.lib b/gnu/usr.bin/dialog/README.lib deleted file mode 100644 index 472c206..0000000 --- a/gnu/usr.bin/dialog/README.lib +++ /dev/null @@ -1,3 +0,0 @@ -Now 'dialog' splitted to this sources and library of functions, -see /usr/src/gnu/lib/libdialog for details. - Ache. diff --git a/gnu/usr.bin/dialog/TESTS/Makefile b/gnu/usr.bin/dialog/TESTS/Makefile deleted file mode 100644 index 39eb15e..0000000 --- a/gnu/usr.bin/dialog/TESTS/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# $FreeBSD$ - -NO_OBJ= -FILES= README checklist ftreebox infobox inputbox menubox msgbox \ - prgbox radiolist textbox treebox yesno -FILESDIR= ${SHAREDIR}/examples/dialog - -.include <bsd.prog.mk> diff --git a/gnu/usr.bin/dialog/TESTS/README b/gnu/usr.bin/dialog/TESTS/README deleted file mode 100644 index 951fe3b..0000000 --- a/gnu/usr.bin/dialog/TESTS/README +++ /dev/null @@ -1,15 +0,0 @@ -These shell scripts demonstrate possibilities of the dialog(1) tool. - -checklist - checkbox list -ftreebox - file tree box -infobox - info box -inputbox - input box -menubox - menu -msgbox - message box -prgbox - program box -radiolist - radio button list -textbox - simple text box -treebox - tree box -yesno - yes/no dialog - -$FreeBSD$ diff --git a/gnu/usr.bin/dialog/TESTS/checklist b/gnu/usr.bin/dialog/TESTS/checklist deleted file mode 100755 index 008e874..0000000 --- a/gnu/usr.bin/dialog/TESTS/checklist +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -DIALOG=${DIALOG=/usr/bin/dialog} - -$DIALOG --title "CHECKLIST BOX" --clear \ - --checklist "Hi, this is a checklist box. You can use this to \n\ -present a list of choices which can be turned on or \n\ -off. If there are more items than can fit on the \n\ -screen, the list will be scrolled. You can use the \n\ -UP/DOWN arrow keys, the first letter of the choice as a\n\ -hot key, or the number keys 1-9 to choose an option. \n\ -Press SPACE to toggle an option on/off. \n\n\ - Which of the following are fruits?" -1 -1 5 \ - "Apple" "It's an apple." off \ - "Dog" "No, that's not my dog." ON \ - "Orange" "Yeah, that's juicy." off \ - "Cat" "No, never put a dog and a cat together!" oN \ - "Fish" "Cats like fish." On \ - "Lemon" "You know how it tastes." on 2> /tmp/checklist.tmp.$$ - -retval=$? - -choice=`cat /tmp/checklist.tmp.$$` -rm -f /tmp/checklist.tmp.$$ - -case $retval in - 0) - echo "'$choice' chosen.";; - 1) - echo "Cancel pressed.";; - 255) - [ -z "$choice" ] || echo $choice ; - echo "ESC pressed.";; -esac diff --git a/gnu/usr.bin/dialog/TESTS/ftreebox b/gnu/usr.bin/dialog/TESTS/ftreebox deleted file mode 100755 index 621dc1e..0000000 --- a/gnu/usr.bin/dialog/TESTS/ftreebox +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -DIALOG=${DIALOG=/usr/bin/dialog} - -find -xd / -type d > /tmp/ftreebox.tmp.$$ - -$DIALOG --clear --title "FTREE BOX" \ - --hline "Press arrows, TAB or Enter" \ - --hfile "../COPYING" \ - --ftree "/tmp/ftreebox.tmp.$$" "/" \ - "This is ftree box" \ - -1 -1 10 2>/tmp/ftree.tmp.$$ - -retval=$? - -choice=`cat /tmp/ftree.tmp.$$` - -case $retval in - 0) - echo "'$choice' chosen.";; - 1) - echo "Cancel pressed.";; - 255) - [ -z "$choice" ] || echo $choice ; - echo "ESC pressed.";; -esac - -rm -f /tmp/ftreebox.tmp.$$ /tmp/ftree.tmp.$$ diff --git a/gnu/usr.bin/dialog/TESTS/infobox b/gnu/usr.bin/dialog/TESTS/infobox deleted file mode 100755 index 89d4736..0000000 --- a/gnu/usr.bin/dialog/TESTS/infobox +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -DIALOG=${DIALOG=/usr/bin/dialog} - -$DIALOG --title "INFO BOX" \ - --infobox "Hi, this is an information box. It is -different from a message box in that it will -not pause waiting for input after displaying -the message. The pause here is only introduced -by the sleep command, not by dialog. - -You have 10 seconds to read this..." -1 -1 - -stty -echo -sleep 10 -stty echo diff --git a/gnu/usr.bin/dialog/TESTS/inputbox b/gnu/usr.bin/dialog/TESTS/inputbox deleted file mode 100755 index 2acb846..0000000 --- a/gnu/usr.bin/dialog/TESTS/inputbox +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -DIALOG=${DIALOG=/usr/bin/dialog} - -$DIALOG --title "INPUT BOX" --clear \ - --inputbox "Hi, this is an input dialog box. You can use \n\ -this to ask questions that require the user \n\ -to input a string as the answer. You can \n\ -input strings of length longer than the \n\ -width of the input box, in that case, the \n\ -input field will be automatically scrolled. \n\ -You can use BACKSPACE, LEFT, RIGHT, HOME, END\n\ -to correct errors. \n\n\ -Try inputing your name below:" -1 -1 "John Smith" 2> /tmp/inputbox.tmp.$$ - -retval=$? - -input=`cat /tmp/inputbox.tmp.$$` -rm -f /tmp/inputbox.tmp.$$ - -case $retval in - 0) - echo "Input string is '$input'";; - 1) - echo "Cancel pressed.";; - 255) - [ -z "$input" ] || echo $input ; - echo "ESC pressed.";; -esac diff --git a/gnu/usr.bin/dialog/TESTS/menubox b/gnu/usr.bin/dialog/TESTS/menubox deleted file mode 100755 index 39fe52f..0000000 --- a/gnu/usr.bin/dialog/TESTS/menubox +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -DIALOG=${DIALOG=/usr/bin/dialog} - -$DIALOG --clear --title "MENU BOX" \ - --hline "Press 1-9, Up/Down, first letter or Enter" \ - --menu "Hi, this is a menu box. You can use this to \n\ -present a list of choices for the user to \n\ -choose. If there are more items than can fit \n\ -on the screen, the menu will be scrolled. \n\ -You can use the UP/DOWN arrow keys, the first \n\ -letter of the choice as a hot key, or the \n\ -number keys 1-9 to choose an option.\n\ -Try it now!\n\n\ - Choose the OS you like:" -1 -1 4 \ - "FreeBSD" "A Real Operating System for Real Users" \ - "Linux" "Another free Unix Clone for 386/486" \ - "OS/2" "IBM OS/2" \ - "WIN NT" "Microsoft Windows NT" \ - "PCDOS" "IBM PC DOS" \ - "MSDOS" "Microsoft DOS" 2> /tmp/menu.tmp.$$ - -retval=$? - -choice=`cat /tmp/menu.tmp.$$` -rm -f /tmp/menu.tmp.$$ - -case $retval in - 0) - echo "'$choice' chosen.";; - 1) - echo "Cancel pressed.";; - 255) - [ -z "$choice" ] || echo $choice ; - echo "ESC pressed.";; -esac diff --git a/gnu/usr.bin/dialog/TESTS/msgbox b/gnu/usr.bin/dialog/TESTS/msgbox deleted file mode 100755 index 7f1b1f8..0000000 --- a/gnu/usr.bin/dialog/TESTS/msgbox +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -DIALOG=${DIALOG=/usr/bin/dialog} - -$DIALOG --title "MESSAGE BOX" --clear \ - --msgbox "Hi, this is a simple message box. You can use this to\n\ -display any message you like. The box will remain until\n\ -you press the ENTER key." -1 -1 - -case $? in - 0) - echo "OK";; - 255) - echo "ESC pressed.";; -esac diff --git a/gnu/usr.bin/dialog/TESTS/prgbox b/gnu/usr.bin/dialog/TESTS/prgbox deleted file mode 100755 index 5a631f5..0000000 --- a/gnu/usr.bin/dialog/TESTS/prgbox +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -DIALOG=${DIALOG=/usr/bin/dialog} - -$DIALOG --title "PROGRAM BOX: 'cal'" --clear \ - --prgbox "cal" 13 27 - -case $? in - 0) - echo "OK";; - *) - echo "Exit code:" $?;; -esac diff --git a/gnu/usr.bin/dialog/TESTS/radiolist b/gnu/usr.bin/dialog/TESTS/radiolist deleted file mode 100755 index 7402790..0000000 --- a/gnu/usr.bin/dialog/TESTS/radiolist +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -DIALOG=${DIALOG=/usr/bin/dialog} - -$DIALOG --title "RADIOLIST BOX" --clear \ - --radiolist "Hi, this is a radiolist box. You can use this to \n\ -present a list of choices, one of them can be turned \n\ -on or off. If there are more items than can fit on the \n\ -screen, the list will be scrolled. You can use the \n\ -UP/DOWN arrow keys, the first letter of the choice as a\n\ -hot key, or the number keys 1-9 to choose an option. \n\ -Press SPACE to toggle an option on/off. \n\n\ - Which of the following are fruits?" -1 -1 5 \ - "Apple" "It's an apple." off \ - "Dog" "No, that's not my dog." ON \ - "Orange" "Yeah, that's juicy." off \ - "Cat" "No, never put a dog and a cat together!" oFF \ - "Fish" "Cats like fish." OFF \ - "Lemon" "You know how it tastes." oFF 2> /tmp/radiolist.tmp.$$ - -retval=$? - -choice=`cat /tmp/radiolist.tmp.$$` -rm -f /tmp/radiolist.tmp.$$ - -case $retval in - 0) - echo "'$choice' chosen.";; - 1) - echo "Cancel pressed.";; - 255) - [ -z "$choice" ] || echo $choice ; - echo "ESC pressed.";; -esac diff --git a/gnu/usr.bin/dialog/TESTS/textbox b/gnu/usr.bin/dialog/TESTS/textbox deleted file mode 100755 index ed7c2d9..0000000 --- a/gnu/usr.bin/dialog/TESTS/textbox +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh -DIALOG=${DIALOG=/usr/bin/dialog} - -cat << EOF > /tmp/textbox.tmp.$$ -Hi, this is a text dialog box. It can be used to display text from a file. -The file should not contain any 'tab' characters, so you should 'expand' -the file first if it contains 'tab' characters. - -It's like a simple text file viewer, with these keys implemented: - -PGDN/SPACE - Move down one page -PGUP/'b' - Move up one page -DOWN/'j' - Move down one line -UP/'k' - Move up one line -LEFT/'h' - Scroll left -RIGHT/'l' - Scroll right -'0' - Move to beginning of line -HOME/'g' - Move to beginning of file -END/'G' - Move to end of file -'/' - Forward search -'?' - Backward search -'n' - Repeat last search (forward) -'N' - Repeat last search (backward) - - -The following is a sample text file: - - -EOF - -cat ../COPYING | expand >> /tmp/textbox.tmp.$$ - -$DIALOG --clear --title "TEXT BOX" --textbox "/tmp/textbox.tmp.$$" 22 77 - -case $? in - 0) - echo "OK";; - 255) - echo "EXIT choosed.";; -esac - -rm -f /tmp/textbox.tmp.$$ diff --git a/gnu/usr.bin/dialog/TESTS/treebox b/gnu/usr.bin/dialog/TESTS/treebox deleted file mode 100755 index c5a546f..0000000 --- a/gnu/usr.bin/dialog/TESTS/treebox +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -DIALOG=${DIALOG=/usr/bin/dialog} - -$DIALOG --clear --title "TREE BOX" \ - --hline "Press arrows, TAB or Enter" \ - --hfile "../COPYING" \ - --tree "/" \ - "This is tree box" -1 -1 10 \ - `find -x / -type d` 2>/tmp/tree.tmp.$$ - -retval=$? - -choice=`cat /tmp/tree.tmp.$$` - -case $retval in - 0) - echo "'$choice' chosen.";; - 1) - echo "Cancel pressed.";; - 255) - [ -z "$choice" ] || echo $choice ; - echo "ESC pressed.";; -esac - -rm -f /tmp/tree.tmp.$$ diff --git a/gnu/usr.bin/dialog/TESTS/yesno b/gnu/usr.bin/dialog/TESTS/yesno deleted file mode 100755 index 36e95c8..0000000 --- a/gnu/usr.bin/dialog/TESTS/yesno +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -DIALOG=${DIALOG=/usr/bin/dialog} - -$DIALOG --title "YES/NO BOX" --clear \ - --hline "Press F1 or ? to see GNU GPL" \ - --hfile ../COPYING \ - --yesno "Hi, this is a yes/no dialog box. You can use this to ask \ - questions that have an answer of either yes or no. \ - BTW, do you notice that long lines will be automatically \ - wrapped around so that they can fit in the box? You can \ - also control line breaking explicitly by inserting \ - 'backslash n' at any place you like, but in this case, \ - auto wrap around will be disabled and you will have to \ - control line breaking yourself." 15 61 - -case $? in - 0) - echo "Yes chosen.";; - 1) - echo "No chosen.";; - 255) - echo "ESC pressed.";; -esac diff --git a/gnu/usr.bin/dialog/dialog.1 b/gnu/usr.bin/dialog/dialog.1 deleted file mode 100644 index 420a31d..0000000 --- a/gnu/usr.bin/dialog/dialog.1 +++ /dev/null @@ -1,326 +0,0 @@ -.\" $FreeBSD$ -.TH DIALOG 1 "2 October 1998" -.SH NAME -dialog \- display dialog boxes from shell scripts -.SH SYNOPSIS -.B dialog --clear -.br -.BI "dialog --create-rc " file -.br -.B dialog -[ -.BI "\-\-title " title -] -[ -.B \-\-clear -] -[ -.BI "\-\-hline " line -] -[ -.BI "\-\-hfile " file -] -.B box-options -.SH DESCRIPTION -.B Dialog -is a program which allows you to present a variety of questions or -display messages in dialog box form from a shell script. The following -types of dialog objects are currently supported: -.LP -.BR yes/no " box," " menu" " box," " input" " box," -.BR message " box," " text" " box," " info" " box," -.BR checklist " box," " program" " box," -.BR radiolist " box," -.BR ftree " and " tree " boxes." -.SH OPTIONS -.TP -.B \-\-clear -The screen will be cleared to the -.BR "screen attribute" " on exit." -.TP -.BI \-\-create-rc " file" -.RB "Since " dialog " supports run-time configuration," -this can be used to dump a sample configuration file to the file specified -by -.IR file "." -.TP -.BI \-\-title " title" -Specifies a -.I title -string to be displayed at the top of the dialog box. -.TP -.BI \-\-hline " line" -Specifies a -.I line -string to be displayed at the bottom of the dialog box. -.TP -.BI \-\-hfile " file" -Specifies a -.I file -to be displayed by pressing ? or F1. -.TP -.B Box Options -.TP -.BI \-\-yesno " text height width \fR[ \fByes \fR| \fBno \fR]" -.RB A " yes/no" " dialog box of size" -.I height -rows by -.I width -columns will be displayed. The string specified by -.I text -is displayed inside the dialog box. If this string is too long to fit -in one line, it will be automatically divided into multiple lines at -the appropriate points. The -.I text -string may also contain the sub-string -.I -"\en" -or newline characters -.I `\en\' -to control line breaking explicitly. This dialog box is useful for -asking questions that require the user to answer either yes or no. -.RB "The dialog box has a" " Yes" " button and a " No -button, in which the user can switch between by pressing the -.IR TAB " key." -.RB A " Yes" " button is selected by default unless" " no" -is specified. -.TP -.BI \-\-msgbox " text height width" -.RB A " message" " box is very similar to a" " yes/no" " box." -The only difference between a -.B message -box and a -.B yes/no -box is that a -.B message -box has only a single -.B OK -button. You can use this dialog box to display any message you like. -After reading the message, the user can press the -.I ENTER -key so that -.B dialog -will exit and the calling shell script can continue its operation. -.TP -.BI \-\-infobox " text height width" -.RB An " info" " box is basically a" " message" " box." -However, in this case, -.B dialog -will exit immediately after displaying the message to the user. The -screen is not cleared when -.B dialog -exits, so that the message will remain on the screen until the calling -shell script clears it later. This is useful when you want to inform -the user that some operations are carrying on that may require some -time to finish. -.TP -.BI \-\-inputbox " text height width" -.RB "An " input " box is useful when you want to ask questions that" -require the user to input a string as the answer. When inputing the -string, the -.I BACKSPACE -key can be used to correct typing errors. If the input string is longer than -can be fitted in the dialog box, the input field will be scrolled. On exit, -the input string will be printed on -.IR stderr "." -.TP -.BI \-\-textbox " file height width" -.RB A " text" " box lets you display the contents of a text file in a" -dialog box. It is like a simple text file viewer. The user can move -through the file by using the -.IR UP/DOWN ", " PGUP/PGDN -.RI and " HOME/END" " keys available on most keyboards." -If the lines are too long to be displayed in the box, the -.I LEFT/RIGHT -keys can be used to scroll the text region horizontally. For more -convenience, forward and backward searching functions are also provided. -.IP "\fB\-\-menu \fItext height width menu-height \fR[ \fItag item \fR] \fI..." -As its name suggests, a -.B menu -box is a dialog box that can be used to present a list of choices in -the form of a menu for the user to choose. Each menu entry consists of a -.IR tag " string and an " item " string. The" -.I tag -gives the entry a name to distinguish it from the other entries in the -menu. The -.I item -is a short description of the option that the entry represents. The -user can move between the menu entries by pressing the -.I UP/DOWN -keys, the first letter of the -.I tag -as a hot-key, or the number keys -.IR 1-9 ". There are" -.I menu-height -entries displayed in the menu at one time, but the menu will be -scrolled if there are more entries than that. When -.B dialog -exits, the -.I tag -of the chosen menu entry will be printed on -.IR stderr "." -.TP -.BI \-\-prgbox " command height width" -.RB A " program" " box lets you display output of command in" -dialog box. -.IP "\fB\-\-checklist \fItext height width list-height \fR[ \fItag item status \fR] \fI..." -.RB "A " checklist " box is similar to a " menu " box in that there are" -multiple entries presented in the form of a menu. Instead of choosing -one entry among the entries, each entry can be turned on or off by the -user. The initial on/off state of each entry is specified by -.IR status "." -On exit, a list of the -.I tag -strings of those entries that are turned on will be printed on -.IR stderr "." -.IP "\fB\-\-radiolist \fItext height width list-height \fR[ \fItag item status \fR] \fI..." -.RB "A " radiolist " box is similar to a " checklist " but it only allows" -a single entry to be selected. One entry may initially be turned on as -specified by -.IR status "." -On exit, the -.I tag -string of the entry that is turned on will be printed on -.IR stderr "." -.IP "\fB\-\-ftree \fIfile FS text height width menu-height" -.B ftree -box is a dialog box showing the tree described by the data from the file -.IR file "." -The data in the file should look like find(1) output. For the -find output, the field separator -.I FS -will be -.IR \'/\' ". If" -.IR height " and" -.IR width " are" -positive numbers, they set the absolute size of the whole -.BR ftree " box. If" -.IR height " and" -.IR width " are negative numbers, the size of the" -.B ftree -box will be -selected automatically. -.I menu-height -sets the height of the tree subwindow inside the -.B ftree -box and must be set. -.I text -is shown inside the -.B ftree -box above the tree subwindow and can contain newline characters -.I '\en\' -to split lines. One can navigate in the tree by pressing -.IR UP/DOWN " or " \'+\'/\'-\' ", " PG_UP/PG_DOWN " or " \'b\'/SPACE -.RI "and " HOME/END " or " \'g\'/\'G\' "." -A leaf of the tree is selected by pressing -.IR TAB " or " LEFT/RIGHT -the -.B OK -button and pressing -.IR ENTER "." -The selected leaf (to be more -exact, the full path to it from the root of the tree) is printed to -.IR stderr "." -If -.B Cancel -and then -.I ENTER -is pressed, nothing is printed to -.IR stderr "." -.I file -may contain data like find(1) -output, as well as like the output of find(1) with -.I -d -option. Some of the transient paths to the leaves of the tree may be -absent. Such data is corrected when fed from file. -.IP "\fB\-\-tree \fIFS text height width menu-height \fR[ \fIitem \fR] \fI..." -.B tree -box is like -.B ftree -box with some exceptions. First, the data is not -entered from a file, but from the command line as -.I item item ... -Second, the data thus entered is not corrected in any way. -Thus, the data like the output of find(1) with -.I -d -option will look incorrectly. -.SH "RUN-TIME CONFIGURATION" -.TP 4 -1. -Create a sample configuration file by typing: -.LP -.in +1i -"dialog --create-rc <file>" -.TP 4 -2. -At start, -.B dialog -determines the settings to use as follows: -.RS -.TP 4 -a) -if environment variable -.B DIALOGRC -is set, its value determines the name of the configuration file. -.TP 4 -b) -if the file in (a) can't be found, use the file -.I $HOME/.dialogrc -as the configuration file. -.TP 4 -c) -if the file in (b) can't be found, use compiled in defaults. -.RE -.TP 4 -3. -Edit the sample configuration file and copy it to some place that -.B dialog -can find, as stated in step 2 above. -.SH ENVIRONMENT -.TP 15 -.B DIALOGRC -Define this variable if you want to specify the name of the configuration file -to use. -.SH FILES -.TP 20 -.I $HOME/.dialogrc -default configuration file -.SH DIAGNOSTICS -Exit status is 0 if -.BR dialog " is exited by pressing the " Yes " or " OK -button, and 1 if the -.BR No " or " Cancel -button is pressed. Otherwise, if errors occur inside -.B dialog -or -.B dialog -is exited by pressing the -.I ESC -key, the exit status is -1. -.SH SEE ALSO -dialog(3) -.SH BUGS -Text files containing -.I tab -characters may cause problems with -.B text -box. -.I Tab -characters in text files must first be expanded to spaces before being -.RB "displayed by " text " box." -.sp 1 -Screen update is too slow. -.sp 1 -The -.B ftree -and -.B tree -boxes do not allow the tree to be moved to the left or to -the right. Thus, if there are many levels of data, some of the leaves can be -rendered invisible. A standard display with 80 characters allows for 17 -levels to be visible. Deeper levels are invisible. However, the navigation -in the tree and selection of leaves do work. -.SH AUTHOR -Savio Lam (lam836@cs.cuhk.hk) -.sp 1 -Changes by Anatoly A. Orehovsky (tolik@mpeks.tomsk.su) (ftree and tree boxes) diff --git a/gnu/usr.bin/dialog/dialog.c b/gnu/usr.bin/dialog/dialog.c deleted file mode 100644 index dcbf19d..0000000 --- a/gnu/usr.bin/dialog/dialog.c +++ /dev/null @@ -1,394 +0,0 @@ -/* - * dialog - Display simple dialog boxes from shell scripts - * - * AUTHOR: Savio Lam (lam836@cs.cuhk.hk) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * $FreeBSD$ - * - * - * HISTORY: - * - * 17/12/93 - Version 0.1 released. - * - * 19/12/93 - menu will now scroll if there are more items than can fit - * on the screen. - * - added 'checklist', a dialog box with a list of options that - * can be turned on or off. A list of options that are on is - * returned on exit. - * - * 20/12/93 - Version 0.15 released. - * - * 29/12/93 - Incorporated patch from Patrick J. Volkerding - * (volkerdi@mhd1.moorhead.msus.edu) that made these changes: - * - increased MAX_LEN to 2048 - * - added 'infobox', equivalent to a message box without pausing - * - added option '--clear' that will clear the screen - * - Explicit line breaking when printing prompt text can be - * invoked by real newline '\n' besides the string "\n" - * - an optional parameter '--title <string>' can be used to - * specify a title string for the dialog box - * - * 03/01/94 - added 'textbox', a dialog box for displaying text from a file. - * - Version 0.2 released. - * - * 04/01/94 - some fixes and improvements for 'textbox': - * - fixed a bug that will cause a segmentation violation when a - * line is longer than MAX_LEN characters. Lines will now be - * truncated if they are longer than MAX_LEN characters. - * - removed wrefresh() from print_line(). This will increase - * efficiency of print_page() which calls print_line(). - * - display current position in the form of percentage into file. - * - Version 0.21 released. - * - * 05/01/94 - some changes for faster screen update. - * - * 07/01/94 - much more flexible color settings. Can use all 16 colors - * (8 normal, 8 highlight) of the Linux console. - * - * 08/01/94 - added run-time configuration using configuration file. - * - * 09/01/94 - some minor bug fixes and cleanups for menubox, checklist and - * textbox. - * - * 11/01/94 - added a man page. - * - * 13/01/94 - some changes for easier porting to other Unix systems (tested - * on Ultrix, SunOS and HPUX) - * - Version 0.3 released. - * - * 08/06/94 - Patches by Stuart Herbert - S.Herbert@shef.ac.uk - * Fixed attr_clear and the textbox stuff to work with ncurses 1.8.5 - * Fixed the wordwrap routine - it'll actually wrap properly now - * Added a more 3D look to everything - having your own rc file could - * prove 'interesting' to say the least :-) - * Added radiolist option - * - Version 0.4 released. - * - * 09/28/98 - Patches by Anatoly A. Orehovsky - tolik@mpeks.tomsk.su - * Added ftree and tree options - * - */ - -#include <sys/types.h> - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <sys/wait.h> -#include <dialog.h> - -void Usage(char *name); -void EndDialog(int cls); - -int main(int argc, char *argv[]) -{ - int offset = 0, clear_screen = 0, end_common_opts = 0, default_yesno = 1, retval; - unsigned char *title = NULL; - unsigned char result[MAX_LEN]; - char *hline = NULL, *hfile = NULL; - - if (argc < 2) - Usage(argv[0]); - else if (!strcmp(argv[1], "--create-rc")) { -#ifdef HAVE_NCURSES - if (argc != 3) - Usage(argv[0]); - dialog_create_rc(argv[2]); - return 0; -#else - fprintf(stderr, "\nThis option is currently unsupported on your system.\n"); - return -1; -#endif - } - - while (offset < argc-1 && !end_common_opts) { /* Common options */ - if (!strcmp(argv[offset+1], "--title")) { - if (argc-offset < 3 || title != NULL) /* No two "--title" please! */ - Usage(argv[0]); - else { - title = argv[offset+2]; - offset += 2; - } - } - else if (!strcmp(argv[offset+1], "--hline")) { - if (argc-offset < 3 || hline != NULL) /* No two "--hline" please! */ - Usage(argv[0]); - else { - hline = argv[offset+2]; - use_helpline(hline); - offset += 2; - } - } - else if (!strcmp(argv[offset+1], "--hfile")) { - if (argc-offset < 3 || hfile != NULL) /* No two "--hfile" please! */ - Usage(argv[0]); - else { - hfile = argv[offset+2]; - use_helpfile(hfile); - offset += 2; - } - } - else if (!strcmp(argv[offset+1], "--clear")) { - if (clear_screen) /* Hey, "--clear" can't appear twice! */ - Usage(argv[0]); - else if (argc == 2) { /* we only want to clear the screen */ - init_dialog(); - dialog_update(); /* init_dialog() will clear the screen for us */ - end_dialog(); - return 0; - } - else { - clear_screen = 1; - offset++; - } - } - else /* no more common options */ - end_common_opts = 1; - } - - if (argc-1 == offset) /* no more options */ - Usage(argv[0]); - - /* Box options */ - - if (!strcmp(argv[offset+1], "--yesno")) { - if (argc-offset != 5 && argc-offset != 6) - Usage(argv[0]); - if (argc-offset == 6) { - if (!strcmp(argv[offset+5], "yes")) - default_yesno = 1; - else if (!strcmp(argv[offset+5], "no")) - default_yesno = 0; - else - Usage(argv[0]); - } - init_dialog(); - if (default_yesno == 1) - retval = dialog_yesno(title, argv[offset+2], atoi(argv[offset+3]), - atoi(argv[offset+4])); - else - retval = dialog_noyes(title, argv[offset+2], atoi(argv[offset+3]), - atoi(argv[offset+4])); - - dialog_update(); - EndDialog(clear_screen); - return retval; - } - else if (!strcmp(argv[offset+1], "--msgbox")) { - if (argc-offset != 5) - Usage(argv[0]); - init_dialog(); - retval = dialog_msgbox(title, argv[offset+2], atoi(argv[offset+3]), - atoi(argv[offset+4]), 1); - - dialog_update(); - EndDialog(clear_screen); - return retval; - } - else if (!strcmp(argv[offset+1], "--prgbox")) { - if (argc-offset != 5) - Usage(argv[0]); - init_dialog(); - retval = dialog_prgbox(title, argv[offset+2], atoi(argv[offset+3]), - atoi(argv[offset+4]), TRUE, TRUE); - - dialog_update(); - EndDialog(clear_screen); - return WEXITSTATUS(retval); - } - else if (!strcmp(argv[offset+1], "--infobox")) { - if (argc-offset != 5) - Usage(argv[0]); - init_dialog(); - retval = dialog_msgbox(title, argv[offset+2], atoi(argv[offset+3]), - atoi(argv[offset+4]), 0); - - dialog_update(); - EndDialog(clear_screen); - return retval; - } - else if (!strcmp(argv[offset+1], "--textbox")) { - if (argc-offset != 5) - Usage(argv[0]); - init_dialog(); - retval = dialog_textbox(title, argv[offset+2], atoi(argv[offset+3]), - atoi(argv[offset+4])); - - dialog_update(); - EndDialog(clear_screen); - return retval; - } - else if (!strcmp(argv[offset+1], "--menu")) { - if (argc-offset < 8 || ((argc-offset) % 2)) - Usage(argv[0]); - init_dialog(); - retval = dialog_menu(title, argv[offset+2], atoi(argv[offset+3]), - atoi(argv[offset+4]), atoi(argv[offset+5]), - (argc-offset-6)/2, argv+offset + 6, result, - NULL, NULL); - dialog_update(); - if (retval == 0) - fputs(result, stderr); - EndDialog(clear_screen); - return retval; - } - else if (!strcmp(argv[offset+1], "--checklist")) { - if (argc-offset < 9 || ((argc-offset-6) % 3)) - Usage(argv[0]); - init_dialog(); - retval = dialog_checklist(title, argv[offset+2], atoi(argv[offset+3]), - atoi(argv[offset+4]), atoi(argv[offset+5]), - (argc-offset-6)/3, argv+offset + 6, result); - - dialog_update(); - if (retval == 0) { - unsigned char *s, *h; int first; - - h = result; - first = 1; - while ((s = strchr(h, '\n')) != NULL) { - *s++ = '\0'; - if (!first) - fputc(' ', stderr); - else - first = 0; - fprintf(stderr, "\"%s\"", h); - h = s; - } - } - EndDialog(clear_screen); - return retval; - } - else if (!strcmp(argv[offset+1], "--radiolist")) { - if (argc-offset < 9 || ((argc-offset-6) % 3)) - Usage(argv[0]); - init_dialog(); - retval = dialog_radiolist(title, argv[offset+2], atoi(argv[offset+3]), - atoi(argv[offset+4]), atoi(argv[offset+5]), - (argc-offset-6)/3, argv+offset + 6, result); - - dialog_update(); - if (retval == 0) - fputs(result, stderr); - EndDialog(clear_screen); - return retval; - } - else if (!strcmp(argv[offset+1], "--inputbox")) { - if (argc-offset != 5 && argc-offset != 6) - Usage(argv[0]); - if (argc-offset == 6) - strcpy(result, argv[offset+5]); - else - *result = '\0'; - init_dialog(); - retval = dialog_inputbox(title, argv[offset+2], atoi(argv[offset+3]), - atoi(argv[offset+4]), result); - - dialog_update(); - if (retval == 0) - fputs(result, stderr); - EndDialog(clear_screen); - return retval; - } -/* ftree and tree options */ - else if (!strcmp(argv[offset+1], "--ftree")) { - unsigned char *tresult; - if (argc-offset != 8) - Usage(argv[0]); - init_dialog(); - retval = dialog_ftree(argv[offset+2], *argv[offset+3], - title, argv[offset+4], atoi(argv[offset+5]), atoi(argv[offset+6]), - atoi(argv[offset+7]), &tresult); - - dialog_update(); - if (!retval) - { - fputs(tresult, stderr); - free(tresult); - } - EndDialog(clear_screen); - return retval; - } - else if (!strcmp(argv[offset+1], "--tree")) { - unsigned char *tresult; - if (argc-offset < 8) - Usage(argv[0]); - init_dialog(); - retval = dialog_tree((unsigned char **)argv+offset+7, argc-offset-7, - *argv[offset+2], title, argv[offset+3], atoi(argv[offset+4]), - atoi(argv[offset+5]), atoi(argv[offset+6]), &tresult); - - dialog_update(); - if (!retval) - fputs(tresult, stderr); - - EndDialog(clear_screen); - return retval; - } - - Usage(argv[0]); - - return 0; -} -/* End of main() */ - - -/* - * Print program usage - */ -void Usage(char *name) -{ - fprintf(stderr, "\ -\ndialog version 0.3, by Savio Lam (lam836@cs.cuhk.hk).\ -\n patched to version %s by Stuart Herbert (S.Herbert@shef.ac.uk)\ -\n Changes Copyright (C) 1995 by Andrey A. Chernov, Moscow, Russia\ -\n patched by Anatoly A. Orehovsky (tolik@mpeks.tomsk.su)\ -\n\ -\n* Display dialog boxes from shell scripts *\ -\n\ -\nUsage: %s --clear\ -\n %s --create-rc <file>\ -\n %s [--title <title>] [--clear] [--hline <line>] [--hfile <file>]\\\ -\n <Box options>\ -\n\ -\nBox options:\ -\n\ -\n --yesno <text> <height> <width> [yes|no]\ -\n --msgbox <text> <height> <width>\ -\n --prgbox \"<command line>\" <height> <width>\ -\n --infobox <text> <height> <width>\ -\n --inputbox <text> <height> <width> [<init string>]\ -\n --textbox <file> <height> <width>\ -\n --menu <text> <height> <width> <menu height> <tag1> <item1>...\ -\n --checklist <text> <height> <width> <list height> <tag1> <item1> <status1>...\ -\n --radiolist <text> <height> <width> <list height> <tag1> <item1> <status1>...\ -\n --ftree <file> <FS> <text> <height> <width> <menu height>\ -\n --tree <FS> <text> <height> <width> <menu height> <item1>...\n", VERSION, name, name, name); - exit(-1); -} -/* End of Usage() */ - -/* - * End dialog - */ -void EndDialog(int cls) -{ - if (cls) /* clear screen before exit */ - dialog_clear(); - end_dialog(); -} -/* End of Dialog() */ |