aboutsummaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2021-02-26 09:05:35 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2021-02-26 09:05:35 +0000
commit01b7bcd408fd9e9dc9088b1df5761fcc0971d7e1 (patch)
tree593f2e62b1846058a020ffcecb0ef93eb7ac2153 /samples
parent4dccdce4191d6e2bc3ba9f782b0fe1aa46b743e3 (diff)
dialog: vendor import version 1.3-20210117vendor/dialog/1.3-20210117vendor/dialog
Diffstat (limited to 'samples')
-rwxr-xr-xsamples/buildlist4
-rwxr-xr-xsamples/buildlist210
-rwxr-xr-xsamples/buildlist422
-rwxr-xr-xsamples/calendar6
-rwxr-xr-xsamples/calendar-stdout6
-rwxr-xr-xsamples/calendar26
-rwxr-xr-xsamples/calendar2-stdout6
-rwxr-xr-xsamples/calendar36
-rwxr-xr-xsamples/calendar3-stdout6
-rwxr-xr-xsamples/checklist4
-rwxr-xr-xsamples/checklist-8bit18
-rwxr-xr-xsamples/checklist-utf84
-rwxr-xr-xsamples/checklist14
-rwxr-xr-xsamples/checklist104
-rwxr-xr-xsamples/checklist114
-rwxr-xr-xsamples/checklist126
-rwxr-xr-xsamples/checklist24
-rwxr-xr-xsamples/checklist34
-rwxr-xr-xsamples/checklist44
-rwxr-xr-xsamples/checklist54
-rwxr-xr-xsamples/checklist64
-rwxr-xr-xsamples/checklist74
-rwxr-xr-xsamples/checklist84
-rwxr-xr-xsamples/checklist94
-rwxr-xr-xsamples/copifuncs/copi.ifmcfg24
-rwxr-xr-xsamples/copifuncs/copi.ifmcfg44
-rw-r--r--samples/dialog.py6
-rwxr-xr-xsamples/dselect6
-rwxr-xr-xsamples/editbox4
-rwxr-xr-xsamples/editbox-utf84
-rwxr-xr-xsamples/editbox24
-rwxr-xr-xsamples/editbox34
-rwxr-xr-xsamples/editbox44
-rwxr-xr-xsamples/form116
-rwxr-xr-xsamples/form1-both16
-rwxr-xr-xsamples/form1-extra16
-rwxr-xr-xsamples/form1-help16
-rwxr-xr-xsamples/form1-utf816
-rwxr-xr-xsamples/form28
-rwxr-xr-xsamples/form38
-rwxr-xr-xsamples/form48
-rwxr-xr-xsamples/form58
-rwxr-xr-xsamples/form68
-rwxr-xr-xsamples/fselect6
-rwxr-xr-xsamples/fselect-stdout6
-rwxr-xr-xsamples/fselect06
-rwxr-xr-xsamples/fselect18
-rwxr-xr-xsamples/fselect1-stdout8
-rwxr-xr-xsamples/fselect26
-rwxr-xr-xsamples/fselect2-stdout6
-rwxr-xr-xsamples/gauge24
-rwxr-xr-xsamples/infobox4
-rwxr-xr-xsamples/infobox14
-rwxr-xr-xsamples/infobox24
-rwxr-xr-xsamples/infobox34
-rwxr-xr-xsamples/infobox44
-rwxr-xr-xsamples/infobox54
-rwxr-xr-xsamples/infobox64
-rwxr-xr-xsamples/inputbox4
-rwxr-xr-xsamples/inputbox-both4
-rwxr-xr-xsamples/inputbox-extra4
-rwxr-xr-xsamples/inputbox-help4
-rwxr-xr-xsamples/inputbox14
-rwxr-xr-xsamples/inputbox24
-rwxr-xr-xsamples/inputbox34
-rwxr-xr-xsamples/inputbox46
-rwxr-xr-xsamples/inputbox54
-rwxr-xr-xsamples/inputbox6-8bit10
-rwxr-xr-xsamples/inputbox6-utf84
-rwxr-xr-xsamples/inputbox76
-rwxr-xr-xsamples/inputmenu12
-rwxr-xr-xsamples/inputmenu-stdout12
-rwxr-xr-xsamples/inputmenu112
-rwxr-xr-xsamples/inputmenu212
-rwxr-xr-xsamples/inputmenu314
-rwxr-xr-xsamples/inputmenu412
-rw-r--r--samples/install/setup.c2
-rw-r--r--samples/install/setup.help2
-rwxr-xr-xsamples/killall14
-rwxr-xr-xsamples/menubox8
-rwxr-xr-xsamples/menubox-8bit16
-rwxr-xr-xsamples/menubox-utf84
-rwxr-xr-xsamples/menubox18
-rwxr-xr-xsamples/menubox106
-rwxr-xr-xsamples/menubox116
-rwxr-xr-xsamples/menubox1210
-rwxr-xr-xsamples/menubox212
-rwxr-xr-xsamples/menubox38
-rwxr-xr-xsamples/menubox48
-rwxr-xr-xsamples/menubox510
-rwxr-xr-xsamples/menubox68
-rwxr-xr-xsamples/menubox78
-rwxr-xr-xsamples/menubox812
-rwxr-xr-xsamples/menubox96
-rwxr-xr-xsamples/mixedform16
-rwxr-xr-xsamples/mixedform216
-rwxr-xr-xsamples/msgbox4
-rwxr-xr-xsamples/msgbox-help4
-rwxr-xr-xsamples/msgbox-utf84
-rwxr-xr-xsamples/msgbox112
-rwxr-xr-xsamples/msgbox212
-rwxr-xr-xsamples/msgbox34
-rwxr-xr-xsamples/msgbox4-8bit20
-rwxr-xr-xsamples/msgbox4-utf818
-rwxr-xr-xsamples/msgbox54
-rwxr-xr-xsamples/msgbox64
-rwxr-xr-xsamples/msgbox6a4
-rwxr-xr-xsamples/password4
-rwxr-xr-xsamples/password14
-rwxr-xr-xsamples/password24
-rwxr-xr-xsamples/passwordform116
-rwxr-xr-xsamples/passwordform1-utf816
-rwxr-xr-xsamples/pause4
-rwxr-xr-xsamples/pause-both6
-rwxr-xr-xsamples/pause-extra6
-rwxr-xr-xsamples/pause-help4
-rwxr-xr-xsamples/prgbox4
-rwxr-xr-xsamples/prgbox24
-rwxr-xr-xsamples/programbox4
-rwxr-xr-xsamples/programbox24
-rwxr-xr-xsamples/programbox322
-rwxr-xr-xsamples/progress4
-rwxr-xr-xsamples/progress24
-rwxr-xr-xsamples/radiolist4
-rwxr-xr-xsamples/radiolist14
-rwxr-xr-xsamples/radiolist104
-rwxr-xr-xsamples/radiolist24
-rwxr-xr-xsamples/radiolist34
-rwxr-xr-xsamples/radiolist44
-rwxr-xr-xsamples/rangebox6
-rwxr-xr-xsamples/rangebox26
-rwxr-xr-xsamples/rangebox36
-rwxr-xr-xsamples/rangebox46
-rw-r--r--samples/report-button10
-rw-r--r--samples/report-edit10
-rw-r--r--samples/report-string18
-rw-r--r--samples/report-tempfile18
-rw-r--r--samples/report-yesno10
-rwxr-xr-xsamples/rotated-data6
-rwxr-xr-xsamples/run_test.sh10
-rw-r--r--samples/setup-vars29
-rwxr-xr-xsamples/tailbox4
-rwxr-xr-xsamples/tailboxbg4
-rwxr-xr-xsamples/tailboxbg16
-rwxr-xr-xsamples/tailboxbg26
-rw-r--r--[-rwxr-xr-x]samples/testdata-8bit0
-rwxr-xr-xsamples/textbox6
-rwxr-xr-xsamples/textbox-both8
-rwxr-xr-xsamples/textbox-help8
-rwxr-xr-xsamples/textbox26
-rwxr-xr-xsamples/textbox38
-rwxr-xr-xsamples/timebox6
-rwxr-xr-xsamples/timebox-stdout6
-rwxr-xr-xsamples/timebox26
-rwxr-xr-xsamples/timebox2-stdout6
-rwxr-xr-xsamples/treeview4
-rwxr-xr-xsamples/treeview26
-rwxr-xr-xsamples/treeview424
-rwxr-xr-xsamples/wheel81
-rwxr-xr-xsamples/yesno4
-rwxr-xr-xsamples/yesno-both4
-rwxr-xr-xsamples/yesno-extra4
-rwxr-xr-xsamples/yesno-help4
-rwxr-xr-xsamples/yesno-utf84
-rwxr-xr-xsamples/yesno24
-rwxr-xr-xsamples/yesno34
-rwxr-xr-xsamples/yesno44
167 files changed, 653 insertions, 631 deletions
diff --git a/samples/buildlist b/samples/buildlist
index 72d871f7a149..8e4a70b0c846 100755
--- a/samples/buildlist
+++ b/samples/buildlist
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: buildlist,v 1.2 2012/12/04 11:45:21 tom Exp $
+# $Id: buildlist,v 1.3 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -15,6 +15,6 @@ $DIALOG --title "BUILDLIST DEMO" --backtitle "A user-built list" \
"5" "Item number 5" "off" \
"6" "Item number 6" "on" 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/buildlist2 b/samples/buildlist2
index d5cbfb7d25e9..1b4dd335060a 100755
--- a/samples/buildlist2
+++ b/samples/buildlist2
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: buildlist2,v 1.6 2012/12/23 22:28:12 tom Exp $
+# $Id: buildlist2,v 1.8 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -23,10 +23,10 @@ do
esac
case "x$DIALOGOPTS" in
*--no-items*|*--noitem*)
- echo $filename $state >>$input
+ echo "$filename $state" >>$input
;;
*)
- echo $count $filename $state >>$input
+ echo "$count $filename $state" >>$input
;;
esac
count=`expr $count + 1`
@@ -34,9 +34,9 @@ done
$DIALOG --title "BUILDLIST DEMO" --backtitle "A user-built list" \
--visit-items --scrollbar --separator "|" \
- --buildlist "hello, this is a --buildlist..." 0 0 10 `cat $input` 2> $output
+ --buildlist "hello, this is a --buildlist..." 0 0 10 `cat "$input"` 2> $output
-retval=$?
+returncode=$?
tempfile=$output
. ./report-tempfile
diff --git a/samples/buildlist4 b/samples/buildlist4
new file mode 100755
index 000000000000..6bfa98708017
--- /dev/null
+++ b/samples/buildlist4
@@ -0,0 +1,22 @@
+#!/bin/sh
+# $Id: buildlist4,v 1.2 2020/11/26 00:03:58 tom Exp $
+
+. ./setup-vars
+
+. ./setup-tempfile
+
+$DIALOG --title "BUILDLIST DEMO" --backtitle "A user-built list" \
+ --separator "|" \
+ --help-button \
+ --item-help \
+ --buildlist "hello, this is a --buildlist..." 0 0 0 \
+ "1" "Item number 1" "on" first \
+ "2" "Item number 2" "off" second \
+ "3" "Item number 3" "on" third \
+ "4" "Item number 4" "on" fourth \
+ "5" "Item number 5" "off" fifth \
+ "6" "Item number 6" "on" sixth 2> $tempfile
+
+returncode=$?
+
+. ./report-tempfile
diff --git a/samples/calendar b/samples/calendar
index e984bcea1867..f9eb602fe0d9 100755
--- a/samples/calendar
+++ b/samples/calendar
@@ -1,11 +1,11 @@
#!/bin/sh
-# $Id: calendar,v 1.9 2010/01/13 10:20:33 tom Exp $
+# $Id: calendar,v 1.11 2020/11/26 00:09:12 tom Exp $
. ./setup-vars
exec 3>&1
-RESULT=`$DIALOG --title "CALENDAR" "$@" --calendar "Please choose a date..." 0 0 7 7 1981 2>&1 1>&3`
-retval=$?
+returntext=`$DIALOG --title "CALENDAR" "$@" --calendar "Please choose a date..." 0 0 7 7 1981 2>&1 1>&3`
+returncode=$?
exec 3>&-
. ./report-string
diff --git a/samples/calendar-stdout b/samples/calendar-stdout
index 5dbbbce9d052..107a8e365161 100755
--- a/samples/calendar-stdout
+++ b/samples/calendar-stdout
@@ -1,9 +1,9 @@
#!/bin/sh
-# $Id: calendar-stdout,v 1.6 2010/01/13 10:20:03 tom Exp $
+# $Id: calendar-stdout,v 1.8 2020/11/26 00:09:12 tom Exp $
. ./setup-vars
-RESULT=`$DIALOG --stdout --title "CALENDAR" "$@" --calendar "Please choose a date..." 0 0 7 7 1981`
-retval=$?
+returntext=`$DIALOG --stdout --title "CALENDAR" "$@" --calendar "Please choose a date..." 0 0 7 7 1981`
+returncode=$?
. ./report-string
diff --git a/samples/calendar2 b/samples/calendar2
index f6214ce662cd..70aba16349df 100755
--- a/samples/calendar2
+++ b/samples/calendar2
@@ -1,11 +1,11 @@
#!/bin/sh
-# $Id: calendar2,v 1.8 2010/01/13 10:20:03 tom Exp $
+# $Id: calendar2,v 1.10 2020/11/26 00:09:12 tom Exp $
. ./setup-vars
exec 3>&1
-RESULT=`$DIALOG --title "CALENDAR" "$@" --calendar "Please choose a date..." 0 0 2>&1 1>&3`
-retval=$?
+returntext=`$DIALOG --title "CALENDAR" "$@" --calendar "Please choose a date..." 0 0 2>&1 1>&3`
+returncode=$?
exec 3>&-
. ./report-string
diff --git a/samples/calendar2-stdout b/samples/calendar2-stdout
index af731d9d2265..34b370f7ee0e 100755
--- a/samples/calendar2-stdout
+++ b/samples/calendar2-stdout
@@ -1,9 +1,9 @@
#!/bin/sh
-# $Id: calendar2-stdout,v 1.6 2010/01/13 10:20:03 tom Exp $
+# $Id: calendar2-stdout,v 1.8 2020/11/26 00:09:12 tom Exp $
. ./setup-vars
-RESULT=`$DIALOG --stdout --title "CALENDAR" "$@" --calendar "Please choose a date..." 0 0`
-retval=$?
+returntext=`$DIALOG --stdout --title "CALENDAR" "$@" --calendar "Please choose a date..." 0 0`
+returncode=$?
. ./report-string
diff --git a/samples/calendar3 b/samples/calendar3
index aece69ceb4fe..a6efd575eb53 100755
--- a/samples/calendar3
+++ b/samples/calendar3
@@ -1,11 +1,11 @@
#!/bin/sh
-# $Id: calendar3,v 1.9 2010/01/13 10:20:03 tom Exp $
+# $Id: calendar3,v 1.11 2020/11/26 00:09:12 tom Exp $
. ./setup-vars
exec 3>&1
-RESULT=`$DIALOG --extra-button --extra-label "Hold" --help-button --title "CALENDAR" "$@" --calendar "Please choose a date..." 0 0 7 7 1981 2>&1 1>&3`
-retval=$?
+returntext=`$DIALOG --extra-button --extra-label "Hold" --help-button --title "CALENDAR" "$@" --calendar "Please choose a date..." 0 0 7 7 1981 2>&1 1>&3`
+returncode=$?
exec 3>&-
. ./report-string
diff --git a/samples/calendar3-stdout b/samples/calendar3-stdout
index 4b7ecdbeafb6..7e15920400e4 100755
--- a/samples/calendar3-stdout
+++ b/samples/calendar3-stdout
@@ -1,9 +1,9 @@
#!/bin/sh
-# $Id: calendar3-stdout,v 1.6 2010/01/13 10:20:03 tom Exp $
+# $Id: calendar3-stdout,v 1.8 2020/11/26 00:09:12 tom Exp $
. ./setup-vars
-RESULT=`$DIALOG --extra-button --extra-label "Hold" --help-button --stdout --title "CALENDAR" "$@" --calendar "Please choose a date..." 0 0 7 7 1981`
-retval=$?
+returntext=`$DIALOG --extra-button --extra-label "Hold" --help-button --stdout --title "CALENDAR" "$@" --calendar "Please choose a date..." 0 0 7 7 1981`
+returncode=$?
. ./report-string
diff --git a/samples/checklist b/samples/checklist
index be3c8c69304c..2e687d613e16 100755
--- a/samples/checklist
+++ b/samples/checklist
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: checklist,v 1.14 2010/01/13 10:20:03 tom Exp $
+# $Id: checklist,v 1.15 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -23,6 +23,6 @@ Press SPACE to toggle an option on/off. \n\n\
"Fish" "Cats like fish." On \
"Lemon" "You know how it tastes." on 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/checklist-8bit b/samples/checklist-8bit
index 20b23f13c274..756bf5b6b9c3 100755
--- a/samples/checklist-8bit
+++ b/samples/checklist-8bit
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: checklist-8bit,v 1.8 2010/01/13 10:20:03 tom Exp $
+# $Id: checklist-8bit,v 1.10 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -17,14 +17,14 @@ 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?" 20 61 5 \
- "`./rotated-data 0 $SAMPLE`" "It's an `./rotated-data 0 $SAMPLE`." off \
- "`./rotated-data 1 $SAMPLE`" "No, that's not my `./rotated-data 1 $SAMPLE`." ON \
- "`./rotated-data 2 $SAMPLE`" "Yeah, that's `./rotated-data 2 $SAMPLE`." off \
- "`./rotated-data 3 $SAMPLE`" "Normally not a `./rotated-data 3 $SAMPLE`." off \
- "`./rotated-data 4 $SAMPLE`" "No, never put a `./rotated-data 4 $SAMPLE` there!" oN \
- "`./rotated-data 5 $SAMPLE`" "Cats like `./rotated-data 5 $SAMPLE`." On \
- "`./rotated-data 6 $SAMPLE`" "You `./rotated-data 6 $SAMPLE` how it is." on 2> $tempfile
+ "`./rotated-data 0 "$SAMPLE"`" "It's an `./rotated-data 0 "$SAMPLE"`." off \
+ "`./rotated-data 1 "$SAMPLE"`" "No, that's not my `./rotated-data 1 "$SAMPLE"`." ON \
+ "`./rotated-data 2 "$SAMPLE"`" "Yeah, that's `./rotated-data 2 "$SAMPLE"`." off \
+ "`./rotated-data 3 "$SAMPLE"`" "Normally not a `./rotated-data 3 "$SAMPLE"`." off \
+ "`./rotated-data 4 "$SAMPLE"`" "No, never put a `./rotated-data 4 "$SAMPLE"` there!" oN \
+ "`./rotated-data 5 "$SAMPLE"`" "Cats like `./rotated-data 5 "$SAMPLE"`." On \
+ "`./rotated-data 6 "$SAMPLE"`" "You `./rotated-data 6 "$SAMPLE"` how it is." on 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/checklist-utf8 b/samples/checklist-utf8
index 12ed7239502a..b3f24ad2db7a 100755
--- a/samples/checklist-utf8
+++ b/samples/checklist-utf8
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: checklist-utf8,v 1.12 2010/01/13 10:20:03 tom Exp $
+# $Id: checklist-utf8,v 1.13 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -25,6 +25,6 @@ Press SPACE to toggle an option on/off. \n\n\
"FISH" "Cats like FISH." On \
"LEMON" "You KNOW how it TASTES." on 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/checklist1 b/samples/checklist1
index a0e19b6c81d5..3c08feae8dc2 100755
--- a/samples/checklist1
+++ b/samples/checklist1
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: checklist1,v 1.10 2010/01/13 10:20:03 tom Exp $
+# $Id: checklist1,v 1.11 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -23,6 +23,6 @@ Press SPACE to toggle an option on/off. \n\n\
"Fish" "Cats like fish." On \
"Lemon" "You know how it tastes." on 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/checklist10 b/samples/checklist10
index 2ebd5575a8c5..82fdf77b3efe 100755
--- a/samples/checklist10
+++ b/samples/checklist10
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: checklist10,v 1.9 2010/01/13 10:20:03 tom Exp $
+# $Id: checklist10,v 1.10 2020/11/26 00:03:58 tom Exp $
# zero-width column
. ./setup-vars
@@ -25,6 +25,6 @@ Press SPACE to toggle an option on/off. \n\n\
Noninteractive "" on \
2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/checklist11 b/samples/checklist11
index 85e234991f8c..3e8620e5b418 100755
--- a/samples/checklist11
+++ b/samples/checklist11
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: checklist11,v 1.1 2010/01/17 23:04:01 tom Exp $
+# $Id: checklist11,v 1.2 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -28,6 +28,6 @@ Press SPACE to toggle an option on/off. \n\n\
"Fish" "Cats like fish." On \
"Lemon" "You know how it tastes." on 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/checklist12 b/samples/checklist12
index e23f88b9072b..68c70ae1b9b3 100755
--- a/samples/checklist12
+++ b/samples/checklist12
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: checklist12,v 1.3 2012/12/23 22:27:51 tom Exp $
+# $Id: checklist12,v 1.5 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -23,7 +23,7 @@ $CUT >$input <<-EOF
Fish:Cats like fish.:On
Lemon:You know how it tastes.:on
EOF
-cat $input | sed -e 's/^/"/' -e 's/:/" "/g' -e 's/$/"/' >$output
+sed -e 's/^/"/' -e 's/:/" "/g' -e 's/$/"/' <$input >$output
cat $output >$input
$DIALOG --backtitle "No Such Organization" \
@@ -38,7 +38,7 @@ Press SPACE to toggle an option on/off. \n\n\
Which of the following are fruits?" 20 61 5 \
--file $input 2> $output
-retval=$?
+returncode=$?
tempfile=$output
. ./report-tempfile
diff --git a/samples/checklist2 b/samples/checklist2
index c672a682e1b5..e0d41d86a1e1 100755
--- a/samples/checklist2
+++ b/samples/checklist2
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: checklist2,v 1.11 2010/01/13 10:20:03 tom Exp $
+# $Id: checklist2,v 1.12 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -23,6 +23,6 @@ Press SPACE to toggle an option on/off. \n\n\
"Fish" "Cats like fish." On "not a fruit" \
"Lemon" "You know how it tastes." on "the only one you wouldn't eat" 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/checklist3 b/samples/checklist3
index ce713d4546be..34471e628cd6 100755
--- a/samples/checklist3
+++ b/samples/checklist3
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: checklist3,v 1.11 2010/01/13 10:20:03 tom Exp $
+# $Id: checklist3,v 1.12 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -23,6 +23,6 @@ Press SPACE to toggle an option on/off. \n\n\
"Fish" "Cats like fish. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" On "not a fruit" \
"Lemon" "You know how it tastes. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" on "the only one you wouldn't eat" 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/checklist4 b/samples/checklist4
index 53adeedf95ad..eb6eac6d02e6 100755
--- a/samples/checklist4
+++ b/samples/checklist4
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: checklist4,v 1.12 2010/01/13 10:20:03 tom Exp $
+# $Id: checklist4,v 1.13 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -23,6 +23,6 @@ Press SPACE to toggle an option on/off. \n\n\
"Fish" "Cats like fish. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" On "not a fruit" \
"Lemon" "You know how it tastes. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" on "the only one you wouldn't eat" 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/checklist5 b/samples/checklist5
index 3890c85e09da..a4ccbbc810f7 100755
--- a/samples/checklist5
+++ b/samples/checklist5
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: checklist5,v 1.11 2010/01/13 10:20:03 tom Exp $
+# $Id: checklist5,v 1.12 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -24,6 +24,6 @@ Press SPACE to toggle an option on/off. \n\n\
"Fish" "Cats like fish. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" On "not a fruit" \
"Lemon" "You know how it tastes. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" on "the only one you wouldn't eat" 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/checklist6 b/samples/checklist6
index 1a05d06e3d84..6e75856eb6c2 100755
--- a/samples/checklist6
+++ b/samples/checklist6
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: checklist6,v 1.11 2010/01/13 10:20:03 tom Exp $
+# $Id: checklist6,v 1.12 2020/11/26 00:03:58 tom Exp $
# example showing the --colors option
. ./setup-vars
@@ -25,6 +25,6 @@ Press \Zb\ZrSPACE\Zn to toggle an option on/off. \n\n\
"Fish" "Cats like \Z4fish\Zn. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" On "not a fruit" \
"Lemon" "You know how it \Zr\Zb\Z3tastes\Zn. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" on "the only one you wouldn't eat" 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/checklist7 b/samples/checklist7
index 1080b7eee86b..6ff9f7be4c7c 100755
--- a/samples/checklist7
+++ b/samples/checklist7
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: checklist7,v 1.11 2010/01/13 10:20:03 tom Exp $
+# $Id: checklist7,v 1.12 2020/11/26 00:03:58 tom Exp $
# "checklist6" with --separate-output
. ./setup-vars
@@ -29,6 +29,6 @@ Press \Zb\ZrSPACE\Zn to toggle an option on/off. \n\n\
"Fish" "Cats like \Z4fish\Zn. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" On "not a fruit" \
"Lemon" "You know how it \Zr\Zb\Z3tastes\Zn. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" on "the only one you wouldn't eat" 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/checklist8 b/samples/checklist8
index 2ec1bbde6209..d87b35fe42ea 100755
--- a/samples/checklist8
+++ b/samples/checklist8
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: checklist8,v 1.10 2010/01/13 10:20:03 tom Exp $
+# $Id: checklist8,v 1.11 2020/11/26 00:03:58 tom Exp $
# "checklist7" without --item-help
. ./setup-vars
@@ -28,6 +28,6 @@ Press \Zb\ZrSPACE\Zn to toggle an option on/off. \n\n\
"Fish" "Cats like \Z4fish\Zn. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" On \
"Lemon" "You know how it \Zr\Zb\Z3tastes\Zn. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" on 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/checklist9 b/samples/checklist9
index e8d913fdada6..9e980706d855 100755
--- a/samples/checklist9
+++ b/samples/checklist9
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: checklist9,v 1.8 2010/01/13 10:20:03 tom Exp $
+# $Id: checklist9,v 1.9 2020/11/26 00:03:58 tom Exp $
# "checklist8" using --file
. ./setup-vars
@@ -8,6 +8,6 @@
$DIALOG "$@" --file checklist9.txt 2>$tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/copifuncs/copi.ifmcfg2 b/samples/copifuncs/copi.ifmcfg2
index c8a8c03d664a..4d726f387116 100755
--- a/samples/copifuncs/copi.ifmcfg2
+++ b/samples/copifuncs/copi.ifmcfg2
@@ -17,7 +17,7 @@ packer /usr/bin/zip $F $P
# Maximum arcmail file size, will start new arcmail file if exceeds
maxfsize 65000
-# Maximum packet size, ifmail/ifnews will start new packet if exeeds.
+# Maximum packet size, ifmail/ifnews will start new packet if exceeds.
# .out files are NOT created if nonzero specified, you must run ifpack
# to make packets out. (unimplemented)
maxpsize 65000
@@ -60,7 +60,7 @@ msgidbm /tmp/ifmsgids
# \D untranslated telephone no. (send strings only)
# ModemPort present a blank-separated list of ports with possible speed
-# extention (separated by colon); if speed is prefixed with 'L', it is
+# extension (separated by colon); if speed is prefixed with 'L', it is
# a "locked" port speed, otherwise it is a maximum speed to be set, while
# actual speed is taken from the nodelist. If speed is omitted (or set
# to zero), previous port speed is not changed.
diff --git a/samples/copifuncs/copi.ifmcfg4 b/samples/copifuncs/copi.ifmcfg4
index 4cb7a75b1fca..57ff9fc6ad11 100755
--- a/samples/copifuncs/copi.ifmcfg4
+++ b/samples/copifuncs/copi.ifmcfg4
@@ -7,13 +7,13 @@ ModemError NO\sDIAL
ModemError RING\r
ModemError ERROR
-# Call options (time, address and nodelist flag dependant)
+# Call options (time, address and nodelist flag dependent)
# All matching are applied in the order they are specified.
# Possible options are "[No]Call", "[No]Hold", "[No]PUA", "[No]EMSI",
# "[No]WaZOO", "[No]Freqs", "[No]Zmodem", "[No]ZedZap", "[No]Janus",
# "[No]Hydra". Here, WaZOO stands for YooHoo/2U2 handshake, not for
# the transfer scheme. FTS-0001 handshake and DietIFNA scheme cannot
-# be disallowed (because they are mandatory by standart). "Hold"
+# be disallowed (because they are mandatory by standard). "Hold"
# means really hold "hold" type packets and files: do not send them
# if our system initiated the session, "NoHold" means send "hold"
# packets when our system initiated the session. "NoPUA" stands for
diff --git a/samples/dialog.py b/samples/dialog.py
index 5286b41f1db2..ef6e8626b3c0 100644
--- a/samples/dialog.py
+++ b/samples/dialog.py
@@ -1,5 +1,5 @@
#!/usr/bin/python
-# $Id: dialog.py,v 1.4 2012/06/29 09:33:18 tom Exp $
+# $Id: dialog.py,v 1.5 2019/12/10 22:52:52 tom Exp $
# Module: dialog.py
# Copyright (c) 2000 Robb Shecter <robb@acm.org>
# All rights reserved.
@@ -252,11 +252,11 @@ class Dialog:
def gauge_start(self, perc=0, text='', height=8, width=54, title=''):
"""
Display gauge output window.
- Gauge normal usage (assuming that there is an instace of 'Dialog'
+ Gauge normal usage (assuming that there is an instance of 'Dialog'
class named 'd'):
d.gauge_start()
# do something
- d.gauge_iterate(10) # passed throgh 10%
+ d.gauge_iterate(10) # passed through 10%
# ...
d.gauge_iterate(100, 'any text here') # work is done
d.stop_gauge() # clean-up actions
diff --git a/samples/dselect b/samples/dselect
index 9da035dab95d..24ea94022715 100755
--- a/samples/dselect
+++ b/samples/dselect
@@ -1,11 +1,11 @@
#!/bin/sh
-# $Id: dselect,v 1.7 2016/01/26 22:52:53 tom Exp $
+# $Id: dselect,v 1.10 2020/11/26 00:09:12 tom Exp $
. ./setup-vars
exec 3>&1
-RESULT=`$DIALOG --title "Please choose a file" "$@" --dselect $HOME/ 14 48 2>&1 1>&3`
-retval=$?
+returntext=`$DIALOG --title "Please choose a file" "$@" --dselect "$HOME/" 14 48 2>&1 1>&3`
+returncode=$?
exec 3>&-
. ./report-string
diff --git a/samples/editbox b/samples/editbox
index 8ae4c63721d9..f59d344c4b3a 100755
--- a/samples/editbox
+++ b/samples/editbox
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: editbox,v 1.13 2010/01/13 10:20:03 tom Exp $
+# $Id: editbox,v 1.14 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -40,6 +40,6 @@ EOF
$DIALOG --title "EDIT BOX" \
--fixed-font "$@" --editbox $input 0 0 2>$output
-retval=$?
+returncode=$?
. ./report-edit
diff --git a/samples/editbox-utf8 b/samples/editbox-utf8
index 94f2fab69d20..aac84714566c 100755
--- a/samples/editbox-utf8
+++ b/samples/editbox-utf8
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: editbox-utf8,v 1.9 2010/01/13 10:20:03 tom Exp $
+# $Id: editbox-utf8,v 1.10 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -30,6 +30,6 @@ EOF
$DIALOG --title "EDIT BOX" \
--fixed-font "$@" --editbox $input 0 0 2>$output
-retval=$?
+returncode=$?
. ./report-edit
diff --git a/samples/editbox2 b/samples/editbox2
index 66623948751b..e483c2d36e85 100755
--- a/samples/editbox2
+++ b/samples/editbox2
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: editbox2,v 1.7 2010/01/13 10:20:03 tom Exp $
+# $Id: editbox2,v 1.8 2020/11/26 00:03:58 tom Exp $
# example with extra- and help-buttons
. ./setup-vars
@@ -40,6 +40,6 @@ $DIALOG --title "EDIT BOX" \
--extra-button \
--help-button \
--fixed-font "$@" --editbox $input 0 0 2>$output
-retval=$?
+returncode=$?
. ./report-edit
diff --git a/samples/editbox3 b/samples/editbox3
index aba30bd6f71e..6e96ff5d1885 100755
--- a/samples/editbox3
+++ b/samples/editbox3
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: editbox3,v 1.7 2010/01/13 10:20:03 tom Exp $
+# $Id: editbox3,v 1.8 2020/11/26 00:03:58 tom Exp $
# example with extra- and help-buttons
. ./setup-vars
@@ -13,6 +13,6 @@ $DIALOG --title "EDIT BOX" \
--extra-button \
--help-button \
--fixed-font "$@" --editbox $input 0 0 2>$output
-retval=$?
+returncode=$?
. ./report-edit
diff --git a/samples/editbox4 b/samples/editbox4
index 8153facf1e83..68daf836c64e 100755
--- a/samples/editbox4
+++ b/samples/editbox4
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: editbox4,v 1.1 2010/01/17 22:29:50 tom Exp $
+# $Id: editbox4,v 1.2 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -40,6 +40,6 @@ EOF
$DIALOG --title "EDIT BOX" \
--fixed-font "$@" --editbox $input 20 40 2>$output
-retval=$?
+returncode=$?
. ./report-edit
diff --git a/samples/form1 b/samples/form1
index 38e23649a591..b739196187bc 100755
--- a/samples/form1
+++ b/samples/form1
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: form1,v 1.15 2011/10/04 23:36:53 tom Exp $
+# $Id: form1,v 1.18 2020/11/26 00:34:39 tom Exp $
. ./setup-vars
@@ -19,7 +19,7 @@ returncode=0
while test $returncode != 1 && test $returncode != 250
do
exec 3>&1
-value=`$DIALOG --ok-label "Submit" \
+returntext=`$DIALOG --ok-label "Submit" \
--backtitle "$backtitle" "$@" \
--form "Here is a possible piece of a configuration program." \
20 50 0 \
@@ -31,7 +31,7 @@ value=`$DIALOG --ok-label "Submit" \
returncode=$?
exec 3>&-
-show=`echo "$value" |sed -e 's/^/ /'`
+show=`echo "$returntext" |sed -e 's/^/ /'`
case $returncode in
$DIALOG_CANCEL)
@@ -63,16 +63,8 @@ $show" 10 40
echo "Button 3 (Extra) pressed."
exit
;;
- $DIALOG_ERROR)
- echo "ERROR!$value"
- exit
- ;;
- $DIALOG_ESC)
- echo "ESC pressed."
- exit
- ;;
*)
- echo "Return code was $returncode"
+ . ./report-button
exit
;;
esac
diff --git a/samples/form1-both b/samples/form1-both
index f571830fc454..36aa560e36bb 100755
--- a/samples/form1-both
+++ b/samples/form1-both
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: form1-both,v 1.5 2010/01/13 10:47:35 tom Exp $
+# $Id: form1-both,v 1.8 2020/11/26 00:34:22 tom Exp $
. ./setup-vars
@@ -16,7 +16,7 @@ returncode=0
while test $returncode != 1 && test $returncode != 250
do
exec 3>&1
-value=`$DIALOG --ok-label "Submit" \
+returntext=`$DIALOG --ok-label "Submit" \
--extra-button --help-button \
--backtitle "$backtitle" "$@" \
--form "Here is a possible piece of a configuration program." \
@@ -29,7 +29,7 @@ value=`$DIALOG --ok-label "Submit" \
returncode=$?
exec 3>&-
-show=`echo "$value" |sed -e 's/^/ /'`
+show=`echo "$returntext" |sed -e 's/^/ /'`
case $returncode in
$DIALOG_CANCEL)
@@ -53,16 +53,8 @@ show=`echo "$value" |sed -e 's/^/ /'`
--msgbox "Resulting data:\n\
$show" 10 40
;;
- $DIALOG_HELP)
- echo "Button 2 (Help) pressed."
- exit
- ;;
- $DIALOG_EXTRA)
- echo "Button 3 (Extra) pressed."
- exit
- ;;
*)
- echo "Return code was $returncode"
+ . ./report-button
exit
;;
esac
diff --git a/samples/form1-extra b/samples/form1-extra
index ca180a96ec1a..46018f808996 100755
--- a/samples/form1-extra
+++ b/samples/form1-extra
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: form1-extra,v 1.5 2010/01/13 10:47:35 tom Exp $
+# $Id: form1-extra,v 1.8 2020/11/26 00:34:05 tom Exp $
. ./setup-vars
@@ -16,7 +16,7 @@ returncode=0
while test $returncode != 1 && test $returncode != 250
do
exec 3>&1
-value=`$DIALOG --ok-label "Submit" \
+returntext=`$DIALOG --ok-label "Submit" \
--extra-button \
--backtitle "$backtitle" "$@" \
--form "Here is a possible piece of a configuration program." \
@@ -29,7 +29,7 @@ value=`$DIALOG --ok-label "Submit" \
returncode=$?
exec 3>&-
-show=`echo "$value" |sed -e 's/^/ /'`
+show=`echo "$returntext" |sed -e 's/^/ /'`
case $returncode in
$DIALOG_CANCEL)
@@ -53,16 +53,8 @@ show=`echo "$value" |sed -e 's/^/ /'`
--msgbox "Resulting data:\n\
$show" 10 40
;;
- $DIALOG_HELP)
- echo "Button 2 (Help) pressed."
- exit
- ;;
- $DIALOG_EXTRA)
- echo "Button 3 (Extra) pressed."
- exit
- ;;
*)
- echo "Return code was $returncode"
+ . ./report-button
exit
;;
esac
diff --git a/samples/form1-help b/samples/form1-help
index 44c5543f60e3..9dcd3ca66de6 100755
--- a/samples/form1-help
+++ b/samples/form1-help
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: form1-help,v 1.5 2010/01/13 10:47:35 tom Exp $
+# $Id: form1-help,v 1.8 2020/11/26 00:33:42 tom Exp $
. ./setup-vars
@@ -16,7 +16,7 @@ returncode=0
while test $returncode != 1 && test $returncode != 250
do
exec 3>&1
-value=`$DIALOG --ok-label "Submit" \
+returntext=`$DIALOG --ok-label "Submit" \
--help-button \
--backtitle "$backtitle" "$@" \
--form "Here is a possible piece of a configuration program." \
@@ -29,7 +29,7 @@ value=`$DIALOG --ok-label "Submit" \
returncode=$?
exec 3>&-
-show=`echo "$value" |sed -e 's/^/ /'`
+show=`echo "$returntext" |sed -e 's/^/ /'`
case $returncode in
$DIALOG_CANCEL)
@@ -53,16 +53,8 @@ show=`echo "$value" |sed -e 's/^/ /'`
--msgbox "Resulting data:\n\
$show" 10 40
;;
- $DIALOG_HELP)
- echo "Button 2 (Help) pressed."
- exit
- ;;
- $DIALOG_EXTRA)
- echo "Button 3 (Extra) pressed."
- exit
- ;;
*)
- echo "Return code was $returncode"
+ . ./report-button
exit
;;
esac
diff --git a/samples/form1-utf8 b/samples/form1-utf8
index a2be4a6cf15e..21d655d61ae4 100755
--- a/samples/form1-utf8
+++ b/samples/form1-utf8
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: form1-utf8,v 1.7 2010/01/13 10:47:35 tom Exp $
+# $Id: form1-utf8,v 1.10 2020/11/26 00:33:23 tom Exp $
. ./setup-vars
@@ -18,7 +18,7 @@ returncode=0
while test $returncode != 1 && test $returncode != 250
do
exec 3>&1
-value=`$DIALOG --ok-label "Submit" \
+returntext=`$DIALOG --ok-label "Submit" \
--backtitle "$backtitle" \
--insecure "$@" \
--form "Here is a possible piece of a configuration program." \
@@ -31,7 +31,7 @@ value=`$DIALOG --ok-label "Submit" \
returncode=$?
exec 3>&-
-show=`echo "$value" |sed -e 's/^/ /'`
+show=`echo "$returntext" |sed -e 's/^/ /'`
case $returncode in
$DIALOG_CANCEL)
@@ -55,16 +55,8 @@ show=`echo "$value" |sed -e 's/^/ /'`
--msgbox "Resulting data:\n\
$show" 10 40
;;
- $DIALOG_HELP)
- echo "Button 2 (Help) pressed."
- exit
- ;;
- $DIALOG_EXTRA)
- echo "Button 3 (Extra) pressed."
- exit
- ;;
*)
- echo "Return code was $returncode"
+ . ./report-button
exit
;;
esac
diff --git a/samples/form2 b/samples/form2
index a005be3c2bf1..ab2fe430501a 100755
--- a/samples/form2
+++ b/samples/form2
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: form2,v 1.9 2010/01/13 10:53:11 tom Exp $
+# $Id: form2,v 1.12 2020/11/26 00:33:02 tom Exp $
. ./setup-vars
@@ -16,7 +16,7 @@ returncode=0
while test $returncode != 1 && test $returncode != 250
do
exec 3>&1
-value=`$DIALOG --ok-label "Submit" \
+returntext=`$DIALOG --ok-label "Submit" \
--backtitle "$backtitle" "$@" \
--form "Here is a possible piece of a configuration program." \
0 0 10 \
@@ -52,7 +52,7 @@ value=`$DIALOG --ok-label "Submit" \
returncode=$?
exec 3>&-
-show=`echo "$value" |sed -e 's/^/ /'`
+show=`echo "$returntext" |sed -e 's/^/ /'`
case $returncode in
$DIALOG_CANCEL)
@@ -77,7 +77,7 @@ show=`echo "$value" |sed -e 's/^/ /'`
$show" 0 0
;;
*)
- echo "Return code was $returncode"
+ . ./report-button
exit
;;
esac
diff --git a/samples/form3 b/samples/form3
index c3ac6d5306e5..9a6b256b363f 100755
--- a/samples/form3
+++ b/samples/form3
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: form3,v 1.6 2010/01/13 10:49:52 tom Exp $
+# $Id: form3,v 1.9 2020/11/26 00:32:45 tom Exp $
# form1 with --help-button
. ./setup-vars
@@ -17,7 +17,7 @@ returncode=0
while test $returncode != 1 && test $returncode != 250
do
exec 3>&1
-value=`$DIALOG --ok-label "Submit" \
+returntext=`$DIALOG --ok-label "Submit" \
--help-button \
--backtitle "$backtitle" "$@" \
--form "Here is a possible piece of a configuration program." \
@@ -30,7 +30,7 @@ value=`$DIALOG --ok-label "Submit" \
returncode=$?
exec 3>&-
-show=`echo "$value" |sed -e 's/^/ /'`
+show=`echo "$returntext" |sed -e 's/^/ /'`
case $returncode in
$DIALOG_CANCEL)
@@ -62,7 +62,7 @@ $show" 10 40
$show" 10 40
;;
*)
- echo "Return code was $returncode"
+ . ./report-button
exit
;;
esac
diff --git a/samples/form4 b/samples/form4
index a733865015c6..1e5d5b0e7f3c 100755
--- a/samples/form4
+++ b/samples/form4
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: form4,v 1.6 2010/01/13 10:49:52 tom Exp $
+# $Id: form4,v 1.9 2020/11/26 00:32:31 tom Exp $
# form3 with --item-help
. ./setup-vars
@@ -17,7 +17,7 @@ returncode=0
while test $returncode != 1 && test $returncode != 250
do
exec 3>&1
-value=`$DIALOG --ok-label "Submit" \
+returntext=`$DIALOG --ok-label "Submit" \
--help-button \
--item-help \
--backtitle "$backtitle" "$@" \
@@ -31,7 +31,7 @@ value=`$DIALOG --ok-label "Submit" \
returncode=$?
exec 3>&-
-show=`echo "$value" |sed -e 's/^/ /'`
+show=`echo "$returntext" |sed -e 's/^/ /'`
case $returncode in
$DIALOG_CANCEL)
@@ -63,7 +63,7 @@ $show" 10 40
$show" 10 40
;;
*)
- echo "Return code was $returncode"
+ . ./report-button
exit
;;
esac
diff --git a/samples/form5 b/samples/form5
index 649c3872d12b..253434110b5e 100755
--- a/samples/form5
+++ b/samples/form5
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: form5,v 1.6 2010/01/13 10:49:52 tom Exp $
+# $Id: form5,v 1.9 2020/11/26 00:32:17 tom Exp $
# form4 with --help-status
. ./setup-vars
@@ -17,7 +17,7 @@ returncode=0
while test $returncode != 1 && test $returncode != 250
do
exec 3>&1
-value=`$DIALOG --ok-label "Submit" \
+returntext=`$DIALOG --ok-label "Submit" \
--help-status \
--help-button \
--item-help \
@@ -32,7 +32,7 @@ value=`$DIALOG --ok-label "Submit" \
returncode=$?
exec 3>&-
-show=`echo "$value" |sed -e 's/^/ /'`
+show=`echo "$returntext" |sed -e 's/^/ /'`
case $returncode in
$DIALOG_CANCEL)
@@ -64,7 +64,7 @@ $show" 10 40
$show" 10 40
;;
*)
- echo "Return code was $returncode"
+ . ./report-button
exit
;;
esac
diff --git a/samples/form6 b/samples/form6
index 8b5483f4f4c1..29195b9f8322 100755
--- a/samples/form6
+++ b/samples/form6
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: form6,v 1.5 2010/01/13 10:49:52 tom Exp $
+# $Id: form6,v 1.8 2020/11/26 00:31:55 tom Exp $
# form4 with --help-status
. ./setup-vars
@@ -17,7 +17,7 @@ returncode=0
while test $returncode != 1 && test $returncode != 250
do
exec 3>&1
-value=`$DIALOG --ok-label "Submit" \
+returntext=`$DIALOG --ok-label "Submit" \
--help-status \
--help-button \
--item-help \
@@ -32,7 +32,7 @@ value=`$DIALOG --ok-label "Submit" \
returncode=$?
exec 3>&-
-show=`echo "$value" |sed -e 's/^/ /'`
+show=`echo "$returntext" |sed -e 's/^/ /'`
case $returncode in
$DIALOG_CANCEL)
@@ -64,7 +64,7 @@ $show" 10 40
$show" 10 40
;;
*)
- echo "Return code was $returncode"
+ . ./report-button
exit
;;
esac
diff --git a/samples/fselect b/samples/fselect
index 20b8304331a1..45bb68da4874 100755
--- a/samples/fselect
+++ b/samples/fselect
@@ -1,11 +1,11 @@
#!/bin/sh
-# $Id: fselect,v 1.11 2010/01/13 10:20:03 tom Exp $
+# $Id: fselect,v 1.14 2020/11/26 00:09:12 tom Exp $
. ./setup-vars
exec 3>&1
-RESULT=`$DIALOG --title "Please choose a file" "$@" --fselect $HOME/ 14 48 2>&1 1>&3`
-retval=$?
+returntext=`$DIALOG --title "Please choose a file" "$@" --fselect "$HOME/" 14 48 2>&1 1>&3`
+returncode=$?
exec 3>&-
. ./report-string
diff --git a/samples/fselect-stdout b/samples/fselect-stdout
index 02eefdb7b34c..0f2f5cbf21cf 100755
--- a/samples/fselect-stdout
+++ b/samples/fselect-stdout
@@ -1,9 +1,9 @@
#!/bin/sh
-# $Id: fselect-stdout,v 1.6 2010/01/13 10:20:03 tom Exp $
+# $Id: fselect-stdout,v 1.9 2020/11/26 00:09:12 tom Exp $
. ./setup-vars
-RESULT=`$DIALOG --stdout --title "Please choose a file" "$@" --fselect $HOME/ 14 48`
-retval=$?
+returntext=`$DIALOG --stdout --title "Please choose a file" "$@" --fselect "$HOME/" 14 48`
+returncode=$?
. ./report-string
diff --git a/samples/fselect0 b/samples/fselect0
index 3bd5b6d962a8..49249b43a071 100755
--- a/samples/fselect0
+++ b/samples/fselect0
@@ -1,11 +1,11 @@
#!/bin/sh
-# $Id: fselect0,v 1.1 2011/10/14 08:32:48 tom Exp $
+# $Id: fselect0,v 1.3 2020/11/26 00:09:12 tom Exp $
. ./setup-vars
exec 3>&1
-RESULT=`$DIALOG --title "Please choose a file" "$@" --fselect '' 14 48 2>&1 1>&3`
-retval=$?
+returntext=`$DIALOG --title "Please choose a file" "$@" --fselect '' 14 48 2>&1 1>&3`
+returncode=$?
exec 3>&-
. ./report-string
diff --git a/samples/fselect1 b/samples/fselect1
index 591379417176..4b312673c497 100755
--- a/samples/fselect1
+++ b/samples/fselect1
@@ -1,20 +1,20 @@
#!/bin/sh
-# $Id: fselect1,v 1.9 2010/01/13 10:20:03 tom Exp $
+# $Id: fselect1,v 1.12 2020/11/26 00:09:12 tom Exp $
. ./setup-vars
FILE=$HOME
for n in .cshrc .profile .bashrc
do
- if test -f $HOME/$n ; then
+ if test -f "$HOME/$n" ; then
FILE=$HOME/$n
break
fi
done
exec 3>&1
-RESULT=`$DIALOG --title "Please choose a file" "$@" --fselect $FILE 14 48 2>&1 1>&3`
-retval=$?
+returntext=`$DIALOG --title "Please choose a file" "$@" --fselect "$FILE" 14 48 2>&1 1>&3`
+returncode=$?
exec 3>&-
. ./report-string
diff --git a/samples/fselect1-stdout b/samples/fselect1-stdout
index 01d1135622f7..b1406837ffee 100755
--- a/samples/fselect1-stdout
+++ b/samples/fselect1-stdout
@@ -1,18 +1,18 @@
#!/bin/sh
-# $Id: fselect1-stdout,v 1.6 2010/01/13 10:20:03 tom Exp $
+# $Id: fselect1-stdout,v 1.9 2020/11/26 00:09:12 tom Exp $
. ./setup-vars
FILE=$HOME
for n in .cshrc .profile .bashrc
do
- if test -f $HOME/$n ; then
+ if test -f "$HOME/$n" ; then
FILE=$HOME/$n
break
fi
done
-RESULT=`$DIALOG --stdout --title "Please choose a file" "$@" --fselect $FILE 14 48`
-retval=$?
+returntext=`$DIALOG --stdout --title "Please choose a file" "$@" --fselect "$FILE" 14 48`
+returncode=$?
. ./report-string
diff --git a/samples/fselect2 b/samples/fselect2
index 6480c753bb10..63526dce5a26 100755
--- a/samples/fselect2
+++ b/samples/fselect2
@@ -1,11 +1,11 @@
#!/bin/sh
-# $Id: fselect2,v 1.8 2010/01/13 10:20:03 tom Exp $
+# $Id: fselect2,v 1.11 2020/11/26 00:09:12 tom Exp $
. ./setup-vars
exec 3>&1
-RESULT=`$DIALOG --title "Please choose a file" "$@" --fselect $HOME/ 0 0 2>&1 1>&3`
-retval=$?
+returntext=`$DIALOG --title "Please choose a file" "$@" --fselect "$HOME/" 0 0 2>&1 1>&3`
+returncode=$?
exec 3>&-
. ./report-string
diff --git a/samples/fselect2-stdout b/samples/fselect2-stdout
index 644fb2a5bf7d..c2c188ac6584 100755
--- a/samples/fselect2-stdout
+++ b/samples/fselect2-stdout
@@ -1,9 +1,9 @@
#!/bin/sh
-# $Id: fselect2-stdout,v 1.6 2010/01/13 10:20:03 tom Exp $
+# $Id: fselect2-stdout,v 1.9 2020/11/26 00:09:12 tom Exp $
. ./setup-vars
-RESULT=`$DIALOG --stdout --title "Please choose a file" "$@" --fselect $HOME/ 0 0`
-retval=$?
+returntext=`$DIALOG --stdout --title "Please choose a file" "$@" --fselect "$HOME/" 0 0`
+returncode=$?
. ./report-string
diff --git a/samples/gauge2 b/samples/gauge2
index 10455d144c62..f791410673af 100755
--- a/samples/gauge2
+++ b/samples/gauge2
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: gauge2,v 1.8 2010/01/13 10:26:52 tom Exp $
+# $Id: gauge2,v 1.9 2019/12/10 23:37:10 tom Exp $
# The original dialog program assumed the first line after the first "XXX"
# was a percentage value (compare with "gauge" script).
@@ -22,7 +22,7 @@ echo "100") | \
$DIALOG --title "GAUGE" "$@" --gauge "Hi, this is a gauge widget" 10 40 0
-if [ "$?" = $DIALOG_ESC ] ; then
+if [ "$?" = "$DIALOG_ESC" ] ; then
echo ""
echo "Box closed !"
fi
diff --git a/samples/infobox b/samples/infobox
index 91dd5dd9e055..9f2da62c4a55 100755
--- a/samples/infobox
+++ b/samples/infobox
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: infobox,v 1.8 2010/01/13 10:20:03 tom Exp $
+# $Id: infobox,v 1.9 2019/12/10 23:37:10 tom Exp $
. ./setup-vars
@@ -17,5 +17,5 @@ the message. The pause here is only introduced
by the sleep command within dialog.
You have $left $unit to read this..." 10 52
left=`expr $left - 1`
-test $left = 1 && unit="second"
+test "$left" = 1 && unit="second"
done
diff --git a/samples/infobox1 b/samples/infobox1
index 4ee6c9ff7993..3cc7f27ce350 100755
--- a/samples/infobox1
+++ b/samples/infobox1
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: infobox1,v 1.4 2010/01/13 10:20:03 tom Exp $
+# $Id: infobox1,v 1.5 2019/12/10 23:37:10 tom Exp $
. ./setup-vars
@@ -17,5 +17,5 @@ the message. The pause here is only introduced
by a sleep command in the shell script.
You have $left $unit to read this..." 10 52
left=`expr $left - 1`
-test $left = 1 && unit="second"
+test "$left" = 1 && unit="second"
done
diff --git a/samples/infobox2 b/samples/infobox2
index fdf64caa85f6..08deb71901ba 100755
--- a/samples/infobox2
+++ b/samples/infobox2
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: infobox2,v 1.5 2010/01/13 10:20:03 tom Exp $
+# $Id: infobox2,v 1.6 2019/12/10 23:37:10 tom Exp $
. ./setup-vars
@@ -17,5 +17,5 @@ the message. The pause here is only introduced
by the sleep command within dialog.
You have $left $unit to read this..." 0 0
left=`expr $left - 1`
-test $left = 1 && unit="second"
+test "$left" = 1 && unit="second"
done
diff --git a/samples/infobox3 b/samples/infobox3
index edba1dfd98f4..3c773b8f69af 100755
--- a/samples/infobox3
+++ b/samples/infobox3
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: infobox3,v 1.5 2010/01/13 10:20:03 tom Exp $
+# $Id: infobox3,v 1.6 2019/12/10 23:37:10 tom Exp $
. ./setup-vars
@@ -18,5 +18,5 @@ the message. The pause here is only introduced
by the sleep command within dialog.
You have $left $unit to read this..." 0 0
left=`expr $left - 1`
-test $left = 1 && unit="second"
+test "$left" = 1 && unit="second"
done
diff --git a/samples/infobox4 b/samples/infobox4
index 7c96d6b4e46d..816b8417a0d6 100755
--- a/samples/infobox4
+++ b/samples/infobox4
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: infobox4,v 1.5 2010/01/13 10:20:03 tom Exp $
+# $Id: infobox4,v 1.6 2019/12/10 23:37:10 tom Exp $
. ./setup-vars
@@ -18,5 +18,5 @@ the message. The pause here is only introduced
by the sleep command within dialog.
You have $left $unit to read this..." 0 0
left=`expr $left - 1`
-test $left = 1 && unit="second"
+test "$left" = 1 && unit="second"
done
diff --git a/samples/infobox5 b/samples/infobox5
index 58512c90e572..b93e1de8b13b 100755
--- a/samples/infobox5
+++ b/samples/infobox5
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: infobox5,v 1.7 2011/01/18 09:19:09 tom Exp $
+# $Id: infobox5,v 1.8 2019/12/10 23:38:49 tom Exp $
# get rid of all flickering by constructing a script unroll the loop, leaving
# us in curses-mode until we're done counting.
@@ -31,7 +31,7 @@ You have $left $unit to read this..." 0 0 $last
EOF
left=`expr $left - 1`
-test $left = 1 && unit="second"
+test "$left" = 1 && unit="second"
done
echo >>$tempfile
diff --git a/samples/infobox6 b/samples/infobox6
index a3a06cef2829..c81232d6e216 100755
--- a/samples/infobox6
+++ b/samples/infobox6
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: infobox6,v 1.7 2011/01/18 09:20:59 tom Exp $
+# $Id: infobox6,v 1.8 2019/12/10 23:38:49 tom Exp $
# get rid of all flickering by constructing a script unroll the loop, leaving
# us in curses-mode until we're done counting.
#
@@ -33,7 +33,7 @@ You have $left $unit to read this..." 0 0 $last
EOF
left=`expr $left - 1`
-test $left = 1 && unit="second"
+test "$left" = 1 && unit="second"
done
echo >>$tempfile
diff --git a/samples/inputbox b/samples/inputbox
index 9975d441d75b..d249e83687f2 100755
--- a/samples/inputbox
+++ b/samples/inputbox
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: inputbox,v 1.11 2010/01/13 10:06:01 tom Exp $
+# $Id: inputbox,v 1.12 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -15,6 +15,6 @@ input field will be automatically scrolled. \n
You can use BACKSPACE to correct errors. \n\n
Try entering your name below:" 16 51 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/inputbox-both b/samples/inputbox-both
index 4103ccf811cf..2f8681be6398 100755
--- a/samples/inputbox-both
+++ b/samples/inputbox-both
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: inputbox-both,v 1.6 2010/01/13 10:20:03 tom Exp $
+# $Id: inputbox-both,v 1.7 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -17,6 +17,6 @@ input field will be automatically scrolled. \n
You can use BACKSPACE to correct errors. \n\n
Try entering your name below:" 16 51 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/inputbox-extra b/samples/inputbox-extra
index 9f2277c940a1..a297392bb505 100755
--- a/samples/inputbox-extra
+++ b/samples/inputbox-extra
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: inputbox-extra,v 1.6 2010/01/13 10:20:03 tom Exp $
+# $Id: inputbox-extra,v 1.7 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -16,6 +16,6 @@ input field will be automatically scrolled. \n
You can use BACKSPACE to correct errors. \n\n
Try entering your name below:" 16 51 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/inputbox-help b/samples/inputbox-help
index 0dfe7c81462f..9aa0517a969c 100755
--- a/samples/inputbox-help
+++ b/samples/inputbox-help
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: inputbox-help,v 1.6 2010/01/13 10:20:03 tom Exp $
+# $Id: inputbox-help,v 1.7 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -16,6 +16,6 @@ input field will be automatically scrolled. \n
You can use BACKSPACE to correct errors. \n\n
Try entering your name below:" 16 51 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/inputbox1 b/samples/inputbox1
index 487aa8c5edf9..44f408028b30 100755
--- a/samples/inputbox1
+++ b/samples/inputbox1
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: inputbox1,v 1.13 2010/01/13 10:20:03 tom Exp $
+# $Id: inputbox1,v 1.14 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -18,6 +18,6 @@ You can use BACKSPACE to correct errors.
Try entering your name below:" 0 0 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/inputbox2 b/samples/inputbox2
index f7b4b5f7df60..baa6605e33dd 100755
--- a/samples/inputbox2
+++ b/samples/inputbox2
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: inputbox2,v 1.9 2010/01/13 10:20:03 tom Exp $
+# $Id: inputbox2,v 1.10 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -15,6 +15,6 @@ input field will be automatically scrolled. \n
You can use BACKSPACE to correct errors. \n\n
Try entering your name below:" 16 51 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/inputbox3 b/samples/inputbox3
index d343e0a64cc3..2f6623b61c03 100755
--- a/samples/inputbox3
+++ b/samples/inputbox3
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: inputbox3,v 1.7 2010/01/13 10:20:03 tom Exp $
+# $Id: inputbox3,v 1.8 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -16,6 +16,6 @@ input field will be automatically scrolled. \n\
You can use BACKSPACE to correct errors. \n\n\
Try entering your name below:" 16 51 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/inputbox4 b/samples/inputbox4
index 416bf86a8603..76bd8ae77f8f 100755
--- a/samples/inputbox4
+++ b/samples/inputbox4
@@ -1,11 +1,11 @@
#!/bin/sh
-# $Id: inputbox4,v 1.7 2010/01/13 10:28:12 tom Exp $
+# $Id: inputbox4,v 1.9 2020/11/26 00:09:12 tom Exp $
# An example which does not use temporary files, as suggested by Cary Evans:
. ./setup-vars
exec 3>&1
-RESULT=`$DIALOG --title "INPUT BOX" --clear "$@" \
+returntext=`$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
@@ -14,7 +14,7 @@ width of the input box, in that case, the \n
input field will be automatically scrolled. \n
You can use BACKSPACE to correct errors. \n\n
Try entering your name below:" 16 51 2>&1 1>&3`
-retval=$?
+returncode=$?
exec 3>&-
. ./report-string
diff --git a/samples/inputbox5 b/samples/inputbox5
index ad7262341692..2c87f6944165 100755
--- a/samples/inputbox5
+++ b/samples/inputbox5
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: inputbox5,v 1.7 2010/01/13 10:20:03 tom Exp $
+# $Id: inputbox5,v 1.8 2020/11/26 00:03:58 tom Exp $
# use --output-fd to write to a different output than stderr
. ./setup-vars
@@ -16,6 +16,6 @@ input field will be automatically scrolled. \n
You can use BACKSPACE to correct errors. \n\n
Try entering your name below:" 16 51 4> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/inputbox6-8bit b/samples/inputbox6-8bit
index b7692e8826aa..15e084ae3f9c 100755
--- a/samples/inputbox6-8bit
+++ b/samples/inputbox6-8bit
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: inputbox6-8bit,v 1.6 2010/01/13 10:20:03 tom Exp $
+# $Id: inputbox6-8bit,v 1.8 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -8,10 +8,10 @@
. ./testdata-8bit
$DIALOG \
---title `printf "$SAMPLE"` "$@" \
---inputbox `printf "$SAMPLE"` \
-10 40 `printf "$SAMPLE"` 2>$tempfile
+--title "`printf '%s' "$SAMPLE"`" "$@" \
+--inputbox "`printf '%s' "$SAMPLE"`" \
+10 40 "`printf '%s' "$SAMPLE"`" 2>$tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/inputbox6-utf8 b/samples/inputbox6-utf8
index 056757ed77e9..b2ccd34766f2 100755
--- a/samples/inputbox6-utf8
+++ b/samples/inputbox6-utf8
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: inputbox6-utf8,v 1.9 2013/09/24 00:06:02 tom Exp $
+# $Id: inputbox6-utf8,v 1.10 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -13,6 +13,6 @@ $DIALOG \
--title "$TITLE" "$@" \
--inputbox "$TITLE" 10 20 "D.O.G" 2>$tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/inputbox7 b/samples/inputbox7
index e79d9cc584b2..ed608cb927f1 100755
--- a/samples/inputbox7
+++ b/samples/inputbox7
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: inputbox7,v 1.7 2010/01/13 10:20:03 tom Exp $
+# $Id: inputbox7,v 1.9 2020/11/26 00:09:12 tom Exp $
# An example which produces two widget outputs.
. ./setup-vars
@@ -18,12 +18,12 @@ SEP='
'
exec 3>&1
-RESULT=`$DIALOG --title "INPUT BOX" --clear --separate-widget "$SEP" "$@" \
+returntext=`$DIALOG --title "INPUT BOX" --clear --separate-widget "$SEP" "$@" \
--inputbox "$MSG" 16 51 \
--title "ANOTHER INPUT BOX" \
--inputbox "$MSG" 16 51 \
2>&1 1>&3`
-retval=$?
+returncode=$?
exec 3>&-
. ./report-string
diff --git a/samples/inputmenu b/samples/inputmenu
index 3c808111dc13..9f6d818ac2e1 100755
--- a/samples/inputmenu
+++ b/samples/inputmenu
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: inputmenu,v 1.15 2012/07/06 18:11:21 tom Exp $
+# $Id: inputmenu,v 1.19 2020/11/26 00:30:23 tom Exp $
# 2002 - written by Tobias Rittweiler <tobrit@freebits.de>
. ./setup-vars
@@ -9,9 +9,9 @@ uid=`id|sed -e 's/^uid=//' -e 's/(.*//'`
gid=`id|sed -e 's/^.*gid=//' -e 's/(.*//'`
home="$HOME"
-while [ ${returncode:-99} -ne 1 -a ${returncode:-99} -ne 250 ]; do
+while [ "${returncode:-99}" -ne 1 ] && [ "${returncode:-99}" -ne 250 ]; do
exec 3>&1
- value=`$DIALOG \
+ returntext=`$DIALOG \
--clear --ok-label "Create" \
--backtitle "An Example for the use of --inputmenu:" "$@" \
--inputmenu "Originally I designed --inputmenu for a \
@@ -44,7 +44,7 @@ configuration purpose. Here is a possible piece of a configuration program. \
$user" 10 40
;;
$DIALOG_EXTRA)
- value=`echo "$value" | sed -e 's/^RENAMED //'`
+ value=`echo "$returntext" | sed -e 's/^RENAMED //'`
tag=`echo "$value" | sed -e 's/:.*//'`
item=`echo "$value" | sed -e 's/^[^:]*:[ ][ ]*//'`
@@ -56,8 +56,8 @@ configuration purpose. Here is a possible piece of a configuration program. \
esac
;;
- $DIALOG_ESC)
- echo "ESC pressed."
+ *)
+ . ./report-button
break
;;
diff --git a/samples/inputmenu-stdout b/samples/inputmenu-stdout
index a778226b486d..35384d34f167 100755
--- a/samples/inputmenu-stdout
+++ b/samples/inputmenu-stdout
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: inputmenu-stdout,v 1.13 2012/07/06 18:11:12 tom Exp $
+# $Id: inputmenu-stdout,v 1.17 2020/11/26 00:30:01 tom Exp $
# 2002 - written by Tobias Rittweiler <tobrit@freebits.de>
. ./setup-vars
@@ -9,8 +9,8 @@ uid=`id|sed -e 's/^uid=//' -e 's/(.*//'`
gid=`id|sed -e 's/^.*gid=//' -e 's/(.*//'`
home="$HOME"
-while [ ${returncode:-99} -ne 1 -a ${returncode:-99} -ne 250 ]; do
- value=`$DIALOG \
+while [ "${returncode:-99}" -ne 1 ] && [ "${returncode:-99}" -ne 250 ]; do
+ returntext=`$DIALOG \
--stdout --clear --ok-label "Create" \
--backtitle "An Example for the use of --inputmenu:" "$@" \
--inputmenu "Originally I designed --inputmenu for a \
@@ -42,7 +42,7 @@ configuration purpose. Here is a possible piece of a configuration program. \
$user" 10 40
;;
$DIALOG_EXTRA)
- value=`echo "$value" | sed -e 's/^RENAMED //'`
+ value=`echo "$returntext" | sed -e 's/^RENAMED //'`
tag=`echo "$value" | sed -e 's/:.*//'`
item=`echo "$value" | sed -e 's/^[^:]*:[ ][ ]*//'`
@@ -54,8 +54,8 @@ configuration purpose. Here is a possible piece of a configuration program. \
esac
;;
- $DIALOG_ESC)
- echo "ESC pressed."
+ *)
+ . ./report-button
break
;;
diff --git a/samples/inputmenu1 b/samples/inputmenu1
index 905c29226191..1d044c80bed6 100755
--- a/samples/inputmenu1
+++ b/samples/inputmenu1
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: inputmenu1,v 1.9 2012/07/01 00:59:54 tom Exp $
+# $Id: inputmenu1,v 1.12 2020/11/26 00:29:41 tom Exp $
#
# "inputmenu" rewritten into Bourne shell.
@@ -18,7 +18,7 @@ returncode=0
while test $returncode != 1 && test $returncode != 250
do
exec 3>&1
-value=`$DIALOG --clear --ok-label "Create" \
+returntext=`$DIALOG --clear --ok-label "Create" \
--backtitle "$backtitle" "$@" \
--inputmenu "Originally I designed --inputmenu for a \
configuration purpose. Here is a possible piece of a configuration program." \
@@ -57,8 +57,8 @@ exec 3>&-
$user" 10 40
;;
$DIALOG_EXTRA)
- tag=`echo "$value" |sed -e 's/^RENAMED //' -e 's/:.*//'`
- item=`echo "$value" |sed -e 's/^[^:]*:[ ]*//' -e 's/[ ]*$//'`
+ tag=`echo "$returntext" |sed -e 's/^RENAMED //' -e 's/:.*//'`
+ item=`echo "$returntext" |sed -e 's/^[^:]*:[ ]*//' -e 's/[ ]*$//'`
case "$tag" in
Username)
@@ -76,8 +76,8 @@ exec 3>&-
esac
;;
- $DIALOG_ESC)
- echo "ESC pressed."
+ *)
+ . ./report-button
break
;;
diff --git a/samples/inputmenu2 b/samples/inputmenu2
index ecef6742cbaa..1cb519d1c6c3 100755
--- a/samples/inputmenu2
+++ b/samples/inputmenu2
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: inputmenu2,v 1.9 2012/07/01 01:00:34 tom Exp $
+# $Id: inputmenu2,v 1.12 2020/11/26 00:29:26 tom Exp $
#
# "inputmenu1" with defaultitem, help-button.
@@ -19,7 +19,7 @@ defaultitem="Username:"
while test $returncode != 1 && test $returncode != 250
do
exec 3>&1
-value=`$DIALOG --clear --ok-label "Create" \
+returntext=`$DIALOG --clear --ok-label "Create" \
--backtitle "$backtitle" \
--help-button \
--help-label "Script" \
@@ -65,8 +65,8 @@ exec 3>&-
$user" 10 40
;;
$DIALOG_EXTRA)
- tag=`echo "$value" |sed -e 's/^RENAMED //' -e 's/:.*/:/'`
- item=`echo "$value" |sed -e 's/^[^:]*:[ ]*//' -e 's/[ ]*$//'`
+ tag=`echo "$returntext" |sed -e 's/^RENAMED //' -e 's/:.*/:/'`
+ item=`echo "$returntext" |sed -e 's/^[^:]*:[ ]*//' -e 's/[ ]*$//'`
case "$tag" in
Username:)
@@ -88,8 +88,8 @@ exec 3>&-
test -n "$tag" && defaultitem="$tag"
;;
- $DIALOG_ESC)
- echo "ESC pressed."
+ *)
+ . ./report-button
break
;;
diff --git a/samples/inputmenu3 b/samples/inputmenu3
index 4b9d5229e1d2..58a3079a162c 100755
--- a/samples/inputmenu3
+++ b/samples/inputmenu3
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: inputmenu3,v 1.11 2012/07/01 01:00:34 tom Exp $
+# $Id: inputmenu3,v 1.14 2020/11/26 00:28:52 tom Exp $
#
# "inputmenu1" with defaultitem, help-button and item-help.
@@ -19,7 +19,7 @@ defaultitem="Username:"
while test $returncode != 1 && test $returncode != 250
do
exec 3>&1
-value=`$DIALOG --clear --ok-label "Create" \
+returntext=`$DIALOG --clear --ok-label "Create" \
--backtitle "$backtitle" \
--help-button \
--help-label "Script" \
@@ -52,7 +52,7 @@ exec 3>&-
esac
;;
$DIALOG_OK)
- case $value in
+ case $returntext in
HELP*)
"$DIALOG" \
--textbox "$0" 0 0
@@ -74,8 +74,8 @@ exec 3>&-
--textbox "$0" 0 0
;;
$DIALOG_EXTRA)
- tag=`echo "$value" |sed -e 's/^RENAMED //' -e 's/:.*/:/'`
- item=`echo "$value" |sed -e 's/^[^:]*:[ ]*//' -e 's/[ ]*$//'`
+ tag=`echo "$returntext" |sed -e 's/^RENAMED //' -e 's/:.*/:/'`
+ item=`echo "$returntext" |sed -e 's/^[^:]*:[ ]*//' -e 's/[ ]*$//'`
case "$tag" in
Username:)
@@ -97,8 +97,8 @@ exec 3>&-
test -n "$tag" && defaultitem="$tag"
;;
- $DIALOG_ESC)
- echo "ESC pressed."
+ *)
+ . ./report-button
break
;;
diff --git a/samples/inputmenu4 b/samples/inputmenu4
index 6688c9ccfc0d..876e7f647fdf 100755
--- a/samples/inputmenu4
+++ b/samples/inputmenu4
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: inputmenu4,v 1.9 2012/07/01 01:00:34 tom Exp $
+# $Id: inputmenu4,v 1.12 2020/11/26 00:28:24 tom Exp $
#
# "inputmenu1" with a different label for the extra-button
@@ -18,7 +18,7 @@ returncode=0
while test $returncode != 1 && test $returncode != 250
do
exec 3>&1
-value=`$DIALOG --clear --ok-label "Create" \
+returntext=`$DIALOG --clear --ok-label "Create" \
--extra-label "Edit" \
--backtitle "$backtitle" "$@" \
--inputmenu "Originally I designed --inputmenu for a \
@@ -58,8 +58,8 @@ exec 3>&-
$user" 10 40
;;
$DIALOG_EXTRA)
- tag=`echo "$value" |sed -e 's/^RENAMED //' -e 's/:.*//'`
- item=`echo "$value" |sed -e 's/^[^:]*:[ ]*//' -e 's/[ ]*$//'`
+ tag=`echo "$returntext" |sed -e 's/^RENAMED //' -e 's/:.*//'`
+ item=`echo "$returntext" |sed -e 's/^[^:]*:[ ]*//' -e 's/[ ]*$//'`
case "$tag" in
Username)
@@ -77,8 +77,8 @@ exec 3>&-
esac
;;
- $DIALOG_ESC)
- echo "ESC pressed."
+ *)
+ . ./report-button
break
;;
diff --git a/samples/install/setup.c b/samples/install/setup.c
index ae569813e865..517255ab8e2a 100644
--- a/samples/install/setup.c
+++ b/samples/install/setup.c
@@ -2,7 +2,7 @@
/* Who wants to help coding? I don't like doing this... */
/* You can just start setup as normal user and see how far it is coded
- right now. This will do a fake installation and won't actually chnage
+ right now. This will do a fake installation and won't actually change
any data on your computer. */
/* TODO: write a good package selection code
diff --git a/samples/install/setup.help b/samples/install/setup.help
index 7ac8369d4e6e..614fef41ed82 100644
--- a/samples/install/setup.help
+++ b/samples/install/setup.help
@@ -30,7 +30,7 @@ your local harddisk or via network (NFS).
setup will install a very basic system.
At the end, you can install lilo, the Linux Loader.
Rebooting your computer with this little linux system
-and then runing the setup-program on it, will give
+and then running the setup-program on it, will give
the possibility to install more packages.
Creating a Linux-partition:
diff --git a/samples/killall b/samples/killall
index 7030fe22bf29..f8d573babdb6 100755
--- a/samples/killall
+++ b/samples/killall
@@ -1,16 +1,16 @@
#! /bin/sh
-# $Id: killall,v 1.3 2012/06/29 09:39:19 tom Exp $
+# $Id: killall,v 1.4 2019/12/10 23:48:58 tom Exp $
# Linux has a program that does this correctly.
. ./setup-vars
-for prog in $*
+for prog in "$@"
do
- pid=`ps -a |fgrep $prog |fgrep -v fgrep|sed -e 's/^[ ]*//' -e 's/ .*//' `
+ pid=`ps -a |fgrep "$prog" |fgrep -v fgrep|sed -e 's/^[ ]*//' -e 's/ .*//' `
if test -n "$pid" ; then
- echo killing pid=$pid, $prog
- kill -$SIG_HUP $pid || \
- kill -$SIG_TERM $pid || \
- kill -$SIG_KILL $pid
+ echo "killing pid=$pid, $prog"
+ kill "-$SIG_HUP" "$pid" || \
+ kill "-$SIG_TERM" "$pid" || \
+ kill "-$SIG_KILL" "$pid"
fi
done
diff --git a/samples/menubox b/samples/menubox
index 0cea3bb00006..4a0118dc13f6 100755
--- a/samples/menubox
+++ b/samples/menubox
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: menubox,v 1.11 2010/01/13 10:20:03 tom Exp $
+# $Id: menubox,v 1.13 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -19,9 +19,9 @@ Try it now!\n\n\
"NetBSD" "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> $tempfile
+ "PC-DOS" "IBM PC DOS" \
+ "MS-DOS" "Microsoft DOS" 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/menubox-8bit b/samples/menubox-8bit
index 91faa5cfea22..69b6bc712a52 100755
--- a/samples/menubox-8bit
+++ b/samples/menubox-8bit
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: menubox-8bit,v 1.6 2010/01/13 10:20:03 tom Exp $
+# $Id: menubox-8bit,v 1.8 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -17,13 +17,13 @@ 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:" 20 51 4 \
- "`./rotated-data 0 $SAMPLE`" "The Great Unix Clone for 386/486" \
- "`./rotated-data 1 $SAMPLE`" "Another free Unix Clone for 386/486" \
- "`./rotated-data 2 $SAMPLE`" "IBM OS/2" \
- "`./rotated-data 3 $SAMPLE`" "Microsoft Windows NT" \
- "`./rotated-data 4 $SAMPLE`" "IBM PC DOS" \
- "`./rotated-data 5 $SAMPLE`" "Microsoft DOS" 2> $tempfile
+ "`./rotated-data 0 "$SAMPLE"`" "The Great Unix Clone for 386/486" \
+ "`./rotated-data 1 "$SAMPLE"`" "Another free Unix Clone for 386/486" \
+ "`./rotated-data 2 "$SAMPLE"`" "IBM OS/2" \
+ "`./rotated-data 3 "$SAMPLE"`" "Microsoft Windows NT" \
+ "`./rotated-data 4 "$SAMPLE"`" "IBM PC DOS" \
+ "`./rotated-data 5 "$SAMPLE"`" "Microsoft DOS" 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/menubox-utf8 b/samples/menubox-utf8
index cd6e429c2c34..4c7f45a34b9e 100755
--- a/samples/menubox-utf8
+++ b/samples/menubox-utf8
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: menubox-utf8,v 1.10 2010/01/13 10:20:03 tom Exp $
+# $Id: menubox-utf8,v 1.11 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -24,6 +24,6 @@ Try it now!\n\n\
"PCDOS" "IBM PC DOS" \
"MSDOS" "Microsoft DOS" 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/menubox1 b/samples/menubox1
index dc40d027e756..9df5ca3c0ec5 100755
--- a/samples/menubox1
+++ b/samples/menubox1
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: menubox1,v 1.7 2010/01/13 10:20:03 tom Exp $
+# $Id: menubox1,v 1.9 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -19,9 +19,9 @@ Try it now!\n\n\
"NetBSD" "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> $tempfile
+ "PC-DOS" "IBM PC DOS" \
+ "MS-DOS" "Microsoft DOS" 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/menubox10 b/samples/menubox10
index 86069342199c..1152223c4ccf 100755
--- a/samples/menubox10
+++ b/samples/menubox10
@@ -1,11 +1,11 @@
#!/bin/sh
-# $Id: menubox10,v 1.5 2010/01/13 10:34:12 tom Exp $
+# $Id: menubox10,v 1.7 2020/11/26 00:09:12 tom Exp $
# zero-width column
. ./setup-vars
exec 3>&1
-RESULT=`$DIALOG --backtitle "Debian Configuration" \
+returntext=`$DIALOG --backtitle "Debian Configuration" \
--title "Configuring debconf" \
--default-item Dialog "$@" \
--menu "Packages that use debconf for co" 19 50 6 \
@@ -16,7 +16,7 @@ RESULT=`$DIALOG --backtitle "Debian Configuration" \
Editor "" \
Noninteractive "" \
2>&1 1>&3`
-retval=$?
+returncode=$?
exec 3>&-
. ./report-string
diff --git a/samples/menubox11 b/samples/menubox11
index 4f275226b4b4..9bd7960582c1 100755
--- a/samples/menubox11
+++ b/samples/menubox11
@@ -1,11 +1,11 @@
#!/bin/sh
-# $Id: menubox11,v 1.2 2018/06/13 21:59:21 tom Exp $
+# $Id: menubox11,v 1.4 2020/11/26 00:09:12 tom Exp $
# zero-width column
. ./setup-vars
exec 3>&1
-RESULT=`$DIALOG --backtitle "Debian Configuration" \
+returntext=`$DIALOG --backtitle "Debian Configuration" \
--title "Configuring debconf" \
--default-item Dialog "$@" \
--menu "Packages that use debconf for configuration share a common look and feel. You can
@@ -25,7 +25,7 @@ Interface to use:" 0 0 6 \
Editor "" \
Noninteractive "" \
2>&1 1>&3`
-retval=$?
+returncode=$?
exec 3>&-
. ./report-string
diff --git a/samples/menubox12 b/samples/menubox12
index ee4b4747dd18..6723c0574425 100755
--- a/samples/menubox12
+++ b/samples/menubox12
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: menubox12,v 1.3 2012/12/23 22:28:26 tom Exp $
+# $Id: menubox12,v 1.6 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -19,10 +19,10 @@ $CUT >$input <<-EOF
NetBSD:Another free Unix Clone for 386/486
OS/2:IBM OS/2
WIN NT:Microsoft Windows NT
- PCDOS:IBM PC DOS
- MSDOS:Microsoft DOS
+ PC-DOS:IBM PC DOS
+ MS-DOS:Microsoft DOS
EOF
-cat $input | sed -e 's/^/"/' -e 's/:/" "/g' -e 's/$/"/' >$output
+sed -e 's/^/"/' -e 's/:/" "/g' -e 's/$/"/' <$input >$output
cat $output >$input
$DIALOG --clear --title "MENU BOX" "$@" \
@@ -37,7 +37,7 @@ Try it now!\n\n\
Choose the OS you like:" 20 51 4 \
--file $input 2> $output
-retval=$?
+returncode=$?
tempfile=$output
. ./report-tempfile
diff --git a/samples/menubox2 b/samples/menubox2
index d81ba792a76a..5ab68cca3d3a 100755
--- a/samples/menubox2
+++ b/samples/menubox2
@@ -1,11 +1,11 @@
#!/bin/sh
-# $Id: menubox2,v 1.7 2010/01/13 10:20:03 tom Exp $
+# $Id: menubox2,v 1.9 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
. ./setup-tempfile
-$DIALOG --default-item "MSDOS" --clear --title "MENU BOX" "$@" \
+$DIALOG --default-item "MS-DOS" --clear --title "MENU BOX" "$@" \
--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\
@@ -17,11 +17,11 @@ Try it now!\n\n\
Choose the OS you like:" 20 51 4 \
"Linux" "The Great Unix Clone for 386/486" \
"NetBSD" "Another free Unix Clone for 386/486" \
- "OS/2" "IBM OS/2" \
+ "OS/2" "IBM OS/2" \
"WIN NT" "Microsoft Windows NT" \
- "PCDOS" "IBM PC DOS" \
- "MSDOS" "Microsoft DOS" 2> $tempfile
+ "PC-DOS" "IBM PC DOS" \
+ "MS-DOS" "Microsoft DOS" 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/menubox3 b/samples/menubox3
index d33b5d6fdef9..2f03505b5c2e 100755
--- a/samples/menubox3
+++ b/samples/menubox3
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: menubox3,v 1.8 2010/01/13 10:20:03 tom Exp $
+# $Id: menubox3,v 1.10 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -19,9 +19,9 @@ Try it now!\n\n\
"NetBSD" "Another free Unix Clone for 386/486" "Or NetBSD?" \
"OS/2" "IBM OS/2" "aka \"Warp\"" \
"WIN NT" "Microsoft Windows NT" "hmm" \
- "PCDOS" "IBM PC DOS" "clone of a clone" \
- "MSDOS" "Microsoft DOS" "DOS: Disk Operating System, originally for an IBM contract, hence using the same jargon" 2> $tempfile
+ "PC-DOS" "IBM PC DOS" "clone of a clone" \
+ "MS-DOS" "Microsoft DOS" "DOS: Disk Operating System, originally for an IBM contract, hence using the same jargon" 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/menubox4 b/samples/menubox4
index e95342de9d8e..a0b2f6bab682 100755
--- a/samples/menubox4
+++ b/samples/menubox4
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: menubox4,v 1.8 2010/01/13 10:20:03 tom Exp $
+# $Id: menubox4,v 1.10 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -19,9 +19,9 @@ Try it now!\n\n\
"NetBSD" "Another free Unix Clone for 386/486 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "Or NetBSD?" \
"OS/2" "IBM OS/2 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "aka \"Warp\"" \
"WIN NT" "Microsoft Windows NT xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "hmm" \
- "PCDOS" "IBM PC DOS xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "clone of a clone" \
- "MSDOS" "Microsoft DOS xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "DOS: Disk Operating System, originally for an IBM contract, hence using the same jargon" 2> $tempfile
+ "PC-DOS" "IBM PC DOS xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "clone of a clone" \
+ "MS-DOS" "Microsoft DOS xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "DOS: Disk Operating System, originally for an IBM contract, hence using the same jargon" 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/menubox5 b/samples/menubox5
index c89be3a0e74a..0ee6bd414d9a 100755
--- a/samples/menubox5
+++ b/samples/menubox5
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: menubox5,v 1.9 2010/01/13 10:20:03 tom Exp $
+# $Id: menubox5,v 1.11 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -21,10 +21,10 @@ Try it now!\n\n\
"WIN NT" "Microsoft Windows NT xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "hmm" \
"WIN 2K" "Microsoft Windows 2000 xxxxxxxxxxxxxxxxxxxxxxxxxxxx" "hmm" \
"WIN XP" "Microsoft Windows XP (son of Windows 95) xxxxxxxxxx" "hmm" \
- "WIN 95" "Microsoft Windows 95 (son of MSDOS) xxxxxxxxxxxxxxx" "hmm" \
- "PCDOS" "IBM PC DOS xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "clone of a clone" \
- "MSDOS" "Microsoft DOS xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "DOS: Disk Operating System, originally for an IBM contract, hence using the same jargon" 2> $tempfile
+ "WIN 95" "Microsoft Windows 95 (son of MS-DOS) xxxxxxxxxxxxxx" "hmm" \
+ "PC-DOS" "IBM PC DOS xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "clone of a clone" \
+ "MS-DOS" "Microsoft DOS xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "DOS: Disk Operating System, originally for an IBM contract, hence using the same jargon" 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/menubox6 b/samples/menubox6
index afcc90de2b08..a1b43d61bcb8 100755
--- a/samples/menubox6
+++ b/samples/menubox6
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: menubox6,v 1.8 2010/01/13 10:20:03 tom Exp $
+# $Id: menubox6,v 1.10 2020/11/26 00:03:58 tom Exp $
# example showing the --colors option
. ./setup-vars
@@ -20,9 +20,9 @@ Try it now!\n\n\
"NetBSD" "Another free Unix Clone for \Zu386/486" "Or \ZbNetBSD?" \
"OS/2" "IBM OS/2" "aka \"Warp\"" \
"WIN NT" "Microsoft Windows NT" "hmm" \
- "PCDOS" "IBM PC \ZrDOS" "clone of a clone" \
- "MSDOS" "Microsoft \ZrDOS" "\ZbDOS\Zn: \Zb\Z3D\Znisk \Zb\Z3O\Znperating \Zb\Z3S\Znystem, originally for an IBM contract, hence using the same jargon" 2> $tempfile
+ "PC-DOS" "IBM PC \ZrDOS" "clone of a clone" \
+ "MS-DOS" "Microsoft \ZrDOS" "\ZbDOS\Zn: \Zb\Z3D\Znisk \Zb\Z3O\Znperating \Zb\Z3S\Znystem, originally for an IBM contract, hence using the same jargon" 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/menubox7 b/samples/menubox7
index 2e85b435608f..421943bfcf80 100755
--- a/samples/menubox7
+++ b/samples/menubox7
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: menubox7,v 1.9 2010/01/13 10:20:03 tom Exp $
+# $Id: menubox7,v 1.11 2020/11/26 00:03:58 tom Exp $
# example with --extra-button
. ./setup-vars
@@ -21,9 +21,9 @@ Try it now!\n\n\
"NetBSD" "Another free Unix Clone for 386/486" "Or NetBSD?" \
"OS/2" "IBM OS/2" "aka \"Warp\"" \
"WIN NT" "Microsoft Windows NT" "hmm" \
- "PCDOS" "IBM PC DOS" "clone of a clone" \
- "MSDOS" "Microsoft DOS" "DOS: Disk Operating System, originally for an IBM contract, hence using the same jargon" 2> $tempfile
+ "PC-DOS" "IBM PC DOS" "clone of a clone" \
+ "MS-DOS" "Microsoft DOS" "DOS: Disk Operating System, originally for an IBM contract, hence using the same jargon" 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/menubox8 b/samples/menubox8
index 85448d058418..eb90de0c8f9c 100755
--- a/samples/menubox8
+++ b/samples/menubox8
@@ -1,11 +1,11 @@
#!/bin/sh
-# $Id: menubox8,v 1.7 2010/01/13 10:34:32 tom Exp $
+# $Id: menubox8,v 1.10 2020/11/26 00:09:12 tom Exp $
. ./setup-vars
exec 3>&1
-RESULT=`$DIALOG --help-button \
- --default-item "MSDOS" \
+returntext=`$DIALOG --help-button \
+ --default-item "MS-DOS" \
--clear \
--title "MENU BOX" "$@" \
--menu "Hi, this is a menu box. You can use this to \n\
@@ -21,10 +21,10 @@ Try it now!\n\n\
"NetBSD" "Another free Unix Clone for 386/486" \
"OS/2" "IBM OS/2" \
"WIN NT" "Microsoft Windows NT" \
- "PCDOS" "IBM PC DOS" \
- "MSDOS" "Microsoft DOS" \
+ "PC-DOS" "IBM PC DOS" \
+ "MS-DOS" "Microsoft DOS" \
2>&1 1>&3`
-retval=$?
+returncode=$?
exec 3>&-
. ./report-string
diff --git a/samples/menubox9 b/samples/menubox9
index 837393951893..5f0c8e9104ec 100755
--- a/samples/menubox9
+++ b/samples/menubox9
@@ -1,10 +1,10 @@
#!/bin/sh
-# $Id: menubox9,v 1.6 2010/01/13 10:20:03 tom Exp $
+# $Id: menubox9,v 1.8 2020/11/26 00:09:12 tom Exp $
. ./setup-vars
exec 3>&1
-RESULT=`$DIALOG --help-button \
+returntext=`$DIALOG --help-button \
--clear \
--title "Select Linux installation partition:" "$@" \
--menu \
@@ -20,7 +20,7 @@ root (/) Linux partition." 13 70 5 \
"---" "(add none, continue with setup)" \
"---" "(add none, continue with setup)" \
2>&1 1>&3`
-retval=$?
+returncode=$?
exec 3>&-
. ./report-string
diff --git a/samples/mixedform b/samples/mixedform
index 617847682ceb..ac4d625e5992 100755
--- a/samples/mixedform
+++ b/samples/mixedform
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: mixedform,v 1.6 2010/01/13 10:47:35 tom Exp $
+# $Id: mixedform,v 1.9 2020/11/26 00:27:07 tom Exp $
. ./setup-vars
@@ -9,7 +9,7 @@ while test $returncode != 1 && test $returncode != 250
do
returncode=$?
exec 3>&1
-value=`$DIALOG --title "Mixed form demonstration" --ok-label "Submit" \
+returntext=`$DIALOG --title "Mixed form demonstration" --ok-label "Submit" \
--backtitle "$backtitle" \
--insecure "$@" \
--mixedform "Here is a possible piece of a configuration program." \
@@ -21,7 +21,7 @@ value=`$DIALOG --title "Mixed form demonstration" --ok-label "Submit" \
2>&1 1>&3`
returncode=$?
exec 3>&-
-show=`echo "$value" |sed -e 's/^/ /'`
+show=`echo "$returntext" |sed -e 's/^/ /'`
case $returncode in
$DIALOG_CANCEL)
@@ -45,16 +45,8 @@ show=`echo "$value" |sed -e 's/^/ /'`
--msgbox "Resulting data:\n\
$show" 10 40
;;
- $DIALOG_HELP)
- echo "Button 2 (Help) pressed."
- exit
- ;;
- $DIALOG_EXTRA)
- echo "Button 3 (Extra) pressed."
- exit
- ;;
*)
- echo "Return code was $returncode"
+ . ./report-button
exit
;;
esac
diff --git a/samples/mixedform2 b/samples/mixedform2
index 07f1d664617c..6a8f554c5dda 100755
--- a/samples/mixedform2
+++ b/samples/mixedform2
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: mixedform2,v 1.5 2010/01/13 10:47:35 tom Exp $
+# $Id: mixedform2,v 1.8 2020/11/26 00:26:50 tom Exp $
. ./setup-vars
@@ -9,7 +9,7 @@ while test $returncode != 1 && test $returncode != 250
do
returncode=$?
exec 3>&1
-value=`$DIALOG --title "Mixed form demonstration" --ok-label "Submit" \
+returntext=`$DIALOG --title "Mixed form demonstration" --ok-label "Submit" \
--backtitle "$backtitle" \
--insecure "$@" \
--mixedform "Here is a possible piece of a configuration program." \
@@ -21,7 +21,7 @@ value=`$DIALOG --title "Mixed form demonstration" --ok-label "Submit" \
2>&1 1>&3`
returncode=$?
exec 3>&-
-show=`echo "$value" |sed -e 's/^/ /'`
+show=`echo "$returntext" |sed -e 's/^/ /'`
case $returncode in
$DIALOG_CANCEL)
@@ -45,16 +45,8 @@ show=`echo "$value" |sed -e 's/^/ /'`
--msgbox "Resulting data:\n\
$show" 10 40
;;
- $DIALOG_HELP)
- echo "Button 2 (Help) pressed."
- exit
- ;;
- $DIALOG_EXTRA)
- echo "Button 3 (Extra) pressed."
- exit
- ;;
*)
- echo "Return code was $returncode"
+ . ./report-button
exit
;;
esac
diff --git a/samples/msgbox b/samples/msgbox
index adc204e11f73..7196e334166d 100755
--- a/samples/msgbox
+++ b/samples/msgbox
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: msgbox,v 1.7 2010/01/13 10:35:13 tom Exp $
+# $Id: msgbox,v 1.8 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -8,6 +8,6 @@ $DIALOG --title "MESSAGE BOX" --clear "$@" \
display any message you like. The box will remain until \
you press the ENTER key." 10 41
-retval=$?
+returncode=$?
. ./report-button
diff --git a/samples/msgbox-help b/samples/msgbox-help
index 3825f6b9819f..8f46b7ca7a4a 100755
--- a/samples/msgbox-help
+++ b/samples/msgbox-help
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: msgbox-help,v 1.6 2010/01/13 10:53:11 tom Exp $
+# $Id: msgbox-help,v 1.7 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -9,6 +9,6 @@ $DIALOG --title "MESSAGE BOX" --clear \
display any message you like. The box will remain until \
you press the ENTER key." 10 41
-retval=$?
+returncode=$?
. ./report-button
diff --git a/samples/msgbox-utf8 b/samples/msgbox-utf8
index e7331502ad9b..df3af7f7b1bd 100755
--- a/samples/msgbox-utf8
+++ b/samples/msgbox-utf8
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: msgbox-utf8,v 1.1 2011/01/18 00:25:30 tom Exp $
+# $Id: msgbox-utf8,v 1.2 2020/11/26 00:03:58 tom Exp $
# from Debian #570634
. ./setup-vars
@@ -9,6 +9,6 @@
${DIALOG-dialog} "$@" \
--title "ทดสอบวรรณยุกต์" \
--msgbox "วรรณยุกต์อยู่ท้ายบรรทัดได้หรือไม่" 8 23
-retval=$?
+returncode=$?
. ./report-button
diff --git a/samples/msgbox1 b/samples/msgbox1
index b7ef8244bef9..adc811f7b10e 100755
--- a/samples/msgbox1
+++ b/samples/msgbox1
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: msgbox1,v 1.9 2010/01/13 10:26:52 tom Exp $
+# $Id: msgbox1,v 1.11 2019/12/11 01:56:43 tom Exp $
. ./setup-vars
@@ -8,27 +8,27 @@ $DIALOG --title "MESSAGE BOX" --clear "$@" \
display any message you like. The box will remain until
you press the ENTER key. This box is being displayed
with dialogs default aspect ratio of 9." 0 0
-test $? = $DIALOG_ESC && exit
+test $? = "$DIALOG_ESC" && exit
$DIALOG --aspect 12 --title "MESSAGE BOX aspect=12" --clear "$@" \
--msgbox "Hi, this is a simple message box. You can use this to
display any message you like. The box will remain until
you press the ENTER key. This box is being displayed
with an aspect ratio of 12." 0 0
-test $? = $DIALOG_ESC && exit
+test $? = "$DIALOG_ESC" && exit
$DIALOG --aspect 6 --title "MESSAGE BOX aspect=6" --clear "$@" \
--msgbox "Hi, this is a simple message box. You can use this to
display any message you like. The box will remain until
you press the ENTER key. This box is being displayed
with an aspect ratio of 6." 0 0
-test $? = $DIALOG_ESC && exit
+test $? = "$DIALOG_ESC" && exit
$DIALOG --aspect 6 --cr-wrap --title "MESSAGE BOX aspect=6 with --cr-wrap" \
- --clear --msgbox " "$@" \
+ --clear "$@" --msgbox " \
Hi, this is a simple
message box. You can
use this to display any
message you like.
The box will remain until you press the ENTER key. This box is being displayed with an aspect ratio of 6, and using --cr-wrap.\n" 0 0
-test $? = $DIALOG_ESC && exit
+test $? = "$DIALOG_ESC" && exit
diff --git a/samples/msgbox2 b/samples/msgbox2
index b39f65a634d3..f3bbb0410aa1 100755
--- a/samples/msgbox2
+++ b/samples/msgbox2
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: msgbox2,v 1.7 2010/01/13 10:26:52 tom Exp $
+# $Id: msgbox2,v 1.9 2019/12/11 01:56:17 tom Exp $
. ./setup-vars
@@ -8,27 +8,27 @@ $DIALOG --title "MESSAGE BOX" --trim "$@" \
display any message you like. The box will remain until
you press the ENTER key. This box is being displayed
with dialogs default aspect ratio of 9." 0 0
-test $? = $DIALOG_ESC && exit
+test $? = "$DIALOG_ESC" && exit
$DIALOG --aspect 12 --title "MESSAGE BOX aspect=12" --trim "$@" \
--msgbox "Hi, this is a simple message box. You can use this to
display any message you like. The box will remain until
you press the ENTER key. This box is being displayed
with an aspect ratio of 12." 0 0
-test $? = $DIALOG_ESC && exit
+test $? = "$DIALOG_ESC" && exit
$DIALOG --aspect 6 --title "MESSAGE BOX aspect=6" --trim "$@" \
--msgbox "Hi, this is a simple message box. You can use this to
display any message you like. The box will remain until
you press the ENTER key. This box is being displayed
with an aspect ratio of 6." 0 0
-test $? = $DIALOG_ESC && exit
+test $? = "$DIALOG_ESC" && exit
$DIALOG --aspect 6 --cr-wrap --title "MESSAGE BOX aspect=6 with --cr-wrap" \
- --trim --msgbox " "$@" \
+ --trim "$@" --msgbox " \
Hi, this is a simple
message box. You can
use this to display any
message you like.
The box will remain until you press the ENTER key. This box is being displayed with an aspect ratio of 6, and using --cr-wrap.\n" 0 0
-test $? = $DIALOG_ESC && exit
+test $? = "$DIALOG_ESC" && exit
diff --git a/samples/msgbox3 b/samples/msgbox3
index d1ea1080f885..0157b1e14568 100755
--- a/samples/msgbox3
+++ b/samples/msgbox3
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: msgbox3,v 1.7 2010/01/13 10:26:52 tom Exp $
+# $Id: msgbox3,v 1.8 2019/12/11 00:03:44 tom Exp $
. ./setup-vars
@@ -17,6 +17,6 @@ $DIALOG --title "MESSAGE BOX (width $width)" --clear --no-collapse "$@" \
Hi, this is a simple message box. You can use this to \
display any message you like. The box will remain until \
you press the ENTER key." 15 $width
-test $? = $DIALOG_ESC && break
+test $? = "$DIALOG_ESC" && break
width=`expr $width + 1`
done
diff --git a/samples/msgbox4-8bit b/samples/msgbox4-8bit
index 216ac8eccb50..ba703c6134b6 100755
--- a/samples/msgbox4-8bit
+++ b/samples/msgbox4-8bit
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: msgbox4-8bit,v 1.4 2010/01/13 10:20:03 tom Exp $
+# $Id: msgbox4-8bit,v 1.8 2020/11/26 00:26:09 tom Exp $
. ./setup-vars
@@ -12,18 +12,20 @@ $DIALOG --title "MESSAGE BOX (width $width)" --no-collapse --colors "$@" \
--msgbox "\
This sample uses characters which are non-printing in POSIX locale.
-\Z1`./rotated-data 0 $SAMPLE` \Z2`./rotated-data 1 $SAMPLE` \Z3`./rotated-data 2 $SAMPLE` \Z4`./rotated-data 3 $SAMPLE`\Zn
+\Z1`./rotated-data 0 "$SAMPLE"` \Z2`./rotated-data 1 "$SAMPLE"` \Z3`./rotated-data 2 "$SAMPLE"` \Z4`./rotated-data 3 "$SAMPLE"`\Zn
Hi, this is a simple message box. You can use this to \
display any message you like. The box will remain until \
you press the ENTER key." 22 $width
-retval=$?
-
-case $retval in
- $DIALOG_CANCEL)
- echo "Cancel pressed.";exit;;
- $DIALOG_ESC)
- echo "ESC pressed.";exit;;
+returncode=$?
+
+case $returncode in
+ $DIALOG_OK)
+ ;;
+ *)
+ . ./report-button;
+ exit
+ ;;
esac
width=`expr $width + 1`
diff --git a/samples/msgbox4-utf8 b/samples/msgbox4-utf8
index acbbebe5eabb..00ac0698ff8b 100755
--- a/samples/msgbox4-utf8
+++ b/samples/msgbox4-utf8
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: msgbox4-utf8,v 1.10 2010/01/13 10:20:03 tom Exp $
+# $Id: msgbox4-utf8,v 1.13 2020/11/26 00:25:37 tom Exp $
. ./setup-vars
@@ -23,13 +23,15 @@ There are several checking points:
Hi, this is a simple message box. You can use this to \
display any message you like. The box will remain until \
you press the ENTER key." 22 $width
-retval=$?
-
-case $retval in
- $DIALOG_CANCEL)
- echo "Cancel pressed.";exit;;
- $DIALOG_ESC)
- echo "ESC pressed.";exit;;
+returncode=$?
+
+case $returncode in
+ $DIALOG_OK)
+ ;;
+ *)
+ . ./report-button;
+ exit
+ ;;
esac
width=`expr $width + 1`
diff --git a/samples/msgbox5 b/samples/msgbox5
index f5d942725d5c..e91dbe87f9c3 100755
--- a/samples/msgbox5
+++ b/samples/msgbox5
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: msgbox5,v 1.5 2010/01/13 10:26:52 tom Exp $
+# $Id: msgbox5,v 1.6 2019/12/11 00:03:34 tom Exp $
# this differs from msgbox3 by making a window small enough to force scrolling.
. ./setup-vars
@@ -18,6 +18,6 @@ $DIALOG --title "MESSAGE BOX (width $width)" --clear --no-collapse "$@" \
Hi, this is a simple message box. You can use this to \
display any message you like. The box will remain until \
you press the ENTER key." 10 $width
-test $? = $DIALOG_ESC && break
+test $? = "$DIALOG_ESC" && break
width=`expr $width + 1`
done
diff --git a/samples/msgbox6 b/samples/msgbox6
index 1d30f021897d..e2f22cb7d731 100755
--- a/samples/msgbox6
+++ b/samples/msgbox6
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: msgbox6,v 1.5 2010/01/13 10:26:52 tom Exp $
+# $Id: msgbox6,v 1.6 2019/12/11 00:03:24 tom Exp $
# this differs from msgbox3 by making a window small enough to force scrolling.
. ./setup-vars
@@ -12,6 +12,6 @@ $DIALOG --title "MESSAGE BOX (width $width)" --clear "$@" \
a b c d e f g h j i j k l m n o p q r s t u v w x y z
A B C D E F G H J I J K L M N O P Q R S T U V W X Y Z
" 10 $width
-test $? = $DIALOG_ESC && break
+test $? = "$DIALOG_ESC" && break
width=`expr $width + 1`
done
diff --git a/samples/msgbox6a b/samples/msgbox6a
index e84edbf5f759..cbbfb6034ccf 100755
--- a/samples/msgbox6a
+++ b/samples/msgbox6a
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: msgbox6a,v 1.5 2010/01/13 10:26:52 tom Exp $
+# $Id: msgbox6a,v 1.6 2019/12/11 00:03:14 tom Exp $
# this differs from msgbox3 by making a window small enough to force scrolling.
. ./setup-vars
@@ -12,6 +12,6 @@ $DIALOG --title "MESSAGE BOX (width $width)" --clear "$@" \
.a .b .c .d .e .f .g .h .j .i .j .k .l .m .n .o .p .q .r .s .t .u .v .w .x .y .z
.A .B .C .D .E .F .G .H .J .I .J .K .L .M .N .O .P .Q .R .S .T .U .V .W .X .Y .Z
" 10 $width
-test $? = $DIALOG_ESC && break
+test $? = "$DIALOG_ESC" && break
width=`expr $width + 1`
done
diff --git a/samples/password b/samples/password
index 4517043ac288..57b73bc04683 100755
--- a/samples/password
+++ b/samples/password
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: password,v 1.7 2010/01/13 10:20:03 tom Exp $
+# $Id: password,v 1.8 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -15,6 +15,6 @@ input field will be automatically scrolled. \n
You can use BACKSPACE to correct errors. \n\n
Try entering your name below:" 16 51 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/password1 b/samples/password1
index adeabc09b1fe..c173e82384dc 100755
--- a/samples/password1
+++ b/samples/password1
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: password1,v 1.6 2010/01/13 10:20:03 tom Exp $
+# $Id: password1,v 1.7 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
@@ -16,6 +16,6 @@ input field will be automatically scrolled. \n
You can use BACKSPACE to correct errors. \n\n
Try entering your name below:" 16 51 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/password2 b/samples/password2
index 91a7e455fb3e..07a8c00afa2a 100755
--- a/samples/password2
+++ b/samples/password2
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: password2,v 1.6 2010/01/13 10:20:03 tom Exp $
+# $Id: password2,v 1.7 2020/11/26 00:05:11 tom Exp $
. ./setup-vars
@@ -16,6 +16,6 @@ input field will be automatically scrolled. \n
You can use BACKSPACE to correct errors. \n\n
Try entering your name below:" 16 51 stupid 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/passwordform1 b/samples/passwordform1
index 7c3c1f03928a..07422e139d84 100755
--- a/samples/passwordform1
+++ b/samples/passwordform1
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: passwordform1,v 1.5 2010/01/13 10:47:35 tom Exp $
+# $Id: passwordform1,v 1.8 2020/11/26 00:23:09 tom Exp $
. ./setup-vars
@@ -16,7 +16,7 @@ returncode=0
while test $returncode != 1 && test $returncode != 250
do
exec 3>&1
-value=`$DIALOG --ok-label "Submit" \
+returntext=`$DIALOG --ok-label "Submit" \
--backtitle "$backtitle" \
--insecure "$@" \
--passwordform "Here is a possible piece of a configuration program." \
@@ -29,7 +29,7 @@ value=`$DIALOG --ok-label "Submit" \
returncode=$?
exec 3>&-
-show=`echo "$value" |sed -e 's/^/ /'`
+show=`echo "$returntext" |sed -e 's/^/ /'`
case $returncode in
$DIALOG_CANCEL)
@@ -53,16 +53,8 @@ show=`echo "$value" |sed -e 's/^/ /'`
--msgbox "Resulting data:\n\
$show" 10 40
;;
- $DIALOG_HELP)
- echo "Button 2 (Help) pressed."
- exit
- ;;
- $DIALOG_EXTRA)
- echo "Button 3 (Extra) pressed."
- exit
- ;;
*)
- echo "Return code was $returncode"
+ . ./report-button
exit
;;
esac
diff --git a/samples/passwordform1-utf8 b/samples/passwordform1-utf8
index 3dda34c0e62e..b1cfb59de083 100755
--- a/samples/passwordform1-utf8
+++ b/samples/passwordform1-utf8
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: passwordform1-utf8,v 1.7 2010/01/13 10:47:35 tom Exp $
+# $Id: passwordform1-utf8,v 1.10 2020/11/26 00:22:47 tom Exp $
. ./setup-vars
@@ -18,7 +18,7 @@ returncode=0
while test $returncode != 1 && test $returncode != 250
do
exec 3>&1
-value=`$DIALOG --ok-label "Submit" \
+returntext=`$DIALOG --ok-label "Submit" \
--backtitle "$backtitle" \
--insecure "$@" \
--passwordform "Here is a possible piece of a configuration program." \
@@ -31,7 +31,7 @@ value=`$DIALOG --ok-label "Submit" \
returncode=$?
exec 3>&-
-show=`echo "$value" |sed -e 's/^/ /'`
+show=`echo "$returntext" |sed -e 's/^/ /'`
case $returncode in
$DIALOG_CANCEL)
@@ -55,16 +55,8 @@ show=`echo "$value" |sed -e 's/^/ /'`
--msgbox "Resulting data:\n\
$show" 10 40
;;
- $DIALOG_HELP)
- echo "Button 2 (Help) pressed."
- exit
- ;;
- $DIALOG_EXTRA)
- echo "Button 3 (Extra) pressed."
- exit
- ;;
*)
- echo "Return code was $returncode"
+ . ./report-button
exit
;;
esac
diff --git a/samples/pause b/samples/pause
index 64e211b7f693..c524244843c4 100755
--- a/samples/pause
+++ b/samples/pause
@@ -1,10 +1,10 @@
#!/bin/sh
-# $Id: pause,v 1.5 2010/01/14 00:27:23 tom Exp $
+# $Id: pause,v 1.6 2020/11/26 00:05:11 tom Exp $
. ./setup-vars
$DIALOG --title "PAUSE" "$@" --pause "Hi, this is a pause widget" 20 70 10
-retval=$?
+returncode=$?
. ./report-button
diff --git a/samples/pause-both b/samples/pause-both
index aa729361497a..5e7564f58578 100755
--- a/samples/pause-both
+++ b/samples/pause-both
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: pause-both,v 1.1 2011/01/18 09:49:24 tom Exp $
+# $Id: pause-both,v 1.2 2020/11/26 00:05:11 tom Exp $
. ./setup-vars
@@ -8,7 +8,7 @@ $DIALOG --title "PAUSE" \
--extra-button "$@" \
--pause "Hi, this is a pause widget" 20 70 10
-retval=$?
-echo return $retval
+returncode=$?
+echo return $returncode
. ./report-button
diff --git a/samples/pause-extra b/samples/pause-extra
index 846e10880799..a5e366d79d93 100755
--- a/samples/pause-extra
+++ b/samples/pause-extra
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: pause-extra,v 1.1 2011/01/18 09:49:07 tom Exp $
+# $Id: pause-extra,v 1.2 2020/11/26 00:05:11 tom Exp $
. ./setup-vars
@@ -7,7 +7,7 @@ $DIALOG --title "PAUSE" \
--extra-button "$@" \
--pause "Hi, this is a pause widget" 20 70 10
-retval=$?
-echo return $retval
+returncode=$?
+echo return $returncode
. ./report-button
diff --git a/samples/pause-help b/samples/pause-help
index 2d3656e71963..6d45753da520 100755
--- a/samples/pause-help
+++ b/samples/pause-help
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: pause-help,v 1.5 2010/01/13 10:36:00 tom Exp $
+# $Id: pause-help,v 1.6 2020/11/26 00:05:11 tom Exp $
. ./setup-vars
@@ -7,6 +7,6 @@ $DIALOG --title "PAUSE" \
--help-button "$@" \
--pause "Hi, this is a pause widget" 20 70 10
-retval=$?
+returncode=$?
. ./report-button
diff --git a/samples/prgbox b/samples/prgbox
index c06a6301c7a4..d830e79e878a 100755
--- a/samples/prgbox
+++ b/samples/prgbox
@@ -1,9 +1,9 @@
#!/bin/sh
-# $Id: prgbox,v 1.2 2012/07/02 09:46:24 tom Exp $
+# $Id: prgbox,v 1.3 2020/11/26 00:05:11 tom Exp $
. ./setup-vars
$DIALOG --title "PRGBOX" "$@" --prgbox "./shortlist" 20 70
-retval=$?
+returncode=$?
. ./report-button
diff --git a/samples/prgbox2 b/samples/prgbox2
index ba94622cd556..12239ce2ae0d 100755
--- a/samples/prgbox2
+++ b/samples/prgbox2
@@ -1,9 +1,9 @@
#!/bin/sh
-# $Id: prgbox2,v 1.2 2012/07/02 09:46:24 tom Exp $
+# $Id: prgbox2,v 1.3 2020/11/26 00:05:11 tom Exp $
. ./setup-vars
$DIALOG --title "PRGBOX" "$@" --prgbox "./shortlist 3" 20 70
-retval=$?
+returncode=$?
. ./report-button
diff --git a/samples/programbox b/samples/programbox
index afa29e1b3f9a..bc6421bf19e2 100755
--- a/samples/programbox
+++ b/samples/programbox
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: programbox,v 1.3 2018/06/17 20:45:25 tom Exp $
+# $Id: programbox,v 1.4 2020/11/26 00:05:11 tom Exp $
. ./setup-vars
@@ -18,5 +18,5 @@ done <$tempfile
$DIALOG --title "PROGRAMBOX" "$@" --programbox 20 70
-retval=$?
+returncode=$?
. ./report-button
diff --git a/samples/programbox2 b/samples/programbox2
index d55c497b64c1..fe1c826e0f05 100755
--- a/samples/programbox2
+++ b/samples/programbox2
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: programbox2,v 1.3 2018/06/17 20:45:25 tom Exp $
+# $Id: programbox2,v 1.4 2020/11/26 00:05:11 tom Exp $
. ./setup-vars
@@ -18,5 +18,5 @@ done <$tempfile
$DIALOG --title "PROGRAMBOX" "$@" --programbox "ProgramBox" 20 70
-retval=$?
+returncode=$?
. ./report-button
diff --git a/samples/programbox3 b/samples/programbox3
new file mode 100755
index 000000000000..1dc020c3d222
--- /dev/null
+++ b/samples/programbox3
@@ -0,0 +1,22 @@
+#!/bin/sh
+# $Id: programbox3,v 1.2 2020/11/26 00:05:11 tom Exp $
+
+. ./setup-vars
+
+. ./setup-tempfile
+
+ls -1 >$tempfile
+(
+while true
+do
+read text
+test -z "$text" && break
+ls -ld "$text" || break
+sleep 0.1
+done <$tempfile
+) |
+
+$DIALOG --title "PROGRAMBOX" "$@" --programbox -1 -1
+
+returncode=$?
+. ./report-button
diff --git a/samples/progress b/samples/progress
index a416909cce35..e2bbe1752397 100755
--- a/samples/progress
+++ b/samples/progress
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: progress,v 1.7 2018/06/17 20:45:25 tom Exp $
+# $Id: progress,v 1.8 2020/11/26 00:05:11 tom Exp $
. ./setup-vars
@@ -18,5 +18,5 @@ done <$tempfile
$DIALOG --title "PROGRESS" "$@" --progressbox 20 70
-retval=$?
+returncode=$?
. ./report-button
diff --git a/samples/progress2 b/samples/progress2
index f4bdb3cae80b..f5d9e782bab0 100755
--- a/samples/progress2
+++ b/samples/progress2
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: progress2,v 1.7 2018/06/17 20:45:25 tom Exp $
+# $Id: progress2,v 1.8 2020/11/26 00:05:11 tom Exp $
. ./setup-vars
@@ -18,5 +18,5 @@ done <$tempfile
$DIALOG --title "PROGRESS" "$@" --progressbox "This is a detailed description\nof the progress-box." 20 70
-retval=$?
+returncode=$?
. ./report-button
diff --git a/samples/radiolist b/samples/radiolist
index 602ad82044ac..93068d166700 100755
--- a/samples/radiolist
+++ b/samples/radiolist
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: radiolist,v 1.13 2010/01/13 10:20:03 tom Exp $
+# $Id: radiolist,v 1.14 2020/11/26 00:05:11 tom Exp $
. ./setup-vars
@@ -23,6 +23,6 @@ Press SPACE to toggle an option on/off. \n\n\
"Fish" "Cats like fish." off \
"Lemon" "You know how it tastes." off 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/radiolist1 b/samples/radiolist1
index 77defa52ced0..da7ad8b56631 100755
--- a/samples/radiolist1
+++ b/samples/radiolist1
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: radiolist1,v 1.1 2010/01/17 23:05:14 tom Exp $
+# $Id: radiolist1,v 1.2 2020/11/26 00:05:11 tom Exp $
. ./setup-vars
@@ -28,6 +28,6 @@ Press SPACE to toggle an option on/off. \n\n\
"Fish" "Cats like fish." off \
"Lemon" "You know how it tastes." off 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/radiolist10 b/samples/radiolist10
index 2953871c5f82..8e8f0d3463d9 100755
--- a/samples/radiolist10
+++ b/samples/radiolist10
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: radiolist10,v 1.6 2010/01/13 10:20:03 tom Exp $
+# $Id: radiolist10,v 1.7 2020/11/26 00:05:11 tom Exp $
# zero-width column
. ./setup-vars
@@ -25,6 +25,6 @@ Press SPACE to toggle an option on/off. \n\n\
Noninteractive "" on \
2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/radiolist2 b/samples/radiolist2
index e2965eac1eed..7ab31af59c9c 100755
--- a/samples/radiolist2
+++ b/samples/radiolist2
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: radiolist2,v 1.8 2010/01/13 10:20:03 tom Exp $
+# $Id: radiolist2,v 1.9 2020/11/26 00:05:11 tom Exp $
. ./setup-vars
@@ -25,6 +25,6 @@ Press SPACE to toggle an option on/off. \n\n\
"Fish" "Cats like fish." off \
"Lemon" "You know how it tastes." off 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/radiolist3 b/samples/radiolist3
index 6c695e7197ce..a1fd02e45f5b 100755
--- a/samples/radiolist3
+++ b/samples/radiolist3
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: radiolist3,v 1.9 2010/01/13 10:20:03 tom Exp $
+# $Id: radiolist3,v 1.10 2020/11/26 00:05:11 tom Exp $
. ./setup-vars
@@ -25,6 +25,6 @@ Press SPACE to toggle an option on/off. \n\n\
"Fish" "Cats like fish." off "Hint: usually not close to cats" \
"Lemon" "You know how it tastes." off "Hint: like an orange" 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/radiolist4 b/samples/radiolist4
index 67d920f32941..c2c47dca251b 100755
--- a/samples/radiolist4
+++ b/samples/radiolist4
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: radiolist4,v 1.9 2010/01/13 10:20:03 tom Exp $
+# $Id: radiolist4,v 1.10 2020/11/26 00:05:11 tom Exp $
. ./setup-vars
@@ -25,6 +25,6 @@ Press SPACE to toggle an option on/off. \n\n\
"Fish" "Cats like fish." off "Hint: usually not close to cats" \
"Lemon" "You know how it tastes." off "Hint: like an orange" 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/rangebox b/samples/rangebox
index d864026eb967..962607d26c19 100755
--- a/samples/rangebox
+++ b/samples/rangebox
@@ -1,11 +1,11 @@
#!/bin/sh
-# $Id: rangebox,v 1.3 2012/12/05 10:07:54 tom Exp $
+# $Id: rangebox,v 1.5 2020/11/26 00:09:12 tom Exp $
. ./setup-vars
exec 3>&1
-RESULT=`$DIALOG --title "RANGE BOX" --rangebox "Please set the volume..." 0 60 0 123 5 2>&1 1>&3`
-retval=$?
+returntext=`$DIALOG --title "RANGE BOX" --rangebox "Please set the volume..." 0 60 0 123 5 2>&1 1>&3`
+returncode=$?
exec 3>&-
. ./report-string
diff --git a/samples/rangebox2 b/samples/rangebox2
index f67f02be254e..8a88dc05135a 100755
--- a/samples/rangebox2
+++ b/samples/rangebox2
@@ -1,11 +1,11 @@
#!/bin/sh
-# $Id: rangebox2,v 1.1 2012/12/05 10:28:58 tom Exp $
+# $Id: rangebox2,v 1.3 2020/11/26 00:09:12 tom Exp $
. ./setup-vars
exec 3>&1
-RESULT=`$DIALOG --title "RANGE BOX" --rangebox "Please set the volume..." 0 60 0 6 5 2>&1 1>&3`
-retval=$?
+returntext=`$DIALOG --title "RANGE BOX" --rangebox "Please set the volume..." 0 60 0 6 5 2>&1 1>&3`
+returncode=$?
exec 3>&-
. ./report-string
diff --git a/samples/rangebox3 b/samples/rangebox3
index 19dad64ad990..b854d9fb0993 100755
--- a/samples/rangebox3
+++ b/samples/rangebox3
@@ -1,11 +1,11 @@
#!/bin/sh
-# $Id: rangebox3,v 1.1 2012/12/05 10:19:42 tom Exp $
+# $Id: rangebox3,v 1.3 2020/11/26 00:09:12 tom Exp $
. ./setup-vars
exec 3>&1
-RESULT=`$DIALOG --title "RANGE BOX" --rangebox "Please set the volume..." 0 60 -48 55 5 2>&1 1>&3`
-retval=$?
+returntext=`$DIALOG --title "RANGE BOX" --rangebox "Please set the volume..." 0 60 -48 55 5 2>&1 1>&3`
+returncode=$?
exec 3>&-
. ./report-string
diff --git a/samples/rangebox4 b/samples/rangebox4
index b8b68c2c661c..0e05e9210f4b 100755
--- a/samples/rangebox4
+++ b/samples/rangebox4
@@ -1,11 +1,11 @@
#!/bin/sh
-# $Id: rangebox4,v 1.1 2012/12/05 11:54:04 tom Exp $
+# $Id: rangebox4,v 1.3 2020/11/26 00:09:12 tom Exp $
. ./setup-vars
exec 3>&1
-RESULT=`$DIALOG --title "RANGE BOX" --rangebox "Please set the volume..." 0 60 10 100 5 2>&1 1>&3`
-retval=$?
+returntext=`$DIALOG --title "RANGE BOX" --rangebox "Please set the volume..." 0 60 10 100 5 2>&1 1>&3`
+returncode=$?
exec 3>&-
. ./report-string
diff --git a/samples/report-button b/samples/report-button
index c6a173094573..0976c96a9d83 100644
--- a/samples/report-button
+++ b/samples/report-button
@@ -1,9 +1,9 @@
#!/bin/sh
-# $Id: report-button,v 1.3 2012/06/29 09:29:36 tom Exp $
-# Report button-only, no $RESULT
+# $Id: report-button,v 1.8 2020/11/26 00:17:40 tom Exp $
+# Report button-only, no $returntext
# vile:shmode
-case $retval in
+case ${returncode:-0} in
$DIALOG_OK)
echo "OK";;
$DIALOG_CANCEL)
@@ -14,8 +14,12 @@ case $retval in
echo "Extra button pressed.";;
$DIALOG_ITEM_HELP)
echo "Item-help button pressed.";;
+ $DIALOG_TIMEOUT)
+ echo "Timeout expired.";;
$DIALOG_ERROR)
echo "ERROR!";;
$DIALOG_ESC)
echo "ESC pressed.";;
+ *)
+ echo "Return code was $returncode";;
esac
diff --git a/samples/report-edit b/samples/report-edit
index 37e3eb088570..d2343b9ff52a 100644
--- a/samples/report-edit
+++ b/samples/report-edit
@@ -1,11 +1,11 @@
#!/bin/sh
-# $Id: report-edit,v 1.4 2012/06/29 09:29:41 tom Exp $
+# $Id: report-edit,v 1.8 2020/11/26 00:18:32 tom Exp $
# Report results from editing.
# vile:shmode
-case $retval in
+case ${returncode:-0} in
$DIALOG_OK)
- diff -c $input $output
+ diff -c "${input:-input}" "${output:-output}"
echo "OK"
;;
$DIALOG_CANCEL)
@@ -16,8 +16,12 @@ case $retval in
echo "Extra pressed";;
$DIALOG_ITEM_HELP)
echo "Item-help button pressed.";;
+ $DIALOG_TIMEOUT)
+ echo "Timeout expired.";;
$DIALOG_ERROR)
echo "ERROR!";;
$DIALOG_ESC)
echo "ESC pressed.";;
+ *)
+ echo "Return code was $returncode";;
esac
diff --git a/samples/report-string b/samples/report-string
index dc96c2fab2e2..e6ccb6433d2f 100644
--- a/samples/report-string
+++ b/samples/report-string
@@ -1,24 +1,28 @@
#!/bin/sh
-# $Id: report-string,v 1.3 2012/06/29 09:32:17 tom Exp $
-# Report result passed in a string $RESULT
+# $Id: report-string,v 1.8 2020/11/26 00:18:32 tom Exp $
+# Report result passed in a string $returntext
# vile:shmode
-case $retval in
+case ${returncode:-0} in
$DIALOG_OK)
- echo "Result is $RESULT";;
+ echo "Result is $returntext";;
$DIALOG_CANCEL)
echo "Cancel pressed.";;
$DIALOG_HELP)
- echo "Help pressed ($RESULT).";;
+ echo "Help pressed ($returntext).";;
$DIALOG_EXTRA)
echo "Extra button pressed.";;
$DIALOG_ITEM_HELP)
echo "Item-help button pressed.";;
+ $DIALOG_TIMEOUT)
+ echo "Timeout expired.";;
$DIALOG_ESC)
- if test -n "$RESULT" ; then
- echo "$RESULT"
+ if test -n "$returntext" ; then
+ echo "$returntext"
else
echo "ESC pressed."
fi
;;
+ *)
+ echo "Return code was $returncode";;
esac
diff --git a/samples/report-tempfile b/samples/report-tempfile
index 4c5f0994e8a6..c6f08c164523 100644
--- a/samples/report-tempfile
+++ b/samples/report-tempfile
@@ -1,24 +1,28 @@
#!/bin/sh
-# $Id: report-tempfile,v 1.5 2013/09/02 18:03:13 tom Exp $
+# $Id: report-tempfile,v 1.9 2020/11/26 00:18:32 tom Exp $
# Report results in a temporary-file.
# vile:shmode
-case $retval in
+case "${returncode:-0}" in
$DIALOG_OK)
- echo "Result: `cat $tempfile`";;
+ echo "Result: `cat "$tempfile"`";;
$DIALOG_CANCEL)
echo "Cancel pressed.";;
$DIALOG_HELP)
- echo "Help pressed: `cat $tempfile`";;
+ echo "Help pressed: `cat "$tempfile"`";;
$DIALOG_EXTRA)
echo "Extra button pressed.";;
$DIALOG_ITEM_HELP)
- echo "Item-help button pressed: `cat $tempfile`";;
+ echo "Item-help button pressed: `cat "$tempfile"`";;
+ $DIALOG_TIMEOUT)
+ echo "Timeout expired.";;
$DIALOG_ESC)
- if test -s $tempfile ; then
- cat $tempfile
+ if test -s "$tempfile" ; then
+ cat "$tempfile"
else
echo "ESC pressed."
fi
;;
+ *)
+ echo "Return code was $returncode";;
esac
diff --git a/samples/report-yesno b/samples/report-yesno
index d22ebe4194e2..cf15458e5782 100644
--- a/samples/report-yesno
+++ b/samples/report-yesno
@@ -1,9 +1,9 @@
#!/bin/sh
-# $Id: report-yesno,v 1.2 2012/06/29 09:32:12 tom Exp $
-# Report button-only, no $RESULT
+# $Id: report-yesno,v 1.7 2020/11/26 00:18:32 tom Exp $
+# Report button-only, no $returntext
# vile:shmode
-case $retval in
+case ${returncode:-0} in
$DIALOG_OK)
echo "YES";;
$DIALOG_CANCEL)
@@ -14,8 +14,12 @@ case $retval in
echo "Extra button pressed.";;
$DIALOG_ITEM_HELP)
echo "Item-help button pressed.";;
+ $DIALOG_TIMEOUT)
+ echo "Timeout expired.";;
$DIALOG_ERROR)
echo "ERROR!";;
$DIALOG_ESC)
echo "ESC pressed.";;
+ *)
+ echo "Return code was $returncode";;
esac
diff --git a/samples/rotated-data b/samples/rotated-data
index dc407144e7e3..28e3f650f753 100755
--- a/samples/rotated-data
+++ b/samples/rotated-data
@@ -1,12 +1,12 @@
#!/bin/sh
-# $Id: rotated-data,v 1.1 2004/12/19 16:43:47 tom Exp $
+# $Id: rotated-data,v 1.2 2019/12/10 23:59:24 tom Exp $
# Rotate the second parameter's data by the given shift count.
if test $# != 0
then
case $1 in
[1-9]*)
left=$1
- next=`expr $left + 1`
+ next=`expr "$left" + 1`
shift 1
;;
*)
@@ -17,7 +17,7 @@ then
char=`echo "$@" | cut -b -${left}`
data=`echo "$@" | cut -b ${next}-`
- printf "%s%s\n" $data $char
+ printf "%s%s\n" "$data" "$char"
else
echo
fi
diff --git a/samples/run_test.sh b/samples/run_test.sh
index ea9da2935293..2576d3e91f29 100755
--- a/samples/run_test.sh
+++ b/samples/run_test.sh
@@ -1,7 +1,7 @@
#!/bin/sh
-# $Id: run_test.sh,v 1.4 2017/02/01 01:50:09 tom Exp $
+# $Id: run_test.sh,v 1.5 2019/12/10 23:54:52 tom Exp $
# vile:ts=4 sw=4
-THIS=`basename $0`
+THIS=`basename "$0"`
if [ -z "$DIALOG" ]
then
@@ -43,14 +43,14 @@ do
[ -f "$name" ] || continue
[ -x "$name" ] || continue
# skip this script and known utility-scripts
- case `basename $name` in
+ case `basename "$name"` in
$THIS|dft-*|killall|listing|rotated-data|shortlist|with-*)
echo "** skipping $name" >>$mylog
continue
;;
esac
- rm -f trace $want.log $name.log
+ rm -f trace "$want.log" "$name.log"
echo "** running $name" >>$mylog
$name
- [ -f $want.log ] && cp $want.log $name.log
+ [ -f "$want.log" ] && cp "$want.log" "$name.log"
done
diff --git a/samples/setup-vars b/samples/setup-vars
index f0ea779c132e..6a6134b15ec7 100644
--- a/samples/setup-vars
+++ b/samples/setup-vars
@@ -1,23 +1,24 @@
#!/bin/sh
-# $Id: setup-vars,v 1.3 2012/06/29 09:52:26 tom Exp $
+# $Id: setup-vars,v 1.5 2020/11/25 23:06:52 tom Exp $
# vile:shmode
# These symbols are defined to use in the sample shell scripts to make them
# more readable. But they are (intentionally) not exported. If they were
# exported, they would also be visible in the dialog program (a subprocess).
-: ${DIALOG=dialog}
+: "${DIALOG=dialog}"
-: ${DIALOG_OK=0}
-: ${DIALOG_CANCEL=1}
-: ${DIALOG_HELP=2}
-: ${DIALOG_EXTRA=3}
-: ${DIALOG_ITEM_HELP=4}
-: ${DIALOG_ESC=255}
+: "${DIALOG_OK=0}"
+: "${DIALOG_CANCEL=1}"
+: "${DIALOG_HELP=2}"
+: "${DIALOG_EXTRA=3}"
+: "${DIALOG_ITEM_HELP=4}"
+: "${DIALOG_TIMEOUT=5}"
+: "${DIALOG_ESC=255}"
-: ${SIG_NONE=0}
-: ${SIG_HUP=1}
-: ${SIG_INT=2}
-: ${SIG_QUIT=3}
-: ${SIG_KILL=9}
-: ${SIG_TERM=15}
+: "${SIG_NONE=0}"
+: "${SIG_HUP=1}"
+: "${SIG_INT=2}"
+: "${SIG_QUIT=3}"
+: "${SIG_KILL=9}"
+: "${SIG_TERM=15}"
diff --git a/samples/tailbox b/samples/tailbox
index 227104e2fcfb..e67c30c08156 100755
--- a/samples/tailbox
+++ b/samples/tailbox
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: tailbox,v 1.7 2010/01/13 10:36:18 tom Exp $
+# $Id: tailbox,v 1.8 2020/11/26 00:05:11 tom Exp $
. ./setup-vars
@@ -9,7 +9,7 @@
$DIALOG --title "TAIL BOX" "$@" \
--tailbox listing.out 24 70
-retval=$?
+returncode=$?
. ./report-button
diff --git a/samples/tailboxbg b/samples/tailboxbg
index bcc3434d3473..dff1becf80a9 100755
--- a/samples/tailboxbg
+++ b/samples/tailboxbg
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: tailboxbg,v 1.10 2012/06/29 09:48:28 tom Exp $
+# $Id: tailboxbg,v 1.11 2019/12/11 01:21:36 tom Exp $
. ./setup-vars
@@ -16,7 +16,7 @@ $DIALOG --title "TAIL BOX" \
sleep 10
# now kill it
-kill -$SIG_QUIT `cat $tempfile` 2>&1 >/dev/null 2>/dev/null
+kill "-$SIG_QUIT" "`cat "$tempfile"`" 2>&1 >/dev/null 2>/dev/null
# ...and the process that is making the listing
./killall listing
diff --git a/samples/tailboxbg1 b/samples/tailboxbg1
index f04567a92f6d..456e720969e5 100755
--- a/samples/tailboxbg1
+++ b/samples/tailboxbg1
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: tailboxbg1,v 1.10 2012/06/29 09:51:46 tom Exp $
+# $Id: tailboxbg1,v 1.11 2019/12/11 00:12:27 tom Exp $
. ./setup-vars
@@ -18,13 +18,13 @@ $DIALOG --title "TAIL BOXES" \
# The --and-widget causes a tab to be emitted, but our example will only
# write one number to stderr.
-pid=`cat $tempfile |sed -e 's/ //g'`
+pid=`sed -e 's/ //g' $tempfile`
if test -n "$pid" ; then
# wait a while for the background process to run
sleep 10
# now kill it
-kill -$SIG_QUIT $pid 2>&1 >/dev/null 2>/dev/null
+kill "-$SIG_QUIT" "$pid "2>&1 >/dev/null 2>/dev/null
echo "killed [$pid]"
fi
diff --git a/samples/tailboxbg2 b/samples/tailboxbg2
index 628cb0571540..b71a6c6c42fe 100755
--- a/samples/tailboxbg2
+++ b/samples/tailboxbg2
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: tailboxbg2,v 1.10 2012/06/29 09:51:11 tom Exp $
+# $Id: tailboxbg2,v 1.11 2019/12/11 00:11:51 tom Exp $
. ./setup-vars
@@ -19,13 +19,13 @@ $DIALOG --title "TAIL BOXES" \
# The --and-widget causes a tab to be emitted, but our example will only
# write one number to stderr.
-pid=`cat $tempfile |sed -e 's/ //g'`
+pid=`sed -e 's/ //g' $tempfile`
if test -n "$pid" ; then
# wait a while for the background process to run
sleep 10
# now kill it
-kill -$SIG_QUIT $pid 2>&1 >/dev/null 2>/dev/null
+kill "-$SIG_QUIT" "$pid" 2>&1 >/dev/null 2>/dev/null
echo "killed [$pid]"
fi
diff --git a/samples/testdata-8bit b/samples/testdata-8bit
index f09021dc19db..f09021dc19db 100755..100644
--- a/samples/testdata-8bit
+++ b/samples/testdata-8bit
diff --git a/samples/textbox b/samples/textbox
index d3c7698c85ee..136fb7f51ebf 100755
--- a/samples/textbox
+++ b/samples/textbox
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: textbox,v 1.12 2010/01/13 10:36:35 tom Exp $
+# $Id: textbox,v 1.14 2020/11/26 00:05:11 tom Exp $
. ./setup-vars
@@ -35,10 +35,10 @@ EOF
TEXT=/usr/share/common-licenses/GPL
test -f $TEXT || TEXT=../COPYING
-cat $TEXT | expand >> $tempfile
+expand < $TEXT >> $tempfile
$DIALOG --clear --title "TEXT BOX" "$@" --textbox "$tempfile" 22 77
-retval=$?
+returncode=$?
. ./report-button
diff --git a/samples/textbox-both b/samples/textbox-both
index 787515312037..d84faf9e4977 100755
--- a/samples/textbox-both
+++ b/samples/textbox-both
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: textbox-both,v 1.1 2011/01/18 09:59:47 tom Exp $
+# $Id: textbox-both,v 1.3 2020/11/26 00:05:11 tom Exp $
. ./setup-vars
@@ -8,14 +8,14 @@
TEXT=/usr/share/common-licenses/GPL
test -f $TEXT || TEXT=../COPYING
-cat textbox.txt | expand > $tempfile
-cat $TEXT | expand >> $tempfile
+expand < textbox.txt > $tempfile
+expand < $TEXT >> $tempfile
$DIALOG --clear --title "TEXT BOX" \
--help-button \
--extra-button "$@" \
--textbox "$tempfile" 22 77
-retval=$?
+returncode=$?
. ./report-button
diff --git a/samples/textbox-help b/samples/textbox-help
index cb30253111b8..450c728c2c51 100755
--- a/samples/textbox-help
+++ b/samples/textbox-help
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: textbox-help,v 1.1 2011/01/18 09:59:20 tom Exp $
+# $Id: textbox-help,v 1.3 2020/11/26 00:05:11 tom Exp $
. ./setup-vars
@@ -8,13 +8,13 @@
TEXT=/usr/share/common-licenses/GPL
test -f $TEXT || TEXT=../COPYING
-cat textbox.txt | expand > $tempfile
-cat $TEXT | expand >> $tempfile
+expand < textbox.txt > $tempfile
+expand < $TEXT >> $tempfile
$DIALOG --clear --title "TEXT BOX" \
--help-button "$@" \
--textbox "$tempfile" 22 77
-retval=$?
+returncode=$?
. ./report-button
diff --git a/samples/textbox2 b/samples/textbox2
index 7c97de8cb38a..d4149b3c6095 100755
--- a/samples/textbox2
+++ b/samples/textbox2
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: textbox2,v 1.8 2010/01/13 10:36:49 tom Exp $
+# $Id: textbox2,v 1.10 2020/11/26 00:05:52 tom Exp $
. ./setup-vars
@@ -35,10 +35,10 @@ EOF
TEXT=/usr/share/common-licenses/GPL
test -f $TEXT || TEXT=../COPYING
-cat $TEXT | expand >> $tempfile
+expand < $TEXT >> $tempfile
$DIALOG --clear --title "TEXT BOX" "$@" --textbox "$tempfile" 0 0
-retval=$?
+returncode=$?
. ./report-button
diff --git a/samples/textbox3 b/samples/textbox3
index 2c076e955563..f3d6f8249849 100755
--- a/samples/textbox3
+++ b/samples/textbox3
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: textbox3,v 1.6 2010/01/13 10:37:01 tom Exp $
+# $Id: textbox3,v 1.8 2020/11/26 00:05:52 tom Exp $
. ./setup-vars
@@ -8,13 +8,13 @@
TEXT=/usr/share/common-licenses/GPL
test -f $TEXT || TEXT=../COPYING
-cat textbox.txt | expand > $tempfile
-cat $TEXT | expand >> $tempfile
+expand < textbox.txt > $tempfile
+expand < $TEXT >> $tempfile
$DIALOG --clear --title "TEXT BOX" \
--extra-button "$@" \
--textbox "$tempfile" 22 77
-retval=$?
+returncode=$?
. ./report-button
diff --git a/samples/timebox b/samples/timebox
index cb6bf5c6f4f1..de5b4377a7dd 100755
--- a/samples/timebox
+++ b/samples/timebox
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: timebox,v 1.9 2010/01/13 10:23:10 tom Exp $
+# $Id: timebox,v 1.11 2020/11/26 00:09:31 tom Exp $
. ./setup-vars
@@ -7,8 +7,8 @@ DIALOG_ERROR=254
export DIALOG_ERROR
exec 3>&1
-RESULT=`$DIALOG --title "TIMEBOX" "$@" --timebox "Please set the time..." 0 0 12 34 56 2>&1 1>&3`
-retval=$?
+returntext=`$DIALOG --title "TIMEBOX" "$@" --timebox "Please set the time..." 0 0 12 34 56 2>&1 1>&3`
+returncode=$?
exec 3>&-
. ./report-string
diff --git a/samples/timebox-stdout b/samples/timebox-stdout
index 10a00262bbd4..4ed0d9a23da7 100755
--- a/samples/timebox-stdout
+++ b/samples/timebox-stdout
@@ -1,10 +1,10 @@
#!/bin/sh
-# $Id: timebox-stdout,v 1.5 2010/01/13 10:37:19 tom Exp $
+# $Id: timebox-stdout,v 1.7 2020/11/26 00:09:31 tom Exp $
. ./setup-vars
-RESULT=`$DIALOG --stdout --title "TIMEBOX" "$@" --timebox "Please set the time..." 0 0 12 34 56`
+returntext=`$DIALOG --stdout --title "TIMEBOX" "$@" --timebox "Please set the time..." 0 0 12 34 56`
-retval=$?
+returncode=$?
. ./report-string
diff --git a/samples/timebox2 b/samples/timebox2
index 088acdff39b8..f734421b1cc4 100755
--- a/samples/timebox2
+++ b/samples/timebox2
@@ -1,11 +1,11 @@
#!/bin/sh
-# $Id: timebox2,v 1.7 2010/01/13 10:37:35 tom Exp $
+# $Id: timebox2,v 1.9 2020/11/26 00:09:31 tom Exp $
. ./setup-vars
exec 3>&1
-RESULT=`$DIALOG --title "TIMEBOX" "$@" --timebox "Please set the time..." 0 0 2>&1 1>&3`
-retval=$?
+returntext=`$DIALOG --title "TIMEBOX" "$@" --timebox "Please set the time..." 0 0 2>&1 1>&3`
+returncode=$?
exec 3>&-
. ./report-string
diff --git a/samples/timebox2-stdout b/samples/timebox2-stdout
index 922921fc2e2a..71a4fa443814 100755
--- a/samples/timebox2-stdout
+++ b/samples/timebox2-stdout
@@ -1,10 +1,10 @@
#!/bin/sh
-# $Id: timebox2-stdout,v 1.5 2010/01/13 10:37:55 tom Exp $
+# $Id: timebox2-stdout,v 1.7 2020/11/26 00:09:31 tom Exp $
. ./setup-vars
-RESULT=`$DIALOG --stdout --title "TIMEBOX" "$@" --timebox "Please set the time..." 0 0`
+returntext=`$DIALOG --stdout --title "TIMEBOX" "$@" --timebox "Please set the time..." 0 0`
-retval=$?
+returncode=$?
. ./report-string
diff --git a/samples/treeview b/samples/treeview
index 34212184d4de..fec3cddf9f69 100755
--- a/samples/treeview
+++ b/samples/treeview
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: treeview,v 1.2 2012/12/04 10:53:09 tom Exp $
+# $Id: treeview,v 1.3 2020/11/26 00:05:52 tom Exp $
. ./setup-vars
@@ -17,6 +17,6 @@ $DIALOG --title "TREE VIEW DIALOG" \
tag8 eight off 4 \
tag9 nine off 1 2> $tempfile
-retval=$?
+returncode=$?
. ./report-tempfile
diff --git a/samples/treeview2 b/samples/treeview2
index b3dde4159483..ba5e948f5fa2 100755
--- a/samples/treeview2
+++ b/samples/treeview2
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: treeview2,v 1.3 2012/12/23 22:28:00 tom Exp $
+# $Id: treeview2,v 1.5 2020/11/26 00:05:52 tom Exp $
. ./setup-vars
@@ -44,9 +44,9 @@ EOF
$DIALOG --title "TREE VIEW DIALOG" \
--scrollbar \
- --treeview "TreeView demo" 0 0 10 `cat $input | sed -e 's/:/ /g'` 2> $output
+ --treeview "TreeView demo" 0 0 10 `sed -e 's/:/ /g' "$input"` 2> $output
-retval=$?
+returncode=$?
tempfile=$output
. ./report-tempfile
diff --git a/samples/treeview4 b/samples/treeview4
new file mode 100755
index 000000000000..4b1f65eef457
--- /dev/null
+++ b/samples/treeview4
@@ -0,0 +1,24 @@
+#!/bin/sh
+# $Id: treeview4,v 1.3 2020/11/26 00:05:52 tom Exp $
+
+. ./setup-vars
+
+. ./setup-tempfile
+
+$DIALOG --title "TREE VIEW DIALOG" \
+ --help-button \
+ --item-help \
+ --treeview "TreeView demo" 0 0 0 \
+ tag1 one off 0 first \
+ tag2 two off 1 second \
+ tag3 three on 2 third \
+ tag4 four off 1 fourth \
+ tag5 five off 2 fifth \
+ tag6 six off 3 sixth \
+ tag7 seven off 3 seventh \
+ tag8 eight off 4 eighth \
+ tag9 nine off 1 ninth 2> $tempfile
+
+returncode=$?
+
+. ./report-tempfile
diff --git a/samples/wheel b/samples/wheel
index 4adef26e8e09..13e084a405fc 100755
--- a/samples/wheel
+++ b/samples/wheel
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: wheel,v 1.8 2012/06/29 09:59:40 tom Exp $
+# $Id: wheel,v 1.10 2019/12/11 01:43:03 tom Exp $
. ./setup-vars
@@ -8,57 +8,58 @@
TITLE="This screen was taken from ComeOn Point Installer! v0.9 by ComeOn Linux!"
$DIALOG --print-maxsize 2>$tempfile
-ROWS="`cut $tempfile -f1 -d, | cut -f2 -d:`"
-COLS="`cut $tempfile -f2 -d,`"
+ROWS="`sed -e 's/^[^:]*:[ ]*//' -e 's/,.*//' $tempfile`"
+COLS="`sed -e 's/^[^,]*,[ ]*//' $tempfile`"
rm $tempfile
# account for widest labels
-COLS=`expr $COLS - 30`
+COLS=`expr "$COLS" - 30`
# Takes an integer, multiplies it for COLS, divides for 132
scalex() {
- expr $1 \* $COLS / 132
+ expr "$1" \* "$COLS" / 132
}
scaley() {
- expr $1 \* $ROWS / 60
+ expr "$1" \* "$ROWS" / 60
}
$DIALOG --backtitle "$TITLE" --no-shadow \
---begin `scaley 27` `scalex 98` --infobox "pushd /var/log >/dev/null" 0 0 --and-widget \
---begin `scaley 35` `scalex 95` --infobox "mkdir -p news -m 755" 0 0 --and-widget \
---begin `scaley 45` `scalex 86` --infobox "chown news.news news" 0 0 --and-widget \
---begin `scaley 48` `scalex 78` --infobox "cd /var/log/news" 0 0 --and-widget \
---begin `scaley 51` `scalex 61` --infobox "mkdir -p OLD -m 755" 0 0 --and-widget \
---begin `scaley 52` `scalex 47` --infobox "chown news.news OLD" 0 0 --and-widget \
---begin `scaley 51` `scalex 40` --infobox "cd /var/spool" 0 0 --and-widget \
---begin `scaley 48` `scalex 25` --infobox "mkdir -p news -m 775" 0 0 --and-widget \
---begin `scaley 42` `scalex 13` --infobox "chown news.news news" 0 0 --and-widget \
---begin `scaley 35` `scalex 4` --infobox "cd /var/spool/news" 0 0 --and-widget \
---begin `scaley 27` `scalex 2` --infobox "CURMASK=`umask`" 0 0 --and-widget \
---begin `scaley 19` `scalex 4` --infobox "umask 02" 0 0 --and-widget \
---begin `scaley 11` `scalex 13` --infobox "mkdir -p out.going control junk in.coming" 0 0 --and-widget \
---begin `scaley 5` `scalex 25` --infobox "chown news.news out.going control junk in.coming" 0 0 --and-widget \
---begin `scaley 2` `scalex 37` --infobox "cd in.coming" 0 0 --and-widget \
---begin `scaley 1` `scalex 46` --infobox "mkdir -p bad tmp" 0 0 --and-widget \
---begin `scaley 2` `scalex 61` --infobox "chown news.news bad tmp" 0 0 --and-widget \
---begin `scaley 5` `scalex 76` --infobox "umask $CURMASK" 0 0 --and-widget \
---begin `scaley 11` `scalex 87` --infobox "ln -sf ~news /usr/local/lib/" 0 0 --and-widget \
---begin `scaley 18` `scalex 95` --infobox "ln -sf ~news/inews /usr/bin/" 0 0 --and-widget \
---begin `scaley 26` `scalex 97` --infobox "chmod 1777 /var/tmp" 0 0 --and-widget \
---begin `scaley 34` `scalex 95` --infobox "cd ~news" 0 0 --and-widget \
---begin `scaley 42` `scalex 87` --infobox "touch history history.dir history.pag errlog log" 0 0 --and-widget \
---begin `scaley 47` `scalex 76` --infobox "chown news.news history* log errlog" 0 0 --and-widget \
+--begin "`scaley 27`" "`scalex 98`" --infobox "pushd /var/log >/dev/null" 0 0 --and-widget \
+--begin "`scaley 35`" "`scalex 95`" --infobox "mkdir -p news -m 755" 0 0 --and-widget \
+--begin "`scaley 45`" "`scalex 86`" --infobox "chown news.news news" 0 0 --and-widget \
+--begin "`scaley 48`" "`scalex 78`" --infobox "cd /var/log/news" 0 0 --and-widget \
+--begin "`scaley 51`" "`scalex 61`" --infobox "mkdir -p OLD -m 755" 0 0 --and-widget \
+--begin "`scaley 52`" "`scalex 47`" --infobox "chown news.news OLD" 0 0 --and-widget \
+--begin "`scaley 51`" "`scalex 40`" --infobox "cd /var/spool" 0 0 --and-widget \
+--begin "`scaley 48`" "`scalex 25`" --infobox "mkdir -p news -m 775" 0 0 --and-widget \
+--begin "`scaley 42`" "`scalex 13`" --infobox "chown news.news news" 0 0 --and-widget \
+--begin "`scaley 35`" "`scalex 4`" --infobox "cd /var/spool/news" 0 0 --and-widget \
+--begin "`scaley 27`" "`scalex 2`" --infobox "CURMASK=`umask`" 0 0 --and-widget \
+--begin "`scaley 19`" "`scalex 4`" --infobox "umask 02" 0 0 --and-widget \
+--begin "`scaley 11`" "`scalex 13`" --infobox "mkdir -p out.going control junk in.coming" 0 0 --and-widget \
+--begin "`scaley 5`" "`scalex 25`" --infobox "chown news.news out.going control junk in.coming" 0 0 --and-widget \
+--begin "`scaley 2`" "`scalex 37`" --infobox "cd in.coming" 0 0 --and-widget \
+--begin "`scaley 1`" "`scalex 46`" --infobox "mkdir -p bad tmp" 0 0 --and-widget \
+--begin "`scaley 2`" "`scalex 61`" --infobox "chown news.news bad tmp" 0 0 --and-widget \
+--begin "`scaley 5`" "`scalex 76`" --infobox "umask $CURMASK" 0 0 --and-widget \
+--begin "`scaley 11`" "`scalex 87`" --infobox "ln -sf ~news /usr/local/lib/" 0 0 --and-widget \
+--begin "`scaley 18`" "`scalex 95`" --infobox "ln -sf ~news/inews /usr/bin/" 0 0 --and-widget \
+--begin "`scaley 26`" "`scalex 97`" --infobox "chmod 1777 /var/tmp" 0 0 --and-widget \
+--begin "`scaley 34`" "`scalex 95`" --infobox "cd ~news" 0 0 --and-widget \
+--begin "`scaley 42`" "`scalex 87`" --infobox "touch history history.dir history.pag errlog log" 0 0 --and-widget \
+--begin "`scaley 47`" "`scalex 76`" --infobox "chown news.news history* log errlog" 0 0 --and-widget \
--infobox "Creating spooling and logging directories and files..." 0 0 --and-widget \
---begin `scaley 51` `scalex 78` --infobox "chmod 664 history* log errlog" 0 0 --and-widget \
---begin `scaley 52` `scalex 60` --infobox "echo \"control 0000000000 0000000001 y\" > active" 0 0 --and-widget \
---begin `scaley 51` `scalex 42` --infobox "echo \"junk 0000000000 0000000001 y\" >> active" 0 0 --and-widget \
---begin `scaley 48` `scalex 26` --infobox "chown news.news active" 0 0 --and-widget \
---begin `scaley 42` `scalex 13` --infobox "echo \"control 814573260 usenet\" > active.times" 0 0 --and-widget \
---begin `scaley 35` `scalex 4` --infobox "echo \"junk 814573260 usenet\" >> active.times" 0 0 --and-widget \
---begin `scaley 27` `scalex 2` --infobox "chown news.news active.times" 0 0 --and-widget \
---begin `scaley 19` `scalex 4` --infobox ":>newsgroups" 0 0 --and-widget \
---begin `scaley 11` `scalex 12` --infobox "chown news.news newsgroups" 0 0 --and-widget \
---sleep 2 --begin `scaley 6` `scalex 25` --infobox "popd >/dev/null" 0 0 --and-widget \
+--begin "`scaley 51`" "`scalex 78`" --infobox "chmod 664 history* log errlog" 0 0 --and-widget \
+--begin "`scaley 52`" "`scalex 60`" --infobox "echo \"control 0000000000 0000000001 y\" > active" 0 0 --and-widget \
+--begin "`scaley 51`" "`scalex 42`" --infobox "echo \"junk 0000000000 0000000001 y\" >> active" 0 0 --and-widget \
+--begin "`scaley 48`" "`scalex 26`" --infobox "chown news.news active" 0 0 --and-widget \
+--begin "`scaley 42`" "`scalex 13`" --infobox "echo \"control 814573260 usenet\" > active.times" 0 0 --and-widget \
+--begin "`scaley 35`" "`scalex 4`" --infobox "echo \"junk 814573260 usenet\" >> active.times" 0 0 --and-widget \
+--begin "`scaley 27`" "`scalex 2`" --infobox "chown news.news active.times" 0 0 --and-widget \
+--begin "`scaley 19`" "`scalex 4`" --infobox ":>newsgroups" 0 0 --and-widget \
+--begin "`scaley 11`" "`scalex 12`" --infobox "chown news.news newsgroups" 0 0 --and-widget \
+--sleep 2 \
+--begin "`scaley 6`" "`scalex 25`" --infobox "popd >/dev/null" 0 0 --and-widget \
--beep --msgbox "ComeOn Linux! :-)" 0 0 --and-widget \
--begin 2 0 --title "/var/adm/debug. This is running while that down runs also" --tailboxbg /var/adm/debug 6 80 --and-widget \
--begin 8 0 --title "/var/adm/messages. It tails the file in multitasking with /var/adm/debug" --tailbox /var/adm/messages -1 -1
diff --git a/samples/yesno b/samples/yesno
index fa1ea444ce4b..917c0ae3d30c 100755
--- a/samples/yesno
+++ b/samples/yesno
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: yesno,v 1.9 2010/01/14 01:11:11 tom Exp $
+# $Id: yesno,v 1.10 2020/11/26 00:05:52 tom Exp $
. ./setup-vars
@@ -16,6 +16,6 @@ $DIALOG --title "YES/NO BOX" --clear "$@" \
auto wrap around will be disabled and you will have to \
control line breaking yourself." 15 61
-retval=$?
+returncode=$?
. ./report-yesno
diff --git a/samples/yesno-both b/samples/yesno-both
index a408bdba4b54..b2cb504167ef 100755
--- a/samples/yesno-both
+++ b/samples/yesno-both
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: yesno-both,v 1.5 2010/01/13 10:40:39 tom Exp $
+# $Id: yesno-both,v 1.6 2020/11/26 00:05:52 tom Exp $
. ./setup-vars
@@ -19,6 +19,6 @@ $DIALOG --title "YES/NO/MAYBE BOX" \
auto wrap around will be disabled and you will have to \
control line breaking yourself." 15 61
-retval=$?
+returncode=$?
. ./report-yesno
diff --git a/samples/yesno-extra b/samples/yesno-extra
index ce31b8107941..d01b74a16182 100755
--- a/samples/yesno-extra
+++ b/samples/yesno-extra
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: yesno-extra,v 1.5 2010/01/13 10:40:39 tom Exp $
+# $Id: yesno-extra,v 1.6 2020/11/26 00:05:52 tom Exp $
. ./setup-vars
@@ -18,6 +18,6 @@ $DIALOG --title "YES/NO/MAYBE BOX" \
auto wrap around will be disabled and you will have to \
control line breaking yourself." 15 61
-retval=$?
+returncode=$?
. ./report-yesno
diff --git a/samples/yesno-help b/samples/yesno-help
index 1333f1cbc09e..1b0a816df940 100755
--- a/samples/yesno-help
+++ b/samples/yesno-help
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: yesno-help,v 1.5 2010/01/13 10:40:39 tom Exp $
+# $Id: yesno-help,v 1.6 2020/11/26 00:05:52 tom Exp $
. ./setup-vars
@@ -13,6 +13,6 @@ $DIALOG --title "YES/NO BOX" --clear --help-button "$@" \
auto wrap around will be disabled and you will have to \
control line breaking yourself." 15 61
-retval=$?
+returncode=$?
. ./report-yesno
diff --git a/samples/yesno-utf8 b/samples/yesno-utf8
index 4a6be30eb801..a10eba7605bc 100755
--- a/samples/yesno-utf8
+++ b/samples/yesno-utf8
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: yesno-utf8,v 1.7 2010/01/14 01:11:23 tom Exp $
+# $Id: yesno-utf8,v 1.8 2020/11/26 00:05:52 tom Exp $
. ./setup-vars
@@ -9,6 +9,6 @@ DIALOG_ERROR=254
export DIALOG_ERROR
$DIALOG "$@" --yesno "Are you a DOG?" 0 0
-retval=$?
+returncode=$?
. ./report-yesno
diff --git a/samples/yesno2 b/samples/yesno2
index d022352e6308..ba4e7f4e0fc2 100755
--- a/samples/yesno2
+++ b/samples/yesno2
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: yesno2,v 1.7 2010/01/13 10:40:39 tom Exp $
+# $Id: yesno2,v 1.8 2020/11/26 00:05:52 tom Exp $
. ./setup-vars
@@ -13,6 +13,6 @@ also control line breaking explicitly by inserting \
auto wrap around will be disabled and you will have to \
control line breaking yourself." 0 0
-retval=$?
+returncode=$?
. ./report-yesno
diff --git a/samples/yesno3 b/samples/yesno3
index f67fb85b600f..336c41c90670 100755
--- a/samples/yesno3
+++ b/samples/yesno3
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: yesno3,v 1.6 2010/01/13 10:40:39 tom Exp $
+# $Id: yesno3,v 1.7 2020/11/26 00:05:52 tom Exp $
. ./setup-vars
@@ -13,6 +13,6 @@ also control line breaking explicitly by inserting \
auto wrap around will be disabled and you will have to \
control line breaking yourself." 0 0
-retval=$?
+returncode=$?
. ./report-yesno
diff --git a/samples/yesno4 b/samples/yesno4
index 99f65e86125e..4c54160d0043 100755
--- a/samples/yesno4
+++ b/samples/yesno4
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: yesno4,v 1.1 2010/01/14 10:26:40 tom Exp $
+# $Id: yesno4,v 1.2 2020/11/26 00:05:52 tom Exp $
. ./setup-vars
@@ -13,6 +13,6 @@ also control line breaking explicitly by inserting \
auto wrap around will be disabled and you will have to \
control line breaking yourself." 6 30
-retval=$?
+returncode=$?
. ./report-yesno