From 3d4e8889889e5e36302454225999f7e146d3219c Mon Sep 17 00:00:00 2001 From: nwhitehorn Date: Wed, 12 Jan 2011 14:55:02 +0000 Subject: 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 --- contrib/dialog/samples/report-string | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 contrib/dialog/samples/report-string (limited to 'contrib/dialog/samples/report-string') diff --git a/contrib/dialog/samples/report-string b/contrib/dialog/samples/report-string new file mode 100644 index 0000000..a674517 --- /dev/null +++ b/contrib/dialog/samples/report-string @@ -0,0 +1,23 @@ +# $Id: report-string,v 1.2 2010/01/13 10:00:11 tom Exp $ +# Report result passed in a string $RESULT +# vile:shmode + +case $retval in + $DIALOG_OK) + echo "Result is $RESULT";; + $DIALOG_CANCEL) + echo "Cancel pressed.";; + $DIALOG_HELP) + echo "Help pressed ($RESULT).";; + $DIALOG_EXTRA) + echo "Extra button pressed.";; + $DIALOG_ITEM_HELP) + echo "Item-help button pressed.";; + $DIALOG_ESC) + if test -n "$RESULT" ; then + echo "$RESULT" + else + echo "ESC pressed." + fi + ;; +esac -- cgit v1.1