home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-11-10 | 37.0 KB | 1,444 lines |
- Newsgroups: comp.sources.misc
- From: dfs@doe.carleton.ca (David F. Skoll)
- Subject: v33i069: remind - A replacement for calendar, Part12/12
- Message-ID: <1992Nov10.042050.1507@sparky.imd.sterling.com>
- X-Md4-Signature: 02558b1ed9a51b888cef239a1d465844
- Date: Tue, 10 Nov 1992 04:20:50 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: dfs@doe.carleton.ca (David F. Skoll)
- Posting-number: Volume 33, Issue 69
- Archive-name: remind/part12
- Environment: UNIX, MS-DOS
- Supersedes: remind: Volume 17, Issue 3-6
-
- #!/bin/sh
- # This is part 12 of Remind 03.00.00
- if touch 2>&1 | fgrep 'amc' > /dev/null
- then TOUCH=touch
- else TOUCH=true
- fi
- # ============= remind-all.csh ==============
- if test X"$1" != X"-c" -a -f 'remind-all.csh'; then
- echo "File already exists: skipping 'remind-all.csh'"
- else
- echo "x - extracting remind-all.csh (Text)"
- sed 's/^X//' << 'SHAR_EOF' > remind-all.csh &&
- X#!/bin/csh -f
- X
- X# Shell script to mail all users reminders.
- X
- X# Run it AFTER MIDNIGHT so that date is correct!
- X# On our system, we have the following in our crontab:
- X# 05 5 * * * /usr/share/lib/remind/remind-all > /dev/null 2>&1
- X
- X# Also, you MUST use the -r and -q options on REMIND, otherwise SEVERE
- X# security hole could develop. I recommend making this script
- X# readable and executable only by root to minimize security problems.
- X# DO NOT make the script setuid!
- X
- X# The following line gets a list of users for systems using SUN's
- X# NIS service:
- Xset USERS = `ypcat passwd | awk -F: '{print $1}'`
- X
- X# The following line gets a list of users by examining /etc/passwd:
- X# set USERS = `awk -F: '{print $1}' /etc/passwd`
- X
- X# If neither of the above methods works, you must come up with some
- X# way of getting a list of users on the system
- X
- X# Set the following variables as appropriate for your system
- Xset REMIND = /usr/local/bin/remind
- Xset MAIL = /usr/ucb/mail
- Xset RM = "/usr/bin/rm -f"
- X
- Xset REMFILE = /tmp/RemFile.$$
- X
- X# Scan each user's directory for a .reminders file
- Xforeach i ($USERS)
- X if (-r ~$i/.reminders) then
- X
- X# echo "$i has a .reminders file." DEBUGGING PURPOSES ONLY
- X
- X su - $i -c "$REMIND -rqh ~$i/.reminders" < /dev/null > $REMFILE
- X if (! -z $REMFILE) then
- X# echo "Sending mail to $i" DEBUGGING PURPOSES ONLY
- X
- X $MAIL -s "Reminders" $i < $REMFILE
- X endif
- X $RM $REMFILE
- X endif
- Xend
- SHAR_EOF
- $TOUCH -am 1109141292 remind-all.csh &&
- chmod 0600 remind-all.csh ||
- echo "restore of remind-all.csh failed"
- set `wc -c remind-all.csh`;Wc_c=$1
- if test "$Wc_c" != "1446"; then
- echo original size 1446, current size $Wc_c
- fi
- fi
- # ============= remind-all.sh ==============
- if test X"$1" != X"-c" -a -f 'remind-all.sh'; then
- echo "File already exists: skipping 'remind-all.sh'"
- else
- echo "x - extracting remind-all.sh (Text)"
- sed 's/^X//' << 'SHAR_EOF' > remind-all.sh &&
- X# Shell script to mail all users reminders.
- X
- X# Thanks to Bill Aten for this script.
- X
- X# Run it AFTER MIDNIGHT so that date is correct!
- X# On our system, we have the following in our crontab:
- X# 02 00 * * * /usr/local/adm/remind-all >/dev/null 2>&1
- X
- X# Also, you MUST use the -r and -q options on REMIND, otherwise a SEVERE
- X# security hole could develop. I recommend making this script
- X# readable and executable only by root to minimize security problems.
- X# DO NOT make the script setuid!
- X
- X# The following line gets a list of users for systems using SUN's
- X# NIS service:
- X# USERS=`ypcat passwd | awk -F: '{print $1}'`
- X
- X# The following line gets a list of users by examining /etc/passwd:
- XUSERS=`awk -F: '{print $1}' /etc/passwd`
- X
- X# If neither of the above methods works, you must come up with some
- X# way of getting a list of users on the system
- X
- X# Set the following variables as appropriate for your system
- XREMIND=/usr/local/bin/remind
- XMAIL=/usr/bin/mail
- XRM="/bin/rm -f"
- X
- XREMFILE=/tmp/RemFile.$$
- X
- X# Scan each user's directory for a .reminders file
- Xfor i in $USERS
- Xdo
- XHOME=`grep \^$i: /etc/passwd | awk -F: '{print $6}'`
- X if [ -r $HOME/.reminders ]; then
- X
- X# echo "$i has a .reminders file." DEBUGGING PURPOSES ONLY
- X
- X su - $i -c "$REMIND -rqh $HOME/.reminders" < /dev/null > $REMFILE
- X if [ -s $REMFILE ]; then
- X# echo "Sending mail to $i" DEBUGGING PURPOSES ONLY
- X $MAIL -s "Reminders" $i < $REMFILE
- X fi
- X $RM $REMFILE
- X fi
- Xdone
- SHAR_EOF
- $TOUCH -am 1109141292 remind-all.sh &&
- chmod 0600 remind-all.sh ||
- echo "restore of remind-all.sh failed"
- set `wc -c remind-all.sh`;Wc_c=$1
- if test "$Wc_c" != "1472"; then
- echo original size 1472, current size $Wc_c
- fi
- fi
- # ============= test.rem ==============
- if test X"$1" != X"-c" -a -f 'test.rem'; then
- echo "File already exists: skipping 'test.rem'"
- else
- echo "x - extracting test.rem (Text)"
- sed 's/^X//' << 'SHAR_EOF' > test.rem &&
- X# Test file for REMIND
- X#
- X# Use this file to test the date calculation routines
- X# of the REMIND program by typing:
- X#
- X# ./test-rem # From WITHIN Remind source directory!
- X
- X# Test each possible case of the basic reminders.
- X
- XREM MSG Every Day
- X
- XREM 18 MSG Every 18th
- XREM 15 MSG Every 15th
- X
- XREM Feb MSG February
- XREM Jan MSG January
- XREM March MSG March
- X
- XREM 13 Jan MSG 13 Jan
- XREM 15 Feb MSG 15 Feb
- XREM 28 Feb MSG 28 Feb
- XREM 29 Feb MSG 29 Feb
- XREM 5 Mar MSG 5 Mar
- X
- XREM 1990 MSG 1990
- XREM 1991 MSG 1991
- XREM 1992 MSG 1991
- X
- XREM 1 1990 MSG 1 1990
- XREM 29 1991 MSG 29 1991
- XREM 29 1992 MSG 29 1992
- XREM 16 1991 MSG 16 1991
- X
- XREM Jan 1990 MSG Jan 1990
- XREM Feb 1991 MSG Feb 1991
- XREM Dec 1991 MSG Dec 1991
- XREM May 1992 MSG May 1992
- X
- XREM 1 Jan 1991 MSG 1 Jan 1991
- XREM 16 Feb 1991 MSG 16 Feb 1991
- XREM 29 Dec 1992 MSG 29 Dec 1992
- X
- XREM Sun MSG Sun
- XREM Fri Sat Tue MSG Fri Sat Tue
- X
- XREM Sun 16 MSG Sun 16
- XREM Mon Tue Wed Thu Fri 1 MSG Mon Tue Wed Thu Fri 1
- X
- XREM Sun Feb MSG Sun Feb
- XREM Mon Tue March MSG Mon Tue March
- X
- XREM Sun 16 Feb MSG Sun 16 Feb
- XREM Mon Tue 10 March MSG Mon Tue 10 March
- X
- XREM Sat Sun 1991 MSG Sat Sun 1991
- XREM Mon Tue 1992 MSG Mon Tue 1992
- X
- XREM Sun 16 1991 MSG Sun 16 1991
- XREM Mon Tue Wed Thu Fri 1 1992 MSG Mon Tue Wed Thu Fri 1 1992
- X
- XREM Mon Feb 1991 MSG Mon Feb 1991
- XREM Tue Jan 1992 MSG Tue Jan 1992
- X
- XREM Sun Mon 16 Feb 1991 MSG Sun Mon 16 Feb 1991
- XREM Tue 28 Jan 1992 MSG Tue 28 Jan 1992
- X
- X# Try some Backs
- XCLEAR-OMIT-CONTEXT
- XREM 1 -1 OMIT sat sun MSG 1 -1 OMIT Sat Sun
- XREM 1 --1 OMIT sat sun MSG 1 --1 OMIT Sat Sun
- X
- XOMIT 28 Feb
- XREM 1 -1 OMIT sat sun MSG 1 -1 OMIT Sat Sun (28 Feb omitted)
- XREM 1 --1 OMIT sat sun MSG 1 --1 OMIT Sat Sun (28 Feb omitted)
- X
- XCLEAR-OMIT-CONTEXT
- X
- X# Try out UNTIL
- XREM Wed UNTIL 21 Feb 1991 MSG Wed UNTIL 21 Feb 1991
- X
- X# Try playing with the OMIT context
- X
- XOMIT 28 Feb 1991
- XREM 1 Mar -1 MSG 1 mar -1 (28feb91 omitted)
- XREM 1 Mar --1 MSG 1 mar --1 (28Feb91 omitted)
- XREM 28 Feb BEFORE MSG 28 Feb BEFORE (28Feb91 omitted)
- XREM 28 Feb SKIP MSG 28 Feb SKIP (28Feb91 omitted)
- XREM 28 Feb AFTER MSG 28 Feb AFTER (28Feb91 omitted)
- X
- XPUSH-OMIT-CONTEXT
- XCLEAR-OMIT-CONTEXT
- XREM 1 Mar -1 MSG 1 mar -1
- XREM 1 Mar --1 MSG 1 mar --1
- XREM 28 Feb BEFORE MSG 28 Feb BEFORE
- XREM 28 Feb SKIP MSG 28 Feb SKIP
- XREM 28 Feb AFTER MSG 28 Feb AFTER
- X
- XPOP-OMIT-CONTEXT
- XREM 1 Mar -1 MSG 1 mar -1 (28feb91 omitted)
- XREM 1 Mar --1 MSG 1 mar --1 (28Feb91 omitted)
- XREM 28 Feb BEFORE MSG 28 Feb BEFORE (28Feb91 omitted)
- XREM 28 Feb SKIP MSG 28 Feb SKIP (28Feb91 omitted)
- XREM 28 Feb AFTER MSG 28 Feb AFTER (28Feb91 omitted)
- X
- X
- XREM 13 March 1991 *1 UNTIL 19 March 1991 MSG 13-19 Mar 91
- X
- X# Test BACK
- XCLEAR-OMIT-CONTEXT
- XREM 18 Feb 1991 +1 MSG 18 Feb 1991 +1
- X
- XOMIT 17 Feb 1991
- XREM 18 Feb 1991 +1 MSG 18 Feb 1991 +1 (17Feb91 omitted)
- XREM 18 Feb 1991 ++1 MSG 18 Feb 1991 ++1 (17Feb91 omitted)
- X
- XCLEAR-OMIT-CONTEXT
- Xset a000 abs(1)
- Xset a001 abs(-1)
- Xset a002 asc("foo")
- Xset a003 baseyr()
- Xset a004 char(66,55,66,77,66)
- Xset a005 choose(3, "foo", "bar", "baz", "blech")
- Xset a006 coerce("string", 1)
- Xset a007 coerce("string", today())
- Xset a008 coerce("string", 11:44)
- Xset a009 coerce("int", "badnews")
- Xset a010 coerce("int", "12")
- Xset a011 coerce("int", 11:44)
- Xset a012 coerce("int", today())
- Xset a013 date(1992, 2, 2)
- Xset a014 date(1993, 2, 29)
- Xset a015 day(today())
- Xset a016 daysinmon(2, 1991)
- Xset a017 daysinmon(2, 1992)
- Xset a018 defined("a017")
- Xset a019 defined("a019")
- Xset a020 filename()
- Xset a021 getenv("TEST_GETENV")
- Xset a022 hour(11:22)
- Xset a023 iif(1, 1, 0)
- Xset a024 iif(0, 1, 0)
- Xset a025 index("barfoobar", "foo")
- Xset a026 index("barfoobar", "bar", 2)
- Xset a027 isleap(today())
- Xset a028 isleap(1992)
- Xomit [trigger(today())]
- Xset a030 isomitted(today())
- Xclear
- Xset a029 isomitted(today())
- Xset a031 lower("FOOBARBAZ")
- Xset a032 max(1, 2, 34, 1, 3)
- Xset a033 max("foo", "bar", "baz")
- Xset a034 max(today(), today()+1, today()-1)
- Xset a035 min(1, 2, 34, 1, 3)
- Xset a036 min("foo", "bar", "baz")
- Xset a037 min(today(), today()+1, today()-1)
- Xset a038 minute(11:33)
- Xset a039 mon(today())
- Xset a040 monnum(today())
- Xset a041 ord(3)
- Xset a042 ord(4)
- Xset a043 ostype()
- Xset a044 plural(2)
- Xset a045 plural(2, "ies")
- Xset a046 plural(2, "y", "ies")
- Xset a047 sgn(-2)
- Xset a048 shell("echo foo")
- Xset a049 strlen("sadjflkhsldkfhsdlfjhk")
- Xset a050 substr(a049, 2)
- Xset a051 substr(a050, 2, 6)
- Xset a052 time(1+2, 3+4)
- Xrem 10 jan 1992 AT 11:22 CAL
- Xset a053 trigdate()
- Xset a054 trigtime()
- Xset a055 trigvalid()
- Xset a056 upper("sdfjhsdf ksjdfh kjsdfh ksjdfh")
- Xset a057 value("a05"+"6")
- Xset a058 version()
- Xset a059 wkday(today())
- Xset a060 wkdaynum(today())
- Xset a061 year(today())
- Xset a062 1+2*(3+4-(5*7/2))
- Xset a063 1>=2
- Xset a064 1<2 || 3 > 4
- Xset a065 1 && 1
- Xset a066 !a065
- Xset a067 typeof(2)
- Xset a068 typeof("foo")
- Xset a069 typeof(11:33)
- Xset a070 typeof(today())
- Xfset g(x,y) max(x,y)
- Xfset h(x,y) min(g(x+y, x*y), g(x-y, x/y))
- Xset a071 g(1, 2)
- Xset a072 h(2, 3)
- Xset a073 h("foo", 11:33)
- SHAR_EOF
- $TOUCH -am 1109141292 test.rem &&
- chmod 0600 test.rem ||
- echo "restore of test.rem failed"
- set `wc -c test.rem`;Wc_c=$1
- if test "$Wc_c" != "4821"; then
- echo original size 4821, current size $Wc_c
- fi
- fi
- # ============= test-rem ==============
- if test X"$1" != X"-c" -a -f 'test-rem'; then
- echo "File already exists: skipping 'test-rem'"
- else
- echo "x - extracting test-rem (Text)"
- sed 's/^X//' << 'SHAR_EOF' > test-rem &&
- X#!/bin/csh -f
- Xsetenv TEST_GETENV "foo bar baz"
- X./remind -e -dxtev ./test.rem 16 feb 1991 > ./test.out
- Xcmp -s ./test.out ./test.cmp
- Xif ($status == 0) then
- X echo "Remind: Acceptance test PASSED"
- X exit 0
- Xelse
- X echo "Remind: Acceptance test FAILED"
- X echo ""
- X echo "Examine the file test.out to see where it differs from the"
- X echo "reference file test.cmp."
- X exit 1
- Xendif
- SHAR_EOF
- $TOUCH -am 1109141292 test-rem &&
- chmod 0700 test-rem ||
- echo "restore of test-rem failed"
- set `wc -c test-rem`;Wc_c=$1
- if test "$Wc_c" != "384"; then
- echo original size 384, current size $Wc_c
- fi
- fi
- # ============= test.cmp ==============
- if test X"$1" != X"-c" -a -f 'test.cmp'; then
- echo "File already exists: skipping 'test.cmp'"
- else
- echo "x - extracting test.cmp (Text)"
- sed 's/^X//' << 'SHAR_EOF' > test.cmp &&
- X# Test file for REMIND
- X#
- X# Use this file to test the date calculation routines
- X# of the REMIND program by typing:
- X#
- X# ./test-rem # From WITHIN Remind source directory!
- X
- X# Test each possible case of the basic reminders.
- X
- XREM MSG Every Day
- X./test.rem(10): Trig = Saturday, 16 February, 1991
- XReminders for Saturday, 16th February, 1991:
- X
- XEvery Day
- X
- X
- XREM 18 MSG Every 18th
- X./test.rem(12): Trig = Monday, 18 February, 1991
- XREM 15 MSG Every 15th
- X./test.rem(13): Trig = Friday, 15 March, 1991
- X
- XREM Feb MSG February
- X./test.rem(15): Trig = Saturday, 16 February, 1991
- XFebruary
- X
- XREM Jan MSG January
- X./test.rem(16): Trig = Wednesday, 1 January, 1992
- XREM March MSG March
- X./test.rem(17): Trig = Friday, 1 March, 1991
- X
- XREM 13 Jan MSG 13 Jan
- X./test.rem(19): Trig = Monday, 13 January, 1992
- XREM 15 Feb MSG 15 Feb
- X./test.rem(20): Trig = Saturday, 15 February, 1992
- XREM 28 Feb MSG 28 Feb
- X./test.rem(21): Trig = Thursday, 28 February, 1991
- XREM 29 Feb MSG 29 Feb
- X./test.rem(22): Trig = Saturday, 29 February, 1992
- XREM 5 Mar MSG 5 Mar
- X./test.rem(23): Trig = Tuesday, 5 March, 1991
- X
- XREM 1990 MSG 1990
- X./test.rem(25): Expired
- XREM 1991 MSG 1991
- X./test.rem(26): Trig = Saturday, 16 February, 1991
- X1991
- X
- XREM 1992 MSG 1991
- X./test.rem(27): Trig = Wednesday, 1 January, 1992
- X
- XREM 1 1990 MSG 1 1990
- X./test.rem(29): Expired
- XREM 29 1991 MSG 29 1991
- X./test.rem(30): Trig = Friday, 29 March, 1991
- XREM 29 1992 MSG 29 1992
- X./test.rem(31): Trig = Wednesday, 29 January, 1992
- XREM 16 1991 MSG 16 1991
- X./test.rem(32): Trig = Saturday, 16 February, 1991
- X16 1991
- X
- X
- XREM Jan 1990 MSG Jan 1990
- X./test.rem(34): Expired
- XREM Feb 1991 MSG Feb 1991
- X./test.rem(35): Trig = Saturday, 16 February, 1991
- XFeb 1991
- X
- XREM Dec 1991 MSG Dec 1991
- X./test.rem(36): Trig = Sunday, 1 December, 1991
- XREM May 1992 MSG May 1992
- X./test.rem(37): Trig = Friday, 1 May, 1992
- X
- XREM 1 Jan 1991 MSG 1 Jan 1991
- X./test.rem(39): Expired
- XREM 16 Feb 1991 MSG 16 Feb 1991
- X./test.rem(40): Trig = Saturday, 16 February, 1991
- X16 Feb 1991
- X
- XREM 29 Dec 1992 MSG 29 Dec 1992
- X./test.rem(41): Trig = Tuesday, 29 December, 1992
- X
- XREM Sun MSG Sun
- X./test.rem(43): Trig = Sunday, 17 February, 1991
- XREM Fri Sat Tue MSG Fri Sat Tue
- X./test.rem(44): Trig = Saturday, 16 February, 1991
- XFri Sat Tue
- X
- X
- XREM Sun 16 MSG Sun 16
- X./test.rem(46): Trig = Sunday, 17 February, 1991
- XREM Mon Tue Wed Thu Fri 1 MSG Mon Tue Wed Thu Fri 1
- X./test.rem(47): Trig = Friday, 1 March, 1991
- X
- XREM Sun Feb MSG Sun Feb
- X./test.rem(49): Trig = Sunday, 17 February, 1991
- XREM Mon Tue March MSG Mon Tue March
- X./test.rem(50): Trig = Monday, 4 March, 1991
- X
- XREM Sun 16 Feb MSG Sun 16 Feb
- X./test.rem(52): Trig = Sunday, 17 February, 1991
- XREM Mon Tue 10 March MSG Mon Tue 10 March
- X./test.rem(53): Trig = Monday, 11 March, 1991
- X
- XREM Sat Sun 1991 MSG Sat Sun 1991
- X./test.rem(55): Trig = Saturday, 16 February, 1991
- XSat Sun 1991
- X
- XREM Mon Tue 1992 MSG Mon Tue 1992
- X./test.rem(56): Trig = Monday, 6 January, 1992
- X
- XREM Sun 16 1991 MSG Sun 16 1991
- X./test.rem(58): Trig = Sunday, 17 February, 1991
- XREM Mon Tue Wed Thu Fri 1 1992 MSG Mon Tue Wed Thu Fri 1 1992
- X./test.rem(59): Trig = Wednesday, 1 January, 1992
- X
- XREM Mon Feb 1991 MSG Mon Feb 1991
- X./test.rem(61): Trig = Monday, 18 February, 1991
- XREM Tue Jan 1992 MSG Tue Jan 1992
- X./test.rem(62): Trig = Tuesday, 7 January, 1992
- X
- XREM Sun Mon 16 Feb 1991 MSG Sun Mon 16 Feb 1991
- X./test.rem(64): Trig = Sunday, 17 February, 1991
- XREM Tue 28 Jan 1992 MSG Tue 28 Jan 1992
- X./test.rem(65): Trig = Tuesday, 28 January, 1992
- X
- X# Try some Backs
- XCLEAR-OMIT-CONTEXT
- XREM 1 -1 OMIT sat sun MSG 1 -1 OMIT Sat Sun
- X./test.rem(69): Trig = Thursday, 28 February, 1991
- XREM 1 --1 OMIT sat sun MSG 1 --1 OMIT Sat Sun
- X./test.rem(70): Trig = Thursday, 28 February, 1991
- X
- XOMIT 28 Feb
- XREM 1 -1 OMIT sat sun MSG 1 -1 OMIT Sat Sun (28 Feb omitted)
- X./test.rem(73): Trig = Wednesday, 27 February, 1991
- XREM 1 --1 OMIT sat sun MSG 1 --1 OMIT Sat Sun (28 Feb omitted)
- X./test.rem(74): Trig = Thursday, 28 February, 1991
- X
- XCLEAR-OMIT-CONTEXT
- X
- X# Try out UNTIL
- XREM Wed UNTIL 21 Feb 1991 MSG Wed UNTIL 21 Feb 1991
- X./test.rem(79): Trig = Wednesday, 20 February, 1991
- X
- X# Try playing with the OMIT context
- X
- XOMIT 28 Feb 1991
- XREM 1 Mar -1 MSG 1 mar -1 (28feb91 omitted)
- X./test.rem(84): Trig = Wednesday, 27 February, 1991
- XREM 1 Mar --1 MSG 1 mar --1 (28Feb91 omitted)
- X./test.rem(85): Trig = Thursday, 28 February, 1991
- XREM 28 Feb BEFORE MSG 28 Feb BEFORE (28Feb91 omitted)
- X./test.rem(86): Trig = Wednesday, 27 February, 1991
- XREM 28 Feb SKIP MSG 28 Feb SKIP (28Feb91 omitted)
- X./test.rem(87): Trig = Friday, 28 February, 1992
- XREM 28 Feb AFTER MSG 28 Feb AFTER (28Feb91 omitted)
- X./test.rem(88): Trig = Friday, 1 March, 1991
- X
- XPUSH-OMIT-CONTEXT
- XCLEAR-OMIT-CONTEXT
- XREM 1 Mar -1 MSG 1 mar -1
- X./test.rem(92): Trig = Thursday, 28 February, 1991
- XREM 1 Mar --1 MSG 1 mar --1
- X./test.rem(93): Trig = Thursday, 28 February, 1991
- XREM 28 Feb BEFORE MSG 28 Feb BEFORE
- X./test.rem(94): Trig = Thursday, 28 February, 1991
- XREM 28 Feb SKIP MSG 28 Feb SKIP
- X./test.rem(95): Trig = Thursday, 28 February, 1991
- XREM 28 Feb AFTER MSG 28 Feb AFTER
- X./test.rem(96): Trig = Thursday, 28 February, 1991
- X
- XPOP-OMIT-CONTEXT
- XREM 1 Mar -1 MSG 1 mar -1 (28feb91 omitted)
- X./test.rem(99): Trig = Wednesday, 27 February, 1991
- XREM 1 Mar --1 MSG 1 mar --1 (28Feb91 omitted)
- X./test.rem(100): Trig = Thursday, 28 February, 1991
- XREM 28 Feb BEFORE MSG 28 Feb BEFORE (28Feb91 omitted)
- X./test.rem(101): Trig = Wednesday, 27 February, 1991
- XREM 28 Feb SKIP MSG 28 Feb SKIP (28Feb91 omitted)
- X./test.rem(102): Trig = Friday, 28 February, 1992
- XREM 28 Feb AFTER MSG 28 Feb AFTER (28Feb91 omitted)
- X./test.rem(103): Trig = Friday, 1 March, 1991
- X
- X
- XREM 13 March 1991 *1 UNTIL 19 March 1991 MSG 13-19 Mar 91
- X./test.rem(106): Trig = Wednesday, 13 March, 1991
- X
- X# Test BACK
- XCLEAR-OMIT-CONTEXT
- XREM 18 Feb 1991 +1 MSG 18 Feb 1991 +1
- X./test.rem(110): Trig = Monday, 18 February, 1991
- X
- XOMIT 17 Feb 1991
- XREM 18 Feb 1991 +1 MSG 18 Feb 1991 +1 (17Feb91 omitted)
- X./test.rem(113): Trig = Monday, 18 February, 1991
- X18 Feb 1991 +1 (17Feb91 omitted)
- X
- XREM 18 Feb 1991 ++1 MSG 18 Feb 1991 ++1 (17Feb91 omitted)
- X./test.rem(114): Trig = Monday, 18 February, 1991
- X
- XCLEAR-OMIT-CONTEXT
- Xset a000 abs(1)
- Xabs(1) => 1
- Xset a001 abs(-1)
- X- 1 => -1
- Xabs(-1) => 1
- Xset a002 asc("foo")
- Xasc("foo") => 102
- Xset a003 baseyr()
- Xbaseyr() => 1990
- Xset a004 char(66,55,66,77,66)
- Xchar(66, 55, 66, 77, 66) => "B7BMB"
- Xset a005 choose(3, "foo", "bar", "baz", "blech")
- Xchoose(3, "foo", "bar", "baz", "blech") => "baz"
- Xset a006 coerce("string", 1)
- Xcoerce("string", 1) => "1"
- Xset a007 coerce("string", today())
- Xtoday() => 1991/02/16
- Xcoerce("string", 1991/02/16) => "1991/02/16"
- Xset a008 coerce("string", 11:44)
- Xcoerce("string", 11:44) => "11:44"
- Xset a009 coerce("int", "badnews")
- Xcoerce("int", "badnews") => Can't coerce
- X./test.rem(126): Can't coerce
- Xset a010 coerce("int", "12")
- Xcoerce("int", "12") => 12
- Xset a011 coerce("int", 11:44)
- Xcoerce("int", 11:44) => 704
- Xset a012 coerce("int", today())
- Xtoday() => 1991/02/16
- Xcoerce("int", 1991/02/16) => 411
- Xset a013 date(1992, 2, 2)
- Xdate(1992, 2, 2) => 1992/02/02
- Xset a014 date(1993, 2, 29)
- Xdate(1993, 2, 29) => Bad date specification
- X./test.rem(131): Bad date specification
- Xset a015 day(today())
- Xtoday() => 1991/02/16
- Xday(1991/02/16) => 16
- Xset a016 daysinmon(2, 1991)
- Xdaysinmon(2, 1991) => 28
- Xset a017 daysinmon(2, 1992)
- Xdaysinmon(2, 1992) => 29
- Xset a018 defined("a017")
- Xdefined("a017") => 1
- Xset a019 defined("a019")
- Xdefined("a019") => 0
- Xset a020 filename()
- Xfilename() => "./test.rem"
- Xset a021 getenv("TEST_GETENV")
- Xgetenv("TEST_GETENV") => "foo bar baz"
- Xset a022 hour(11:22)
- Xhour(11:22) => 11
- Xset a023 iif(1, 1, 0)
- Xiif(1, 1, 0) => 1
- Xset a024 iif(0, 1, 0)
- Xiif(0, 1, 0) => 0
- Xset a025 index("barfoobar", "foo")
- Xindex("barfoobar", "foo") => 4
- Xset a026 index("barfoobar", "bar", 2)
- Xindex("barfoobar", "bar", 2) => 7
- Xset a027 isleap(today())
- Xtoday() => 1991/02/16
- Xisleap(1991/02/16) => 0
- Xset a028 isleap(1992)
- Xisleap(1992) => 1
- Xomit [trigger(today())]
- Xtoday() => 1991/02/16
- Xtrigger(1991/02/16) => "16 February 1991"
- Xset a030 isomitted(today())
- Xtoday() => 1991/02/16
- Xisomitted(1991/02/16) => 1
- Xclear
- Xset a029 isomitted(today())
- Xtoday() => 1991/02/16
- Xisomitted(1991/02/16) => 0
- Xset a031 lower("FOOBARBAZ")
- Xlower("FOOBARBAZ") => "foobarbaz"
- Xset a032 max(1, 2, 34, 1, 3)
- Xmax(1, 2, 34, 1, 3) => 34
- Xset a033 max("foo", "bar", "baz")
- Xmax("foo", "bar", "baz") => "foo"
- Xset a034 max(today(), today()+1, today()-1)
- Xtoday() => 1991/02/16
- Xtoday() => 1991/02/16
- X1991/02/16 + 1 => 1991/02/17
- Xtoday() => 1991/02/16
- X1991/02/16 - 1 => 1991/02/15
- Xmax(1991/02/16, 1991/02/17, 1991/02/15) => 1991/02/17
- Xset a035 min(1, 2, 34, 1, 3)
- Xmin(1, 2, 34, 1, 3) => 1
- Xset a036 min("foo", "bar", "baz")
- Xmin("foo", "bar", "baz") => "bar"
- Xset a037 min(today(), today()+1, today()-1)
- Xtoday() => 1991/02/16
- Xtoday() => 1991/02/16
- X1991/02/16 + 1 => 1991/02/17
- Xtoday() => 1991/02/16
- X1991/02/16 - 1 => 1991/02/15
- Xmin(1991/02/16, 1991/02/17, 1991/02/15) => 1991/02/15
- Xset a038 minute(11:33)
- Xminute(11:33) => 33
- Xset a039 mon(today())
- Xtoday() => 1991/02/16
- Xmon(1991/02/16) => "February"
- Xset a040 monnum(today())
- Xtoday() => 1991/02/16
- Xmonnum(1991/02/16) => 2
- Xset a041 ord(3)
- Xord(3) => "3rd"
- Xset a042 ord(4)
- Xord(4) => "4th"
- Xset a043 ostype()
- Xostype() => "UNIX"
- Xset a044 plural(2)
- Xplural(2) => "s"
- Xset a045 plural(2, "ies")
- Xplural(2, "ies") => "iess"
- Xset a046 plural(2, "y", "ies")
- Xplural(2, "y", "ies") => "ies"
- Xset a047 sgn(-2)
- X- 2 => -2
- Xsgn(-2) => -1
- Xset a048 shell("echo foo")
- Xshell("echo foo") => "foo"
- Xset a049 strlen("sadjflkhsldkfhsdlfjhk")
- Xstrlen("sadjflkhsldkfhsdlfjhk") => 21
- Xset a050 substr(a049, 2)
- Xa049 => 21
- Xsubstr(21, 2) => Type mismatch
- X./test.rem(169): Type mismatch
- Xset a051 substr(a050, 2, 6)
- Xa050 => ./test.rem(170): Undefined variable: a050
- Xset a052 time(1+2, 3+4)
- X1 + 2 => 3
- X3 + 4 => 7
- Xtime(3, 7) => 03:07
- Xrem 10 jan 1992 AT 11:22 CAL
- X./test.rem(172): Trig = Friday, 10 January, 1992
- Xset a053 trigdate()
- Xtrigdate() => 1992/01/10
- Xset a054 trigtime()
- Xtrigtime() => 11:22
- Xset a055 trigvalid()
- Xtrigvalid() => 1
- Xset a056 upper("sdfjhsdf ksjdfh kjsdfh ksjdfh")
- Xupper("sdfjhsdf ksjdfh kjsdfh ksjdfh") => "SDFJHSDF KSJDFH KJSDFH KSJDFH"
- Xset a057 value("a05"+"6")
- X"a05" + "6" => "a056"
- Xvalue("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH"
- Xset a058 version()
- Xversion() => "03.00.00"
- Xset a059 wkday(today())
- Xtoday() => 1991/02/16
- Xwkday(1991/02/16) => "Saturday"
- Xset a060 wkdaynum(today())
- Xtoday() => 1991/02/16
- Xwkdaynum(1991/02/16) => 6
- Xset a061 year(today())
- Xtoday() => 1991/02/16
- Xyear(1991/02/16) => 1991
- Xset a062 1+2*(3+4-(5*7/2))
- X3 + 4 => 7
- X5 * 7 => 35
- X35 / 2 => 17
- X7 - 17 => -10
- X2 * -10 => -20
- X1 + -20 => -19
- Xset a063 1>=2
- X1 >= 2 => 0
- Xset a064 1<2 || 3 > 4
- X1 < 2 => 1
- X3 > 4 => 0
- X1 || 0 => 1
- Xset a065 1 && 1
- X1 && 1 => 1
- Xset a066 !a065
- Xa065 => 1
- X! 1 => 0
- Xset a067 typeof(2)
- Xtypeof(2) => "INT"
- Xset a068 typeof("foo")
- Xtypeof("foo") => "STRING"
- Xset a069 typeof(11:33)
- Xtypeof(11:33) => "TIME"
- Xset a070 typeof(today())
- Xtoday() => 1991/02/16
- Xtypeof(1991/02/16) => "DATE"
- Xfset g(x,y) max(x,y)
- Xfset h(x,y) min(g(x+y, x*y), g(x-y, x/y))
- Xset a071 g(1, 2)
- XUserFN g(1, 2)
- Xx => 1
- Xy => 2
- Xmax(1, 2) => 2
- XLeaving UserFN g() => 2
- Xset a072 h(2, 3)
- XUserFN h(2, 3)
- Xx => 2
- Xy => 3
- X2 + 3 => 5
- Xx => 2
- Xy => 3
- X2 * 3 => 6
- XUserFN g(5, 6)
- Xx => 5
- Xy => 6
- Xmax(5, 6) => 6
- XLeaving UserFN g() => 6
- Xx => 2
- Xy => 3
- X2 - 3 => -1
- Xx => 2
- Xy => 3
- X2 / 3 => 0
- XUserFN g(-1, 0)
- Xx => -1
- Xy => 0
- Xmax(-1, 0) => 0
- XLeaving UserFN g() => 0
- Xmin(6, 0) => 0
- XLeaving UserFN h() => 0
- Xset a073 h("foo", 11:33)
- XUserFN h("foo", 11:33)
- Xx => "foo"
- Xy => 11:33
- X"foo" + 11:33 => "foo11:33"
- Xx => "foo"
- Xy => 11:33
- X"foo" * 11:33 => Type mismatch
- X./test.rem(195): Operator '*' Type mismatch
- XLeaving UserFN h() => Type mismatch
- X
- X Variable Value
- X
- X a017 29
- X a036 "bar"
- X a055 1
- X a008 "11:44"
- X a027 0
- X a046 "ies"
- X a065 1
- X a018 1
- X a037 1991/02/15
- X a056 "SDFJHSDF KSJDFH KJSDFH KSJDFH"
- X a028 1
- X a047 -1
- X a066 0
- X a019 0
- X a038 33
- X a057 "SDFJHSDF KSJDFH KJSDFH KSJDFH"
- X a029 0
- X a048 "foo"
- X a067 "INT"
- X a039 "February"
- X a058 "03.00.00"
- X a049 21
- X a068 "STRING"
- X a059 "Saturday"
- X a069 "TIME"
- X a000 1
- X a010 12
- X a001 1
- X a020 "./test.rem"
- X a011 704
- X a030 1
- X a002 102
- X a021 "foo bar baz"
- X a040 2
- X a012 411
- X a031 "foobarbaz"
- X a003 1990
- X a022 11
- X a041 "3rd"
- X a060 6
- X a013 1992/02/02
- X a032 34
- X a070 "DATE"
- X a004 "B7BMB"
- X a023 1
- X a042 "4th"
- X a061 1991
- X a033 "foo"
- X a052 03:07
- X a071 2
- X a005 "baz"
- X a024 0
- X a043 "UNIX"
- X a062 -19
- X a015 16
- X a034 1991/02/17
- X a053 1992/01/10
- X a072 0
- X a006 "1"
- X a025 4
- X a044 "s"
- X a063 0
- X a016 28
- X a035 1
- X a054 11:22
- X a007 "1991/02/16"
- X a026 7
- X a045 "iess"
- X a064 1
- SHAR_EOF
- $TOUCH -am 1109141292 test.cmp &&
- chmod 0600 test.cmp ||
- echo "restore of test.cmp failed"
- set `wc -c test.cmp`;Wc_c=$1
- if test "$Wc_c" != "12909"; then
- echo original size 12909, current size $Wc_c
- fi
- fi
- # ============= makefile.tc ==============
- if test X"$1" != X"-c" -a -f 'makefile.tc'; then
- echo "File already exists: skipping 'makefile.tc'"
- else
- echo "x - extracting makefile.tc (Text)"
- sed 's/^X//' << 'SHAR_EOF' > makefile.tc &&
- X# Makefile for REMIND for Turbo C for MSDOS
- X
- XVERSION= 03.00.00
- X
- XHDRS= config.h err.h expr.h globals.h protos.h types.h version.h
- X
- XSTDHDRS= config.h types.h protos.h globals.h err.h
- X
- XSRCS= calendar.c dorem.c dosubst.c expr.c files.c funcs.c globals.c init.c \
- Xmain.c omit.c token.c trigger.c userfns.c utils.c var.c
- X
- XOBJS=calendar.obj dorem.obj dosubst.obj expr.obj files.obj funcs.obj \
- Xglobals.obj init.obj main.obj omit.obj token.obj trigger.obj \
- Xutils.obj userfns.obj var.obj
- X
- XMANIFEST= readme.uni readme.dos copyrigh $(HDRS) $(SRCS) makefile rem rem.1 \
- Xremind.1 remind-a.csh remind-a.sh test.rem test-rem test.cmp makefile.tc \
- Xmakefile.msc lnk.msc lnk.tc manifest.dos manifest.unx whatsnew.30 kall kall.1
- X
- Xremind.exe: $(OBJS)
- X tcc @lnk.tc
- X
- X.c.obj:
- X tcc -A -w-pia -c -O -ms {$< }
- X
- Xcalendar.obj: calendar.c $(STDHDRS) expr.h
- X
- Xdorem.obj: dorem.c $(STDHDRS) expr.h
- X
- Xdosubst.obj: dosubst.c $(STDHDRS)
- X
- Xexpr.obj: expr.c $(STDHDRS) expr.h
- X
- Xfiles.obj: files.c $(STDHDRS)
- X
- Xfuncs.obj: funcs.c $(STDHDRS) expr.h version.h
- X
- Xglobals.obj: globals.c config.h types.h globals.h err.h
- X
- Xinit.obj: init.c $(STDHDRS) expr.h version.h
- X
- Xmain.obj: main.c $(STDHDRS) expr.h
- X
- Xomit.obj: omit.c $(STDHDRS)
- X
- Xtoken.obj: token.c $(STDHDRS)
- X
- Xtrigger.obj: trigger.c $(STDHDRS) expr.h
- X
- Xuserfns.obj: userfns.c $(STDHDRS) expr.h
- X
- Xutils.obj: utils.c $(STDHDRS)
- X
- Xvar.obj: var.c $(STDHDRS) expr.h
- X
- Xremind.zoo: $(MANIFEST)
- X zoo aI remind.zoo < manifest.dos
- X
- SHAR_EOF
- $TOUCH -am 1109141292 makefile.tc &&
- chmod 0600 makefile.tc ||
- echo "restore of makefile.tc failed"
- set `wc -c makefile.tc`;Wc_c=$1
- if test "$Wc_c" != "1426"; then
- echo original size 1426, current size $Wc_c
- fi
- fi
- # ============= makefile.msc ==============
- if test X"$1" != X"-c" -a -f 'makefile.msc'; then
- echo "File already exists: skipping 'makefile.msc'"
- else
- echo "x - extracting makefile.msc (Text)"
- sed 's/^X//' << 'SHAR_EOF' > makefile.msc &&
- X# Makefile for REMIND for Microsoft C for MSDOS
- X
- XOBJS= calendar.obj dorem.obj dosubst.obj expr.obj files.obj funcs.obj \
- Xglobals.obj init.obj main.obj omit.obj token.obj trigger.obj userfns.obj \
- Xutils.obj var.obj
- X
- XDEFINES= /D__MSDOS__ /D__MSC__
- X
- XMODEL= /AS
- X
- Xcalendar.obj: calendar.c
- X cl /c $(DEFINES) $(MODEL) /Focalendar.obj calendar.c
- X
- Xdorem.obj: dorem.c
- X cl /c $(DEFINES) $(MODEL) /Fodorem.obj dorem.c
- X
- Xdosubst.obj: dosubst.c
- X cl /c $(DEFINES) $(MODEL) /Fodosubst.obj dosubst.c
- X
- Xexpr.obj: expr.c
- X cl /c $(DEFINES) $(MODEL) /Foexpr.obj expr.c
- X
- Xfiles.obj: files.c
- X cl /c $(DEFINES) $(MODEL) /Fofiles.obj files.c
- X
- Xfuncs.obj: funcs.c
- X cl /c $(DEFINES) $(MODEL) /Fofuncs.obj funcs.c
- X
- Xglobals.obj: globals.c
- X cl /c $(DEFINES) $(MODEL) /Foglobals.obj globals.c
- X
- Xinit.obj: init.c
- X cl /c $(DEFINES) $(MODEL) /Foinit.obj init.c
- X
- Xmain.obj: main.c
- X cl /c $(DEFINES) $(MODEL) /Fomain.obj main.c
- X
- Xomit.obj: omit.c
- X cl /c $(DEFINES) $(MODEL) /Foomit.obj omit.c
- X
- Xtoken.obj: token.c
- X cl /c $(DEFINES) $(MODEL) /Fotoken.obj token.c
- X
- Xtrigger.obj: trigger.c
- X cl /c $(DEFINES) $(MODEL) /Fotrigger.obj trigger.c
- X
- Xuserfns.obj: userfns.c
- X cl /c $(DEFINES) $(MODEL) /Fouserfns.obj userfns.c
- X
- Xutils.obj: utils.c
- X cl /c $(DEFINES) $(MODEL) /Foutils.obj utils.c
- X
- Xvar.obj: var.c
- X cl /c $(DEFINES) $(MODEL) /Fovar.obj var.c
- X
- Xremind.exe: $(OBJS)
- X link /NOI @lnk.msc
- SHAR_EOF
- $TOUCH -am 1109141292 makefile.msc &&
- chmod 0600 makefile.msc ||
- echo "restore of makefile.msc failed"
- set `wc -c makefile.msc`;Wc_c=$1
- if test "$Wc_c" != "1339"; then
- echo original size 1339, current size $Wc_c
- fi
- fi
- # ============= lnk.msc ==============
- if test X"$1" != X"-c" -a -f 'lnk.msc'; then
- echo "File already exists: skipping 'lnk.msc'"
- else
- echo "x - extracting lnk.msc (Text)"
- sed 's/^X//' << 'SHAR_EOF' > lnk.msc &&
- Xcalendar.obj +
- Xdorem.obj +
- Xdosubst.obj +
- Xexpr.obj +
- Xfiles.obj +
- Xfuncs.obj +
- Xglobals.obj +
- Xinit.obj +
- Xmain.obj +
- Xomit.obj +
- Xtoken.obj +
- Xtrigger.obj +
- Xuserfns.obj +
- Xutils.obj +
- Xvar.obj
- Xremind.exe
- Xnul
- X
- X
- X
- SHAR_EOF
- $TOUCH -am 1109141292 lnk.msc &&
- chmod 0600 lnk.msc ||
- echo "restore of lnk.msc failed"
- set `wc -c lnk.msc`;Wc_c=$1
- if test "$Wc_c" != "201"; then
- echo original size 201, current size $Wc_c
- fi
- fi
- # ============= lnk.tc ==============
- if test X"$1" != X"-c" -a -f 'lnk.tc'; then
- echo "File already exists: skipping 'lnk.tc'"
- else
- echo "x - extracting lnk.tc (Text)"
- sed 's/^X//' << 'SHAR_EOF' > lnk.tc &&
- X-eremind.exe
- Xcalendar.obj
- Xdorem.obj
- Xdosubst.obj
- Xexpr.obj
- Xfiles.obj
- Xfuncs.obj
- Xglobals.obj
- Xinit.obj
- Xmain.obj
- Xomit.obj
- Xtoken.obj
- Xtrigger.obj
- Xuserfns.obj
- Xutils.obj
- Xvar.obj
- SHAR_EOF
- $TOUCH -am 1109141292 lnk.tc &&
- chmod 0600 lnk.tc ||
- echo "restore of lnk.tc failed"
- set `wc -c lnk.tc`;Wc_c=$1
- if test "$Wc_c" != "168"; then
- echo original size 168, current size $Wc_c
- fi
- fi
- # ============= MANIFEST.UNX ==============
- if test X"$1" != X"-c" -a -f 'MANIFEST.UNX'; then
- echo "File already exists: skipping 'MANIFEST.UNX'"
- else
- echo "x - extracting MANIFEST.UNX (Text)"
- sed 's/^X//' << 'SHAR_EOF' > MANIFEST.UNX &&
- Xcalendar.c
- Xconfig.h
- XCOPYRIGHT
- Xdorem.c
- Xdosubst.c
- Xerr.h
- Xexpr.c
- Xexpr.h
- Xfiles.c
- Xfuncs.c
- Xglobals.c
- Xglobals.h
- Xinit.c
- Xkall
- Xkall.1
- Xlnk.msc
- Xlnk.tc
- Xmain.c
- XMakefile
- Xmakefile.msc
- Xmakefile.tc
- XMANIFEST.DOS
- XMANIFEST.UNX
- Xomit.c
- Xprotos.h
- Xqueue.c
- XREADME.DOS
- XREADME.UNIX
- Xrem
- Xrem.1
- Xremind-all.csh
- Xremind-all.sh
- Xremind.1
- Xtest-rem
- Xtest.cmp
- Xtest.rem
- Xtoken.c
- Xtrigger.c
- Xtypes.h
- Xuserfns.c
- Xutils.c
- Xvar.c
- Xversion.h
- XWHATSNEW.30
- SHAR_EOF
- $TOUCH -am 1109141292 MANIFEST.UNX &&
- chmod 0600 MANIFEST.UNX ||
- echo "restore of MANIFEST.UNX failed"
- set `wc -c MANIFEST.UNX`;Wc_c=$1
- if test "$Wc_c" != "399"; then
- echo original size 399, current size $Wc_c
- fi
- fi
- # ============= MANIFEST.DOS ==============
- if test X"$1" != X"-c" -a -f 'MANIFEST.DOS'; then
- echo "File already exists: skipping 'MANIFEST.DOS'"
- else
- echo "x - extracting MANIFEST.DOS (Text)"
- sed 's/^X//' << 'SHAR_EOF' > MANIFEST.DOS &&
- Xcalendar.c
- Xconfig.h
- Xcopyrigh
- Xdorem.c
- Xdosubst.c
- Xerr.h
- Xexpr.c
- Xexpr.h
- Xfiles.c
- Xfuncs.c
- Xglobals.c
- Xglobals.h
- Xinit.c
- Xkall
- Xkall.1
- Xlnk.msc
- Xlnk.tc
- Xmain.c
- Xmakefile
- Xmakefile.msc
- Xmakefile.tc
- Xmanifest.dos
- Xmanifest.unx
- Xomit.c
- Xprotos.h
- Xqueue.c
- Xreadme.dos
- Xreadme.uni
- Xrem
- Xrem.1
- Xremind-a.csh
- Xremind-a.sh
- Xremind.1
- Xtest-rem
- Xtest.cmp
- Xtest.rem
- Xtoken.c
- Xtrigger.c
- Xtypes.h
- Xuserfns.c
- Xutils.c
- Xvar.c
- Xversion.h
- Xwhatsnew.30
- SHAR_EOF
- $TOUCH -am 1109141292 MANIFEST.DOS &&
- chmod 0600 MANIFEST.DOS ||
- echo "restore of MANIFEST.DOS failed"
- set `wc -c MANIFEST.DOS`;Wc_c=$1
- if test "$Wc_c" != "393"; then
- echo original size 393, current size $Wc_c
- fi
- fi
- # ============= WHATSNEW.30 ==============
- if test X"$1" != X"-c" -a -f 'WHATSNEW.30'; then
- echo "File already exists: skipping 'WHATSNEW.30'"
- else
- echo "x - extracting WHATSNEW.30 (Text)"
- sed 's/^X//' << 'SHAR_EOF' > WHATSNEW.30 &&
- XCHANGES TO REMIND
- X
- X* Version 3.0
- X
- X- Total rewrite from previous versions
- X
- X- Added variables, expressions, flow-control statements, daemon mode
- X
- X- Added "expression pasting"
- X
- X- Added CAL-type reminders
- X
- X- Added the SATISFY clause
- X
- X- Improved debugging of reminder scripts
- X
- X- Took out the "purge" option - it is in general too dificult to tell when
- X a reminder has expired for good, so now it's up to you to do this
- X by hand.
- X
- X- Fixed a lurking bug in trigger date calculation which, amazingly, had not
- X been caught in the couple of years that Remind has been out!
- X
- X* Version 2.4 Patch 5 - Added the "c+n" option for printing a calendar by
- Xweeks instead of months, courtesy Dennis Cottel (dennis@peanuts.nosc.mil).
- X
- X* Version 2.3 Patch 4 - Made the init.c file nicer. Made the Makefile
- Xprettier. Added "make test", "make tar" and "make shar" Makefile targets.
- X
- X* Version 2.3 Patch 3 - Added a command-line option for Remind to process
- Xqueued reminders in the foreground. This makes automatic termination
- Xof Remind processes from within X-Windows and Sunview easier.
- X
- X* Version 2.3 Patch 2 - Fixed up a problem with timed reminders which resulted
- Xin cursor not starting from left side of screen on some systems.
- X
- XFixed the SIGINT handler for SYSV systems - this was interrupting the
- Xsleep(2) system call.
- X
- XClosed stdin and stdout if remind was part of a pipe - this prevents other
- Xsections of the pipe from hanging as remind puts itself in the background.
- X
- XAdded the "-h" (Hush mode) option
- X
- XAdded the "%#" and "%@" modifiers for the current time.
- X
- XMade the Makefile more portable
- X
- X* Version 2.3 Patch 1 - Added the "-t" command-line option to get Remind
- Xto trigger all non-expired reminders.
- X
- XAdded Turbo C support courtesy of Rhys Weatherly
- X
- XAdded the "RUN ON" and "RUN OFF" commands for a secure interface with
- Xthe Elm mail system.
- X
- XAdded the "rem" shell script for running Remind with a default script.
- X
- XAdded manual pages for "kall" and "rem".
- X
- X* Version 2.3 - Added the UNTIL keyword for forcing reminders to expire.
- X
- XAdded the "++" form of 'back' and the "--" form of 'delta' for
- Xignoring OMIT information.
- X
- XAdded the CLEAR-OMIT-CONTEXT, PUSH-OMIT-CONTEXT and POP-OMIT-CONTEXT
- Xkeywords for isolating personal or peculiar reminders from the global
- XOMIT context.
- X
- XSpeeded up the parsing of tokens.
- X
- XChanged the source to recognize and exploit ANSI-C compilers which
- Xaccept function prototypes.
- X
- XAdded the "-n" option to output the next occurrence of each reminder
- Xin SimpleCalendar format
- X
- XModified the calendar and SimpleCalendar formats so that the % escape
- Xsubstitutions ARE performed.
- X
- X* Version 2.2 - Patch 5 - Added the BEFORE, AFTER and SKIP tokens to make the
- Xhandling of holidays more sensible. Also corrected a few more bugs.
- X
- X* Version 2.2 - Patch 3 - Added the MSG or RUN tokens in an OMIT command; also
- Xallowed RUN-type reminders to be explicitly included in the calendar by
- Xusing the %" escape sequence.
- X
- X* Version 2.2 - Added the AT keyword, the timed reminders daemon, and the
- Xcalendar facility.
- X
- X* Version 2.1 - Added the "repeat" token for repeating reminders with a period
- Xother than 7 days. Also fixed some bugs from version 2.0
- X
- X* Version 2.0 - first public release. Included advanced date specifications,
- Xcharacter substitution, and the RUN keyword.
- X
- X* Version 1.0 - never publicly released.
- X
- X
- X
- SHAR_EOF
- $TOUCH -am 1109141292 WHATSNEW.30 &&
- chmod 0600 WHATSNEW.30 ||
- echo "restore of WHATSNEW.30 failed"
- set `wc -c WHATSNEW.30`;Wc_c=$1
- if test "$Wc_c" != "3329"; then
- echo original size 3329, current size $Wc_c
- fi
- fi
- # ============= kall ==============
- if test X"$1" != X"-c" -a -f 'kall'; then
- echo "File already exists: skipping 'kall'"
- else
- echo "x - extracting kall (Text)"
- sed 's/^X//' << 'SHAR_EOF' > kall &&
- X#!/bin/sh
- X#
- X# kall - kill all processes belonging to this user that match
- X# specified string.
- X
- Xsignal=`echo $1 | grep '^\-.*'`
- Xme=`basename $0`
- X
- Xif [ "$signal" != "" ]; then
- X shift
- Xelse
- X signal="-TERM"
- Xfi
- X
- Xif [ "$1" = "" ]; then
- X echo "usage: $me [-signal] string [string...]"
- X echo " kills all of your processes where command name matches"
- X echo " any of the given strings."
- X exit
- Xfi
- X
- Xmsg="0"
- X
- Xwhile [ "$1" != "" ]; do
- X
- X# NOTE: You may have to modify the next line, since PS is non-portable.
- X# The 'awk' command picks out the process IDs to pass them on to kill.
- X rprocs=`ps cx | awk '{if(prog == $NF) print $1}' prog=$1 -`
- X if [ "$rprocs" != "" ]; then
- X msg="1"
- X echo -n "${me}: Sending $signal signal to $1 process(es)"
- X echo '...'
- X kill $signal $rprocs
- X fi
- X shift
- Xdone
- X
- Xif [ $msg = "1" ]; then
- X echo "${me}: Done."
- Xfi
- SHAR_EOF
- $TOUCH -am 1109141292 kall &&
- chmod 0700 kall ||
- echo "restore of kall failed"
- set `wc -c kall`;Wc_c=$1
- if test "$Wc_c" != "852"; then
- echo original size 852, current size $Wc_c
- fi
- fi
- # ============= kall.1 ==============
- if test X"$1" != X"-c" -a -f 'kall.1'; then
- echo "File already exists: skipping 'kall.1'"
- else
- echo "x - extracting kall.1 (Text)"
- sed 's/^X//' << 'SHAR_EOF' > kall.1 &&
- X.TH KALL 1 "26 February 1991"
- X.UC 4
- X.SH NAME
- Xkall \- kill processes by command name
- X.SH SYNOPSIS
- X.B kall
- X[\-\fIsignal\fR] prog1 [prog2...]
- X.SH DESCRIPTION
- X.B Kall
- Xsends the specified \fIsignal\fR (defaults to \fB-TERM\fR) to all processes
- Xwhose command name is specified on the command line. For example:
- X.PP
- X.nf
- X kall -HUP remind foobar
- X.fi
- X.PP
- Xsends a \fBHUP\fR signal to all \fIremind\fR and \fIfoobar\fR programs.
- XNote that \fBkall\fR sends signals only to those processes owned by the
- Xuser invoking \fBkall\fR.
- X.SH AUTHOR
- XDavid F. Skoll
- X.SH BUGS
- X.B Kall
- Xis a sh(1) script and depends on the behaviour of ps(1); thus, it is
- Xnot especially portable.
- X.SH SEE ALSO
- Xremind, rem
- SHAR_EOF
- $TOUCH -am 1109141292 kall.1 &&
- chmod 0600 kall.1 ||
- echo "restore of kall.1 failed"
- set `wc -c kall.1`;Wc_c=$1
- if test "$Wc_c" != "679"; then
- echo original size 679, current size $Wc_c
- fi
- fi
- exit 0
-
- exit 0 # Just in case...
-