Compare commits
66 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
53316e8b06 | ||
|
|
6127e390a1 | ||
|
|
4caa77f6b1 | ||
|
|
70419e8757 | ||
|
|
21d8bd1406 | ||
|
|
25abee3259 | ||
|
|
2d490c2b7a | ||
|
|
902b7895b7 | ||
|
|
1c80bb649f | ||
|
|
4508215617 | ||
|
|
739b68347a | ||
|
|
d834760cda | ||
|
|
1bc78650bf | ||
|
|
ec4e203099 | ||
|
|
d23528da82 | ||
|
|
7401a0ba23 | ||
|
|
b14b4f08b1 | ||
|
|
70ece81340 | ||
|
|
19ac350527 | ||
|
|
a9b08d7db8 | ||
|
|
df8fa05632 | ||
|
|
6556137aad | ||
|
|
aa1ab2bbb4 | ||
|
|
be38d86521 | ||
|
|
3931afb6b1 | ||
|
|
7d2df86b75 | ||
|
|
5a3bd5839b | ||
|
|
b91ce9a3f7 | ||
|
|
ac889dd329 | ||
|
|
420df9b6ed | ||
|
|
f862b6811d | ||
|
|
c072698927 | ||
|
|
d22895831b | ||
|
|
3c41f4ade4 | ||
|
|
335d5fb984 | ||
|
|
66bd2b8fac | ||
|
|
fed3cad3b8 | ||
|
|
b20578f24f | ||
|
|
7a86e7f777 | ||
|
|
16c93fcad6 | ||
|
|
edd66d8d89 | ||
|
|
3ba39b6efe | ||
|
|
c656a1a169 | ||
|
|
19f03e419a | ||
|
|
5a281d5999 | ||
|
|
d80d14f585 | ||
|
|
520b8511bd | ||
|
|
91627d4f22 | ||
|
|
a21147c7a5 | ||
|
|
d22c1dee49 | ||
|
|
95b0fc7480 | ||
|
|
b40d5d7984 | ||
|
|
2df93c9df3 | ||
|
|
51cdea4b17 | ||
|
|
f229e64744 | ||
|
|
0f15955a41 | ||
|
|
390e6c2eed | ||
|
|
877eaccd6d | ||
|
|
6424e655a1 | ||
|
|
176037082b | ||
|
|
a361c7e426 | ||
|
|
caba0c1695 | ||
|
|
71b3f9fefc | ||
|
|
91f8507e51 | ||
|
|
b68e81a126 | ||
|
|
72658025f1 |
13
.gitignore
vendored
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
*.bak
|
||||||
|
autom4te.cache
|
||||||
|
config.log
|
||||||
|
config.status
|
||||||
|
src/Makefile
|
||||||
|
*.o
|
||||||
|
src/config.h
|
||||||
|
src/remind
|
||||||
|
src/*.tar.gz*
|
||||||
|
tests/test.out
|
||||||
|
.gitignore
|
||||||
|
*~
|
||||||
|
src/rem2ps
|
||||||
5
Makefile
@@ -24,9 +24,14 @@ clean:
|
|||||||
find . -name '*~' -exec rm {} \;
|
find . -name '*~' -exec rm {} \;
|
||||||
cd src; $(MAKE) clean
|
cd src; $(MAKE) clean
|
||||||
|
|
||||||
|
test:
|
||||||
|
cd src && $(MAKE) test
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
rm -f config.cache config.log config.status src/Makefile src/config.h tests/test.out
|
rm -f config.cache config.log config.status src/Makefile src/config.h tests/test.out
|
||||||
|
|
||||||
src/Makefile: src/Makefile.in
|
src/Makefile: src/Makefile.in
|
||||||
./configure
|
./configure
|
||||||
|
|
||||||
# DO NOT DELETE
|
# DO NOT DELETE
|
||||||
|
|
||||||
|
|||||||
120
build.tk
@@ -41,6 +41,8 @@ proc SetConfigDefaults {} {
|
|||||||
set Config(NORTHERN_HEMISPHERE) 1
|
set Config(NORTHERN_HEMISPHERE) 1
|
||||||
set Config(WESTERN_HEMISPHERE) 1
|
set Config(WESTERN_HEMISPHERE) 1
|
||||||
set Config(LANGUAGE) "English"
|
set Config(LANGUAGE) "English"
|
||||||
|
set Config(INST_DIR) "/usr/local/bin"
|
||||||
|
set Config(MAN_DIR) "/usr/local/man"
|
||||||
}
|
}
|
||||||
|
|
||||||
#***********************************************************************
|
#***********************************************************************
|
||||||
@@ -97,7 +99,7 @@ proc CreateMainDialog {} {
|
|||||||
destroy .c
|
destroy .c
|
||||||
update idletasks
|
update idletasks
|
||||||
|
|
||||||
SetConfigDefaults
|
SetConfigFromRemind
|
||||||
tabnotebook_create .tn
|
tabnotebook_create .tn
|
||||||
|
|
||||||
set Instdir [tabnotebook_page .tn "Installation Directories"]
|
set Instdir [tabnotebook_page .tn "Installation Directories"]
|
||||||
@@ -128,13 +130,14 @@ proc CreateMainDialog {} {
|
|||||||
# Creates the "installation directories" dialog.
|
# Creates the "installation directories" dialog.
|
||||||
#***********************************************************************
|
#***********************************************************************
|
||||||
proc CreateInstallDirDialog { w } {
|
proc CreateInstallDirDialog { w } {
|
||||||
|
global Config
|
||||||
label $w.binlabel -text "Location for programs: "
|
label $w.binlabel -text "Location for programs: "
|
||||||
entry $w.bin -width 30
|
entry $w.bin -width 30
|
||||||
$w.bin insert end "/usr/local/bin"
|
$w.bin insert end $Config(INST_DIR)
|
||||||
|
|
||||||
label $w.manlabel -text "Location for man pages: "
|
label $w.manlabel -text "Location for man pages: "
|
||||||
entry $w.man -width 30
|
entry $w.man -width 30
|
||||||
$w.man insert end "/usr/local/man"
|
$w.man insert end $Config(MAN_DIR)
|
||||||
|
|
||||||
text $w.blurb -width 1 -height 5 -wrap word -relief flat -takefocus 0
|
text $w.blurb -width 1 -height 5 -wrap word -relief flat -takefocus 0
|
||||||
$w.blurb insert end "\n(Tabbed-notebook Tcl code taken from \"Effective Tcl/Tk Programming\" by Mark Harrison and Michael McLennan, Addison-Wesley Professional Computing Series.)"
|
$w.blurb insert end "\n(Tabbed-notebook Tcl code taken from \"Effective Tcl/Tk Programming\" by Mark Harrison and Michael McLennan, Addison-Wesley Professional Computing Series.)"
|
||||||
@@ -863,10 +866,121 @@ proc doLogo {} {
|
|||||||
|
|
||||||
.c create text 4 28 -anchor nw -text "http://www.roaringpenguin.com" \
|
.c create text 4 28 -anchor nw -text "http://www.roaringpenguin.com" \
|
||||||
-fill red -font {-family courier -size -14 -weight bold}
|
-fill red -font {-family courier -size -14 -weight bold}
|
||||||
|
|
||||||
|
set rem [FindRemind]
|
||||||
|
if {$rem != ""} {
|
||||||
|
.c create text 4 52 -anchor nw -text "Found existing Remind... reusing settings" -fill red -font {-family courier -size -14 -weight bold}
|
||||||
|
.c create text 4 66 -anchor nw -text "from $rem" -fill red -font {-family courier -size -14 -weight bold}
|
||||||
|
}
|
||||||
update idletasks
|
update idletasks
|
||||||
after 2500
|
after 2500
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#***********************************************************************
|
||||||
|
# %PROCEDURE: FindRemind
|
||||||
|
# %ARGUMENTS:
|
||||||
|
# None
|
||||||
|
# %RETURNS:
|
||||||
|
# Full path to an existing "remind" if one is found. Otherwise,
|
||||||
|
# empty string.
|
||||||
|
#***********************************************************************
|
||||||
|
proc FindRemind {} {
|
||||||
|
global env
|
||||||
|
set path [concat [split $env(PATH) ":"] "/bin" "/usr/bin" "/usr/local/bin"]
|
||||||
|
foreach thing $path {
|
||||||
|
if [file executable [file join $thing "remind"]] {
|
||||||
|
return [file join $thing "remind"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
|
||||||
|
#***********************************************************************
|
||||||
|
# %PROCEDURE: SetConfigFromRemind
|
||||||
|
# %ARGUMENTS:
|
||||||
|
# None
|
||||||
|
# %RETURNS:
|
||||||
|
# Sets config settings based on existing remind (if one found) or else
|
||||||
|
# sensible defaults.
|
||||||
|
#***********************************************************************
|
||||||
|
proc SetConfigFromRemind {} {
|
||||||
|
global Config
|
||||||
|
SetConfigDefaults
|
||||||
|
set rem [FindRemind]
|
||||||
|
if {"$rem" == ""} {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
set dir [file dirname $rem]
|
||||||
|
set Config(INST_DIR) $dir
|
||||||
|
if {"$dir" == "/usr/local/bin"} {
|
||||||
|
set Config(MAN_DIR) "/usr/local/man"
|
||||||
|
} elseif {$dir == "/usr/bin"} {
|
||||||
|
set Config(MAN_DIR) "/usr/share/man"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Check for existing man page
|
||||||
|
if {[file readable "/usr/share/man/man1/remind.1"]} {
|
||||||
|
set Config(MAN_DIR) "/usr/share/man"
|
||||||
|
} elseif {[file readable "/usr/man/man1/remind.1"]} {
|
||||||
|
set Config(MAN_DIR) "/usr/man"
|
||||||
|
} elseif {[file readable "/usr/local/man/man1/remind.1"]} {
|
||||||
|
set Config(MAN_DIR) "/usr/local/man"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Query Remind for the rest
|
||||||
|
QueryRemind $rem LAT_DEG {$LatDeg}
|
||||||
|
QueryRemind $rem LAT_MIN {$LatMin}
|
||||||
|
QueryRemind $rem LON_DEG {$LongDeg}
|
||||||
|
QueryRemind $rem LON_MIN {$LongMin}
|
||||||
|
QueryRemind $rem LOCATION {$Location}
|
||||||
|
QueryRemind $rem DATESEP {$DateSep}
|
||||||
|
QueryRemind $rem TIMESEP {$TimeSep}
|
||||||
|
QueryRemind $rem LANGUAGE {language()}
|
||||||
|
|
||||||
|
set $Config(LAT_MIN) [expr abs($Config(LAT_MIN))]
|
||||||
|
if {$Config(LAT_DEG) >= 0} {
|
||||||
|
set Config(NORTHERN_HEMISPHERE) 1
|
||||||
|
} else {
|
||||||
|
set Config(NORTHERN_HEMISPHERE) 0
|
||||||
|
set Config(LAT_DEG) [expr abs($Config(LAT_DEG))]
|
||||||
|
}
|
||||||
|
|
||||||
|
set $Config(LON_MIN) [expr abs($Config(LON_MIN))]
|
||||||
|
if {$Config(LON_DEG) >= 0} {
|
||||||
|
set Config(WESTERN_HEMISPHERE) 1
|
||||||
|
} else {
|
||||||
|
set Config(WESTERN_HEMISPHERE) 0
|
||||||
|
set Config(LON_DEG) [expr abs($Config(LON_DEG))]
|
||||||
|
}
|
||||||
|
|
||||||
|
# Get default page from rem2ps
|
||||||
|
set rem2ps [file join $dir "rem2ps"]
|
||||||
|
|
||||||
|
catch {
|
||||||
|
exec $rem2ps -m help
|
||||||
|
} err
|
||||||
|
set errlist [split $err "\n"]
|
||||||
|
set err [lindex $errlist end]
|
||||||
|
if {[string match "Default media type is*" $err]} {
|
||||||
|
set Config(DEFAULT_PAGE) [lindex $err end]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
proc QueryRemind { rem symbol rem_msg } {
|
||||||
|
global Config
|
||||||
|
catch {
|
||||||
|
set fp [open "| $rem -" "r+"]
|
||||||
|
puts $fp "banner %\nMSG \[$rem_msg\]%\nFLUSH\n"
|
||||||
|
flush $fp
|
||||||
|
gets $fp line
|
||||||
|
catch { close $fp }
|
||||||
|
}
|
||||||
|
if {"$line" == ""} {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
set Config($symbol) $line
|
||||||
|
}
|
||||||
|
|
||||||
CheckSanity
|
CheckSanity
|
||||||
CreateMainDialog
|
CreateMainDialog
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
Remind no longer works on AmigaDOS.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Remind no longer works with Borland C Compiler.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Remind no longer works on MS-DOS.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Remind no longer works on OS/2.
|
|
||||||
@@ -28,30 +28,6 @@ If you do NOT have Tcl/Tk or are NOT running X Windows:
|
|||||||
The subdirectory "www" contains scripts for making a nice calendar
|
The subdirectory "www" contains scripts for making a nice calendar
|
||||||
web server. See the files README and Makefile in that directory.
|
web server. See the files README and Makefile in that directory.
|
||||||
|
|
||||||
Two shell scripts, "scripts/remind-all.csh" and
|
|
||||||
"scripts/remind-all.sh" are provided. These allow automatic mailing of
|
|
||||||
reminders to all users who create a $HOME/.reminders file. These two
|
|
||||||
scripts are equivalent; one is a "sh" script and the other is a "csh"
|
|
||||||
script. Pick the one you want to use, and follow the instructions in
|
|
||||||
the opening comments of the script.
|
|
||||||
|
|
||||||
A shell script called "scripts/rem" is provided for those who like to have
|
|
||||||
'remind' assume a default reminders file. A man page for this script
|
|
||||||
is provided. You should examine the script to ensure that the defaults
|
|
||||||
are correct.
|
|
||||||
|
|
||||||
Many people have asked me why I supply the "rem" script instead of
|
|
||||||
having Remind assume a default file. The answer is: That's how I like
|
|
||||||
it! My personal preference is for a program which normally takes
|
|
||||||
parameters to display usage information when invoked with no
|
|
||||||
parameters. I like that behaviour so I can quickly get an idea of
|
|
||||||
what a program does without poring through the man page. And I think
|
|
||||||
I'll keep Remind that way. Sorry to all who dislike it. :-)
|
|
||||||
|
|
||||||
A shell script called "scripts/kall" is provided so you can kill your
|
|
||||||
background remind processes when you log out. See the man page. Note
|
|
||||||
that kall depends on the output of "ps", and may not be portable.
|
|
||||||
|
|
||||||
The file "examples/defs.rem" has some sample Remind definitions and
|
The file "examples/defs.rem" has some sample Remind definitions and
|
||||||
commands, as well as U.S. and Jewish holidays.
|
commands, as well as U.S. and Jewish holidays.
|
||||||
|
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
Remind no longer works on QDOS.
|
|
||||||
156
docs/WHATSNEW
@@ -1,6 +1,90 @@
|
|||||||
CHANGES TO REMIND
|
CHANGES TO REMIND
|
||||||
|
|
||||||
* Version 3.1 Patch 0 - 14 August 2007
|
* Version 3.1 Patch 2 - 2007-09-12
|
||||||
|
|
||||||
|
+ MINOR ENHANCEMENTS
|
||||||
|
|
||||||
|
- build.tk tries to set defaults for location, paper size, etc from an
|
||||||
|
existing "remind" installation if it detects one.
|
||||||
|
|
||||||
|
- In queue mode, wake up once a minute and recalibrate sleep time.
|
||||||
|
This should make Remind work better on laptops that suspend or
|
||||||
|
hibernate. Note that "remind -q" does *not* handle date-rollover
|
||||||
|
well; it simply exits if it notices date rollover. "remind -z0"
|
||||||
|
(as used by tkremind) handles date rollover properly; it rereads the
|
||||||
|
reminder file and rebuilds the queue if it notices date rollover.
|
||||||
|
|
||||||
|
- tkremind: Added some key bindings to make navigation easier.
|
||||||
|
|
||||||
|
- tkremind: Made calendar boxes use space more efficiently.
|
||||||
|
|
||||||
|
- remind: The functionality of "rem" is now built into remind. If you
|
||||||
|
invoke remind as "rem", then it uses a default filename. The installer
|
||||||
|
sets up "rem" as a symbolic link to "remind".
|
||||||
|
|
||||||
|
+ CHANGE
|
||||||
|
|
||||||
|
- "remind -p" no longer sorts SPECIAL reminders before non-SPECIAL.
|
||||||
|
|
||||||
|
*** THIS MAY AFFECT BACKENDS ***
|
||||||
|
|
||||||
|
Backends supplied by Roaring Penguin (rem2ps, rem2html and tkremind)
|
||||||
|
are known to work properly.
|
||||||
|
|
||||||
|
- "remind -p" no longer suppresses any AT-time associated with SPECIAL
|
||||||
|
reminders.
|
||||||
|
|
||||||
|
*** THIS MAY AFFECT BACKENDS ***
|
||||||
|
|
||||||
|
Backends supplied by Roaring Penguin (rem2ps, rem2html and tkremind)
|
||||||
|
are known to work properly.
|
||||||
|
|
||||||
|
+ BUG FIXES
|
||||||
|
|
||||||
|
- examples/defs.rem: A few corrections to Jewish holidays courtesy of
|
||||||
|
Art Werschulz.
|
||||||
|
|
||||||
|
- src/Makefile.in: Added install-nostripped target.
|
||||||
|
|
||||||
|
- SPECIAL COLOR now works more like MSG, including proper support for AT and
|
||||||
|
for the %" %" escape sequence.
|
||||||
|
|
||||||
|
- SPECIAL COLOR is queued correctly if it has an AT clause.
|
||||||
|
|
||||||
|
- Using the psshade() or psmoon() functions emits a warning on stderr. You
|
||||||
|
should use SPECIAL SHADE or SPECIAL MOON instead.
|
||||||
|
|
||||||
|
* Version 3.1 Patch 1 - 2007-08-23
|
||||||
|
|
||||||
|
+ MAJOR ENHANCEMENTS
|
||||||
|
|
||||||
|
- Added the "nonomitted" function that solves a number of
|
||||||
|
moving-reminder-in-response-to-holiday problems. The real-world
|
||||||
|
problems solved are the "moving-garbage-day" problem and the
|
||||||
|
"six-day-school-cycle" problem.
|
||||||
|
|
||||||
|
+ MINOR ENHANCEMENTS
|
||||||
|
|
||||||
|
- A few minor performance improvements in response to profiling runs.
|
||||||
|
|
||||||
|
+ BUG FIXES
|
||||||
|
|
||||||
|
- Prevent compilation failure with gcc 2.95.
|
||||||
|
|
||||||
|
- Fix trailing "s" bug with -k option. This was fixed in Debian's release,
|
||||||
|
but the Debian maintainer never bothered to let me know.
|
||||||
|
|
||||||
|
- Removed obsolete scripts: kall, rem, remind-all.sh, remind-all.csh
|
||||||
|
|
||||||
|
- Made "-n" output always use "/" as date separator for consistency with
|
||||||
|
"-p" and "-s".
|
||||||
|
|
||||||
|
- Moon PNG images are transparent. Output of moon phases in rem2html
|
||||||
|
improved slightly.
|
||||||
|
|
||||||
|
- Various man-page fixes.
|
||||||
|
|
||||||
|
* Version 3.1 Patch 0 - 2007-07-14
|
||||||
|
|
||||||
+ MAJOR ENHANCEMENTS
|
+ MAJOR ENHANCEMENTS
|
||||||
|
|
||||||
@@ -63,7 +147,7 @@ CHANGES TO REMIND
|
|||||||
- rem2ps would produce invalid PostScript in some rare cases
|
- rem2ps would produce invalid PostScript in some rare cases
|
||||||
(eg, for February 2007). This has been fixed.
|
(eg, for February 2007). This has been fixed.
|
||||||
|
|
||||||
* Version 3.0 Patch 24
|
* Version 3.0 Patch 24 - 2005-11-19
|
||||||
|
|
||||||
+ MINOR ENHANCEMENTS
|
+ MINOR ENHANCEMENTS
|
||||||
|
|
||||||
@@ -86,7 +170,7 @@ CHANGES TO REMIND
|
|||||||
- Fixed a bug in the tokenizer that could make Remind segfault. Fix courtesy
|
- Fixed a bug in the tokenizer that could make Remind segfault. Fix courtesy
|
||||||
of Stan Tobias.
|
of Stan Tobias.
|
||||||
|
|
||||||
* Version 3.0 Patch 23
|
* Version 3.0 Patch 23 - 2005-04-14
|
||||||
|
|
||||||
+ MINOR ENHANCEMENTS
|
+ MINOR ENHANCEMENTS
|
||||||
|
|
||||||
@@ -110,7 +194,7 @@ CHANGES TO REMIND
|
|||||||
|
|
||||||
- Fixed parser error for unterminated date constant: '2005/01/01
|
- Fixed parser error for unterminated date constant: '2005/01/01
|
||||||
|
|
||||||
* Version 3.0 Patch 22
|
* Version 3.0 Patch 22 - 2000-06-16
|
||||||
|
|
||||||
+ MINOR ENHANCEMENTS
|
+ MINOR ENHANCEMENTS
|
||||||
|
|
||||||
@@ -132,7 +216,7 @@ CHANGES TO REMIND
|
|||||||
- Fixed serious bug in which background queued reminders were ignored and
|
- Fixed serious bug in which background queued reminders were ignored and
|
||||||
Remind simply exited. Doh! Sorry about that.
|
Remind simply exited. Doh! Sorry about that.
|
||||||
|
|
||||||
* Version 3.0 Patch 21
|
* Version 3.0 Patch 21 - 2000-03-15
|
||||||
|
|
||||||
+ MINOR ENHANCEMENTS
|
+ MINOR ENHANCEMENTS
|
||||||
|
|
||||||
@@ -163,7 +247,7 @@ CHANGES TO REMIND
|
|||||||
|
|
||||||
- Fixed compilation problem on FreeBSD, IRIX, Tru64 and other UNIXes.
|
- Fixed compilation problem on FreeBSD, IRIX, Tru64 and other UNIXes.
|
||||||
|
|
||||||
* Version 3.0 Patch 20
|
* Version 3.0 Patch 20 - 1999-04-12
|
||||||
|
|
||||||
+ NEWS
|
+ NEWS
|
||||||
|
|
||||||
@@ -192,7 +276,7 @@ CHANGES TO REMIND
|
|||||||
|
|
||||||
- Fixed a typo in danish.h, courtesy of Niels Kristian Bech Jensen.
|
- Fixed a typo in danish.h, courtesy of Niels Kristian Bech Jensen.
|
||||||
|
|
||||||
* Version 3.0 Patch 19
|
* Version 3.0 Patch 19 - 1998-05-09
|
||||||
|
|
||||||
+ MAJOR ENHANCEMENTS
|
+ MAJOR ENHANCEMENTS
|
||||||
|
|
||||||
@@ -234,7 +318,7 @@ CHANGES TO REMIND
|
|||||||
- Lots more silly little bugs squashed -- too many to go into in
|
- Lots more silly little bugs squashed -- too many to go into in
|
||||||
detail.
|
detail.
|
||||||
|
|
||||||
* Version 3.0 Patch 18
|
* Version 3.0 Patch 18 - 1998-02-15
|
||||||
|
|
||||||
+ MAJOR ENHANCEMENTS
|
+ MAJOR ENHANCEMENTS
|
||||||
|
|
||||||
@@ -298,7 +382,7 @@ CHANGES TO REMIND
|
|||||||
- Getting rid of fixed-sized buffers meant lots of changes to code.
|
- Getting rid of fixed-sized buffers meant lots of changes to code.
|
||||||
No doubt, I missed a few regression tests.
|
No doubt, I missed a few regression tests.
|
||||||
|
|
||||||
* Version 3.0 Patch 17
|
* Version 3.0 Patch 17 - 1997-09-07
|
||||||
|
|
||||||
+ MINOR ENHANCEMENTS
|
+ MINOR ENHANCEMENTS
|
||||||
|
|
||||||
@@ -339,7 +423,7 @@ CHANGES TO REMIND
|
|||||||
library. All three of these fixes are courtesy of Christopher
|
library. All three of these fixes are courtesy of Christopher
|
||||||
J. Madsen <madsen@iglobal.net>. Thanks, Christopher.
|
J. Madsen <madsen@iglobal.net>. Thanks, Christopher.
|
||||||
|
|
||||||
* Version 3.0 Patch 16
|
* Version 3.0 Patch 16 - 1997-02-11
|
||||||
|
|
||||||
+ MINOR ENHANCEMENTS
|
+ MINOR ENHANCEMENTS
|
||||||
|
|
||||||
@@ -367,7 +451,7 @@ CHANGES TO REMIND
|
|||||||
- Fixed a problem under Solaris 2.5 whereby rem2ps was skipping some
|
- Fixed a problem under Solaris 2.5 whereby rem2ps was skipping some
|
||||||
latin1 characters which it interpreted as white space.
|
latin1 characters which it interpreted as white space.
|
||||||
|
|
||||||
* Version 3.0 Patch 15
|
* Version 3.0 Patch 15 - 1996-10-27
|
||||||
|
|
||||||
+ IMPORTANT NOTES
|
+ IMPORTANT NOTES
|
||||||
|
|
||||||
@@ -397,7 +481,7 @@ CHANGES TO REMIND
|
|||||||
- Fixed bug in TkRemind which caused a crash if the "-m" option was used
|
- Fixed bug in TkRemind which caused a crash if the "-m" option was used
|
||||||
for a month beginning on Sunday. Doh!!!
|
for a month beginning on Sunday. Doh!!!
|
||||||
|
|
||||||
* Version 3.0 Patch 14
|
* Version 3.0 Patch 14 - 1996-05-25
|
||||||
|
|
||||||
+ CHANGE IN COPYING POLICY
|
+ CHANGE IN COPYING POLICY
|
||||||
|
|
||||||
@@ -456,7 +540,7 @@ CHANGES TO REMIND
|
|||||||
_not_ support MS Windows, and in fact do not allow Remind to run
|
_not_ support MS Windows, and in fact do not allow Remind to run
|
||||||
under Windows (see COPYRIGHT).
|
under Windows (see COPYRIGHT).
|
||||||
|
|
||||||
* Version 3.0 Patch 13
|
* Version 3.0 Patch 13 - 1994-05-06
|
||||||
|
|
||||||
+ MINOR ENHANCEMENTS
|
+ MINOR ENHANCEMENTS
|
||||||
|
|
||||||
@@ -491,7 +575,7 @@ CHANGES TO REMIND
|
|||||||
|
|
||||||
- Updated the copyright notices everywhere.
|
- Updated the copyright notices everywhere.
|
||||||
|
|
||||||
* Version 3.0 Patch 12
|
* Version 3.0 Patch 12 - 1994-02-01
|
||||||
|
|
||||||
+ MINOR ENHANCEMENTS
|
+ MINOR ENHANCEMENTS
|
||||||
|
|
||||||
@@ -510,7 +594,7 @@ CHANGES TO REMIND
|
|||||||
- Fixed a problem with the '-k' option which resulted in a newline being
|
- Fixed a problem with the '-k' option which resulted in a newline being
|
||||||
placed after the message text. This was giving sh(1) heartburn...
|
placed after the message text. This was giving sh(1) heartburn...
|
||||||
|
|
||||||
* Version 3.0 Patch 11
|
* Version 3.0 Patch 11 - 1993-11-26
|
||||||
|
|
||||||
+ MINOR ENHANCEMENTS
|
+ MINOR ENHANCEMENTS
|
||||||
|
|
||||||
@@ -590,7 +674,7 @@ CHANGES TO REMIND
|
|||||||
|
|
||||||
- Fixed the Finnish language support which was missing a few newlines.
|
- Fixed the Finnish language support which was missing a few newlines.
|
||||||
|
|
||||||
* Version 3.0 Patch 9
|
* Version 3.0 Patch 9 - 1993-10-04
|
||||||
|
|
||||||
+ NOTES
|
+ NOTES
|
||||||
|
|
||||||
@@ -647,7 +731,7 @@ CHANGES TO REMIND
|
|||||||
so that newlines in the body start new paragraphs, rather than being
|
so that newlines in the body start new paragraphs, rather than being
|
||||||
swallowed as white-space.
|
swallowed as white-space.
|
||||||
|
|
||||||
* Version 3.0 Patch 8
|
* Version 3.0 Patch 8 - 1993-09-08
|
||||||
|
|
||||||
+ MAJOR ENHANCEMENTS
|
+ MAJOR ENHANCEMENTS
|
||||||
|
|
||||||
@@ -699,7 +783,7 @@ CHANGES TO REMIND
|
|||||||
range [-128, 255] (but not 0) so that char(asc(s)) works even
|
range [-128, 255] (but not 0) so that char(asc(s)) works even
|
||||||
on machines with signed char types.
|
on machines with signed char types.
|
||||||
|
|
||||||
* Version 3.0 Patch 7
|
* Version 3.0 Patch 7 - 1993-07-22
|
||||||
|
|
||||||
+ MAJOR ENHANCEMENTS
|
+ MAJOR ENHANCEMENTS
|
||||||
|
|
||||||
@@ -742,7 +826,7 @@ CHANGES TO REMIND
|
|||||||
- Changed kall so that "kall sh" doesn't commit suicide - patch courtesy
|
- Changed kall so that "kall sh" doesn't commit suicide - patch courtesy
|
||||||
of Michael Salmon.
|
of Michael Salmon.
|
||||||
|
|
||||||
* Version 3.0 Patch 6
|
* Version 3.0 Patch 6 - 1993-05-05
|
||||||
|
|
||||||
+ MINOR ENHANCEMENTS
|
+ MINOR ENHANCEMENTS
|
||||||
|
|
||||||
@@ -765,7 +849,7 @@ CHANGES TO REMIND
|
|||||||
- Fixed a bug in the -u option which sometimes caused a core dump
|
- Fixed a bug in the -u option which sometimes caused a core dump
|
||||||
(embarrassed grin!) The fix is due to Tina Hoeltig. Thanks, Tina!
|
(embarrassed grin!) The fix is due to Tina Hoeltig. Thanks, Tina!
|
||||||
|
|
||||||
* Version 3.0 Patch 5
|
* Version 3.0 Patch 5 - 1993-04-27
|
||||||
|
|
||||||
+ MAJOR ENHANCEMENTS:
|
+ MAJOR ENHANCEMENTS:
|
||||||
|
|
||||||
@@ -800,7 +884,7 @@ CHANGES TO REMIND
|
|||||||
|
|
||||||
- Fixed a bug in the man page - thanks to Ed Oskiewicz.
|
- Fixed a bug in the man page - thanks to Ed Oskiewicz.
|
||||||
|
|
||||||
* Version 3.0 Patch 4
|
* Version 3.0 Patch 4 - 1993-03-08
|
||||||
|
|
||||||
- Added the -g option - this sorts reminders by date/time before
|
- Added the -g option - this sorts reminders by date/time before
|
||||||
issuing them. (You can see I'm running out of letters to
|
issuing them. (You can see I'm running out of letters to
|
||||||
@@ -859,13 +943,13 @@ CHANGES TO REMIND
|
|||||||
|
|
||||||
- Put my new mailing address in the README files.
|
- Put my new mailing address in the README files.
|
||||||
|
|
||||||
* Version 3.0 Patch 3
|
* Version 3.0 Patch 3 - 1993-02-21
|
||||||
|
|
||||||
- Corrected bugs in Remind and Rem2PS. No new features added. You
|
- Corrected bugs in Remind and Rem2PS. No new features added. You
|
||||||
should NOT use patch level 2 - either stick to 3.0.1 or upgrade to
|
should NOT use patch level 2 - either stick to 3.0.1 or upgrade to
|
||||||
3.0.3.
|
3.0.3.
|
||||||
|
|
||||||
* Version 3.0 Patch 2
|
* Version 3.0 Patch 2 - 1993-02-04
|
||||||
|
|
||||||
- Added the -u option to Remind so that root can run it as any user.
|
- Added the -u option to Remind so that root can run it as any user.
|
||||||
This simplifies the remind-all scripts, and makes them more efficient.
|
This simplifies the remind-all scripts, and makes them more efficient.
|
||||||
@@ -905,7 +989,7 @@ CHANGES TO REMIND
|
|||||||
- Changed Remind so that supplying the -a option causes timed reminders
|
- Changed Remind so that supplying the -a option causes timed reminders
|
||||||
not to be placed into the calendar in calendar mode.
|
not to be placed into the calendar in calendar mode.
|
||||||
|
|
||||||
* Version 3.0 Patch 1
|
* Version 3.0 Patch 1 - 1992-12-18
|
||||||
|
|
||||||
- Wrote the Rem2ps program to produce PostScript calendars
|
- Wrote the Rem2ps program to produce PostScript calendars
|
||||||
|
|
||||||
@@ -945,7 +1029,7 @@ CHANGES TO REMIND
|
|||||||
|
|
||||||
- Re-formatted the WHATSNEW.30 file.
|
- Re-formatted the WHATSNEW.30 file.
|
||||||
|
|
||||||
* Version 3.0
|
* Version 3.0 - 1992-11-09
|
||||||
|
|
||||||
- Total rewrite from previous versions
|
- Total rewrite from previous versions
|
||||||
|
|
||||||
@@ -966,23 +1050,23 @@ CHANGES TO REMIND
|
|||||||
- Fixed a lurking bug in trigger date calculation which, amazingly, had not
|
- Fixed a lurking bug in trigger date calculation which, amazingly, had not
|
||||||
been caught in the couple of years that Remind has been out!
|
been caught in the couple of years that Remind has been out!
|
||||||
|
|
||||||
* Version 2.3 Patch 5
|
* Version 2.3 Patch 5 - 1992-04-11
|
||||||
|
|
||||||
- Added the "c+n" option for printing a calendar by
|
- Added the "c+n" option for printing a calendar by
|
||||||
weeks instead of months, courtesy Dennis Cottel (dennis@peanuts.nosc.mil).
|
weeks instead of months, courtesy Dennis Cottel (dennis@peanuts.nosc.mil).
|
||||||
|
|
||||||
* Version 2.3 Patch 4
|
* Version 2.3 Patch 4 - 1991-11-06
|
||||||
|
|
||||||
- Made the init.c file nicer. Made the Makefile
|
- Made the init.c file nicer. Made the Makefile
|
||||||
prettier. Added "make test", "make tar" and "make shar" Makefile targets.
|
prettier. Added "make test", "make tar" and "make shar" Makefile targets.
|
||||||
|
|
||||||
* Version 2.3 Patch 3
|
* Version 2.3 Patch 3 - 1991-09-11
|
||||||
|
|
||||||
- Added a command-line option for Remind to process
|
- Added a command-line option for Remind to process
|
||||||
queued reminders in the foreground. This makes automatic termination
|
queued reminders in the foreground. This makes automatic termination
|
||||||
of Remind processes from within X-Windows and Sunview easier.
|
of Remind processes from within X-Windows and Sunview easier.
|
||||||
|
|
||||||
* Version 2.3 Patch 2
|
* Version 2.3 Patch 2 - 1991-07-19
|
||||||
|
|
||||||
- Fixed up a problem with timed reminders which resulted
|
- Fixed up a problem with timed reminders which resulted
|
||||||
in cursor not starting from left side of screen on some systems.
|
in cursor not starting from left side of screen on some systems.
|
||||||
@@ -999,7 +1083,7 @@ CHANGES TO REMIND
|
|||||||
|
|
||||||
- Made the Makefile more portable
|
- Made the Makefile more portable
|
||||||
|
|
||||||
* Version 2.3 Patch 1
|
* Version 2.3 Patch 1 - 1991-03-08
|
||||||
|
|
||||||
- Added the "-t" command-line option to get Remind
|
- Added the "-t" command-line option to get Remind
|
||||||
to trigger all non-expired reminders.
|
to trigger all non-expired reminders.
|
||||||
@@ -1013,7 +1097,7 @@ CHANGES TO REMIND
|
|||||||
|
|
||||||
- Added manual pages for "kall" and "rem".
|
- Added manual pages for "kall" and "rem".
|
||||||
|
|
||||||
* Version 2.3
|
* Version 2.3 - 1991-02-20
|
||||||
|
|
||||||
- Added the UNTIL keyword for forcing reminders to expire.
|
- Added the UNTIL keyword for forcing reminders to expire.
|
||||||
|
|
||||||
@@ -1035,28 +1119,28 @@ CHANGES TO REMIND
|
|||||||
- Modified the calendar and SimpleCalendar formats so that the % escape
|
- Modified the calendar and SimpleCalendar formats so that the % escape
|
||||||
substitutions ARE performed.
|
substitutions ARE performed.
|
||||||
|
|
||||||
* Version 2.2 - Patch 5
|
* Version 2.2 - Patch 5 - 1990-12-03
|
||||||
|
|
||||||
- Added the BEFORE, AFTER and SKIP tokens to make the
|
- Added the BEFORE, AFTER and SKIP tokens to make the
|
||||||
handling of holidays more sensible. Also corrected a few more bugs.
|
handling of holidays more sensible. Also corrected a few more bugs.
|
||||||
|
|
||||||
* Version 2.2 - Patch 3
|
* Version 2.2 - Patch 3 - 1990-11-28
|
||||||
|
|
||||||
- Added the MSG or RUN tokens in an OMIT command; also
|
- Added the MSG or RUN tokens in an OMIT command; also
|
||||||
allowed RUN-type reminders to be explicitly included in the calendar by
|
allowed RUN-type reminders to be explicitly included in the calendar by
|
||||||
using the %" escape sequence.
|
using the %" escape sequence.
|
||||||
|
|
||||||
* Version 2.2
|
* Version 2.2 - 1990-11-16
|
||||||
|
|
||||||
- Added the AT keyword, the timed reminders daemon, and the
|
- Added the AT keyword, the timed reminders daemon, and the
|
||||||
calendar facility.
|
calendar facility.
|
||||||
|
|
||||||
* Version 2.1
|
* Version 2.1 - 1990-11-06
|
||||||
|
|
||||||
- Added the "repeat" token for repeating reminders with a period
|
- Added the "repeat" token for repeating reminders with a period
|
||||||
other than 7 days. Also fixed some bugs from version 2.0
|
other than 7 days. Also fixed some bugs from version 2.0
|
||||||
|
|
||||||
* Version 2.0
|
* Version 2.0 - 1990-11-01
|
||||||
|
|
||||||
- first public release. Included advanced date specifications,
|
- first public release. Included advanced date specifications,
|
||||||
character substitution, and the RUN keyword.
|
character substitution, and the RUN keyword.
|
||||||
|
|||||||
@@ -490,7 +490,7 @@ IF !InIsrael
|
|||||||
[_h(16, "Tishrey")] MSG %"Sukkot 2%"
|
[_h(16, "Tishrey")] MSG %"Sukkot 2%"
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
[_h(21, "Tishrey")] ++4 MSG %"Hashana Rabba%" is %b.
|
[_h(21, "Tishrey")] ++4 MSG %"Hoshana Rabba%" is %b.
|
||||||
[_h(22, "Tishrey")] ++4 MSG %"Shemini Atzeret%" is %b.
|
[_h(22, "Tishrey")] ++4 MSG %"Shemini Atzeret%" is %b.
|
||||||
|
|
||||||
IF InIsrael
|
IF InIsrael
|
||||||
@@ -518,7 +518,8 @@ IF !Reform
|
|||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
[_h(15, "Shvat")] ++4 MSG %"Tu B'Shvat%" is %b.
|
[_h(15, "Shvat")] ++4 MSG %"Tu B'Shvat%" is %b.
|
||||||
[_h(15, "Adar A")] ++4 MSG %"Purim Katan%" is %b.
|
[_h(14, "Adar A")] ++4 MSG %"Purim Katan%" is %b.
|
||||||
|
[_h(15, "Adar A")] ++4 MSG %"Shushan Purim Katan%" is %b.
|
||||||
|
|
||||||
# If Purim is on Sunday, then Fast of Esther is 11 Adar.
|
# If Purim is on Sunday, then Fast of Esther is 11 Adar.
|
||||||
IF WKDAYNUM(_h2(13, "Adar")) != 6
|
IF WKDAYNUM(_h2(13, "Adar")) != 6
|
||||||
@@ -527,6 +528,7 @@ ELSE
|
|||||||
REM [TRIGGER(_h2(11, "Adar"))] ++4 MSG %"Fast of Esther%" is %b.
|
REM [TRIGGER(_h2(11, "Adar"))] ++4 MSG %"Fast of Esther%" is %b.
|
||||||
ENDIF
|
ENDIF
|
||||||
[_h(14, "Adar")] ++4 MSG %"Purim%" is %b.
|
[_h(14, "Adar")] ++4 MSG %"Purim%" is %b.
|
||||||
|
[_h(15, "Adar")] ++4 MSG %"Shushan Purim%" is %b.
|
||||||
[_h(15, "Nisan")] ++4 MSG %"Pesach%" is %b.
|
[_h(15, "Nisan")] ++4 MSG %"Pesach%" is %b.
|
||||||
|
|
||||||
IF !InIsrael
|
IF !InIsrael
|
||||||
|
|||||||
27
man/kall.1
@@ -1,27 +0,0 @@
|
|||||||
.TH KALL 1 "15 February 1998"
|
|
||||||
.UC 4
|
|
||||||
.SH NAME
|
|
||||||
kall \- kill processes by command name
|
|
||||||
.SH SYNOPSIS
|
|
||||||
.B kall
|
|
||||||
[\-\fIsignal\fR] prog1 [prog2...]
|
|
||||||
.SH DESCRIPTION
|
|
||||||
.B Kall
|
|
||||||
sends the specified \fIsignal\fR (defaults to \fB-TERM\fR) to all processes
|
|
||||||
whose command name is specified on the command line. For example:
|
|
||||||
.PP
|
|
||||||
.nf
|
|
||||||
kall -HUP remind foobar
|
|
||||||
.fi
|
|
||||||
.PP
|
|
||||||
sends a \fBHUP\fR signal to all \fIremind\fR and \fIfoobar\fR programs.
|
|
||||||
Note that \fBkall\fR sends signals only to those processes owned by the
|
|
||||||
user invoking \fBkall\fR.
|
|
||||||
.SH AUTHOR
|
|
||||||
David F. Skoll
|
|
||||||
.SH BUGS
|
|
||||||
.B Kall
|
|
||||||
is a sh(1) script and depends on the behaviour of ps(1); thus, it is
|
|
||||||
not especially portable.
|
|
||||||
.SH SEE ALSO
|
|
||||||
remind, rem
|
|
||||||
40
man/rem.1
@@ -1,34 +1,20 @@
|
|||||||
.TH REM 1 "15 February 1998"
|
.TH REM 1 "30 August 2007"
|
||||||
.UC 4
|
.UC4
|
||||||
.SH NAME
|
.SH NAME
|
||||||
rem \- run 'remind' with a default reminder file
|
rem \- Invoke Remind with a default filename
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B rem
|
.B rem [\fIoptions\fR] [\fIdate\fR] [\fI*rep\fR] [\fItime\fR]
|
||||||
[\-F \fIfilename\fR] [\fIremind_options\fR] [\fIremind_params\fR]
|
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.B Rem
|
\fBrem\fR is a symbolic link to \fBremind\fR. When \fBremind\fR
|
||||||
runs the \fBremind\fR program with a default reminder file of
|
determines that it has been invoked as \fBrem\fR, it uses a default
|
||||||
"$HOME/.reminders". You can supply remind options on the command line,
|
filename rather than expecting a filename to be supplied on the command
|
||||||
as well as a date specification, just as with \fBremind\fR.
|
line.
|
||||||
|
|
||||||
If you don't want to use the default filename, you can override it with
|
|
||||||
the "-F" option, followed by a space and a filename. (This, however,
|
|
||||||
defeats the purpose of \fBrem\fR)
|
|
||||||
.PP
|
.PP
|
||||||
For example, typing:
|
If the environment variable DOTREMINDERS is set, \fBremind\fR uses the
|
||||||
.PP
|
value of DOTREMINDERS as the filename. Otherwise, \fBremind\fR uses
|
||||||
.nf
|
the filename $HOME/.reminders
|
||||||
rem -c 1 jan 1992
|
|
||||||
.fi
|
|
||||||
.PP
|
|
||||||
has the same effect as typing:
|
|
||||||
.PP
|
|
||||||
.nf
|
|
||||||
remind -c $HOME/.reminders 1 jan 1992
|
|
||||||
.fi
|
|
||||||
.PP
|
.PP
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
David F. Skoll
|
Remind was written by David F. Skoll <dfs@roaringpenguin.com>
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
remind, kall
|
\fBremind\fR
|
||||||
|
|
||||||
|
|||||||
20
man/rem2ps.1
@@ -121,10 +121,10 @@ numbers.
|
|||||||
numbers.
|
numbers.
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
Type "rem2ps -m help" for a list of available media. Note that the media
|
Type "rem2ps \-m help" for a list of available media. Note that the media
|
||||||
type (and all \fBRem2ps\fR options) are case-sensitive. If you don't use
|
type (and all \fBRem2ps\fR options) are case-sensitive. If you don't use
|
||||||
the \fB\-m\fR option, the media defaults to a compiled-in default - this
|
the \fB\-m\fR option, the media defaults to a compiled-in default - this
|
||||||
is usually Letter for North America and A4 for Europe. The "-m help"
|
is usually Letter for North America and A4 for Europe. The "\-m help"
|
||||||
option will display the compiled-in default.
|
option will display the compiled-in default.
|
||||||
.RE
|
.RE
|
||||||
.TP
|
.TP
|
||||||
@@ -137,7 +137,7 @@ specifying:
|
|||||||
.RS
|
.RS
|
||||||
.PP
|
.PP
|
||||||
.nf
|
.nf
|
||||||
-ftshe Helvetica -fd Helvetica-BoldOblique
|
\-ftshe Helvetica \-fd Helvetica-BoldOblique
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
In other words, the heading, entry and small-calendar fonts are set
|
In other words, the heading, entry and small-calendar fonts are set
|
||||||
@@ -153,7 +153,7 @@ are equivalent to specifying:
|
|||||||
.RS
|
.RS
|
||||||
.PP
|
.PP
|
||||||
.nf
|
.nf
|
||||||
-sthd 14 -se 8
|
\-sthd 14 \-se 8
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
In other words, the heading and day numbers are 14-point fonts, and the
|
In other words, the heading and day numbers are 14-point fonts, and the
|
||||||
@@ -179,7 +179,7 @@ for good output:
|
|||||||
.PP
|
.PP
|
||||||
.nf
|
.nf
|
||||||
# This gives good results for putting into a binder
|
# This gives good results for putting into a binder
|
||||||
rem2ps -ol 72 -sh 12
|
rem2ps \-ol 72 \-sh 12
|
||||||
.fi
|
.fi
|
||||||
.SH USAGE
|
.SH USAGE
|
||||||
To use \fBRem2ps\fR, you should pipe the output of \fBRemind\fR with the \fB\-p\fR
|
To use \fBRem2ps\fR, you should pipe the output of \fBRemind\fR with the \fB\-p\fR
|
||||||
@@ -187,14 +187,14 @@ option to \fBRem2ps\fR, and then send the result to a printer. This is most eas
|
|||||||
illustrated with examples:
|
illustrated with examples:
|
||||||
.PP
|
.PP
|
||||||
.nf
|
.nf
|
||||||
remind -p12 /dev/null 1 jan 1994 | rem2ps | lpr -Plaser
|
remind \-p12 /dev/null 1 jan 1994 | rem2ps | lpr \-Plaser
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
That example creates a blank calendar for the entire year of 1994, and
|
That example creates a blank calendar for the entire year of 1994, and
|
||||||
sends it the the printer named "laser."
|
sends it the the printer named "laser."
|
||||||
.PP
|
.PP
|
||||||
.nf
|
.nf
|
||||||
remind -p ~/.reminders | rem2ps -l -sd 18 > cal.ps
|
remind \-p ~/.reminders | rem2ps \-l \-sd 18 > cal.ps
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
This reminder creates a calendar for the current month, filling in
|
This reminder creates a calendar for the current month, filling in
|
||||||
@@ -350,7 +350,9 @@ The remaining data consists of calendar entries, in the following format:
|
|||||||
\fIyyyy/mm/dd special tag dur time body\fR
|
\fIyyyy/mm/dd special tag dur time body\fR
|
||||||
.PP
|
.PP
|
||||||
Here, \fIyyyy\fR is the year, \fImm\fR is the month (01-12) and
|
Here, \fIyyyy\fR is the year, \fImm\fR is the month (01-12) and
|
||||||
\fIdd\fR is the day of the month.
|
\fIdd\fR is the day of the month. Note that the date components are
|
||||||
|
always separated by "/" even if the date separator in \fBRemind\fR has
|
||||||
|
been set to "-". The consistent use of "/" is designed to ease parsing.
|
||||||
.PP
|
.PP
|
||||||
\fIspecial\fR is a string used
|
\fIspecial\fR is a string used
|
||||||
for "out-of-band" communication with back-ends. If the reminder
|
for "out-of-band" communication with back-ends. If the reminder
|
||||||
@@ -405,4 +407,4 @@ You should ensure that the values you supply for margin widths are sensible.
|
|||||||
If they are too big for the media size, \fBRem2ps\fR will not complain,
|
If they are too big for the media size, \fBRem2ps\fR will not complain,
|
||||||
but again, the PostScript output will probably not work.
|
but again, the PostScript output will probably not work.
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
\fBRemind\fR
|
\fBremind\fR
|
||||||
|
|||||||
99
man/remind.1
@@ -1392,7 +1392,7 @@ as being the combination of \fBDATE\fR and \fBTIME\fR parts.
|
|||||||
The following examples illustrate constants in \fBRemind\fR expressions:
|
The following examples illustrate constants in \fBRemind\fR expressions:
|
||||||
.TP
|
.TP
|
||||||
.B INT constants
|
.B INT constants
|
||||||
12, 36, -10, 0, 1209
|
12, 36, \-10, 0, 1209
|
||||||
.TP
|
.TP
|
||||||
.B STRING constants
|
.B STRING constants
|
||||||
"Hello there", "This is a test", "\\n\\gosd\\w", ""
|
"Hello there", "This is a test", "\\n\\gosd\\w", ""
|
||||||
@@ -1568,7 +1568,7 @@ otherwise.
|
|||||||
.PP
|
.PP
|
||||||
Operators of equal precedence are \fIalways\fR evaluated from left
|
Operators of equal precedence are \fIalways\fR evaluated from left
|
||||||
to right, except where parentheses dictate otherwise. This is important,
|
to right, except where parentheses dictate otherwise. This is important,
|
||||||
because the enhanced "+" and "\-" operators are not necessarily associative.
|
because the enhanced "+" operator is not necessarily associative.
|
||||||
For example:
|
For example:
|
||||||
.PP
|
.PP
|
||||||
.nf
|
.nf
|
||||||
@@ -2228,6 +2228,70 @@ which default to \fBtoday()\fR and midnight, respectively. The returned
|
|||||||
value is an integer from 0 to 359, representing the phase of the moon
|
value is an integer from 0 to 359, representing the phase of the moon
|
||||||
in degrees. 0 is a new moon, 180 is a full moon, 90 is first-quarter, etc.
|
in degrees. 0 is a new moon, 180 is a full moon, 90 is first-quarter, etc.
|
||||||
.TP
|
.TP
|
||||||
|
.B nonomitted(dq_start, dq_end [,s_wkday...])
|
||||||
|
This function returns the number of \fInon-\fRomitted days between
|
||||||
|
\fIstart\fR and \fIend\fR. If \fIstart\fR is non-omitted, then it is
|
||||||
|
counted. \fIend\fR is never counted.
|
||||||
|
.RS
|
||||||
|
.PP
|
||||||
|
Note that \fIend\fR must be greater than or
|
||||||
|
equal to \fIstart\fR or an error is reported. In addition to using
|
||||||
|
the global OMIT context, you can supply additional arguments that are
|
||||||
|
names of weekdays to be omitted.
|
||||||
|
.PP
|
||||||
|
For example, the following line sets a to 11 (assuming no global OMITs):
|
||||||
|
.PP
|
||||||
|
.nf
|
||||||
|
set a nonomitted('2007-08-01', '2007-08-16', "Sat", "Sun")
|
||||||
|
.fi
|
||||||
|
.PP
|
||||||
|
because Thursday, 16 August 2007 is the 11th working day (not counting
|
||||||
|
Saturday and Sunday) after Wednesday, 1 August 2007.
|
||||||
|
.PP
|
||||||
|
\fBnonomitted\fR has various uses. For example, many schools
|
||||||
|
run on a six-day cycle and the day number is not incremented on holidays.
|
||||||
|
Suppose the school year starts with Day 1 on 4 September 2007. The following
|
||||||
|
reminder will label day numbers in a calendar:
|
||||||
|
.PP
|
||||||
|
.nf
|
||||||
|
IF today() >= '2007-09-04'
|
||||||
|
set daynum nonomitted('2007-09-04', today(), "Sat", "Sun")
|
||||||
|
REM OMIT SAT SUN SKIP CAL Day [(daynum % 6) + 1]
|
||||||
|
ENDIF
|
||||||
|
.fi
|
||||||
|
.PP
|
||||||
|
Here's a more complex example: Suppose your normal garbage-collection
|
||||||
|
day is Thursday, but if any of Monday through Thursday of a week is a holiday,
|
||||||
|
the collection day moves to Friday. Here's one way to solve it:
|
||||||
|
.PP
|
||||||
|
.nf
|
||||||
|
FSET prev_monday(x) x - wkdaynum(x-1)
|
||||||
|
|
||||||
|
REM Thu Fri SATISFY [wkdaynum(trigdate()) == 4 && \\
|
||||||
|
nonomitted(prev_monday(today()), today()+1) == 4 || \\
|
||||||
|
wkdaynum(trigdate()) == 5 && \\
|
||||||
|
nonomitted(prev_monday(today()), today()+1) <= 4] \\
|
||||||
|
MSG Garbage Day
|
||||||
|
.fi
|
||||||
|
.PP
|
||||||
|
Whew! (You'll need to see "THE SATISFY CLAUSE" later on.) We'd
|
||||||
|
better explain that one: The prev_monday helper function takes a date
|
||||||
|
and returns the date of the previous Monday. The REM command will
|
||||||
|
trigger on the first Thursday or Friday that satisfies one of the
|
||||||
|
following conditions:
|
||||||
|
.PP
|
||||||
|
1) Either it's a Thursday and there are exactly four non-omitted days between
|
||||||
|
the previous Monday and tomorrow, or
|
||||||
|
.PP
|
||||||
|
2) It's a Friday and there are four or fewer non-omitted days between the
|
||||||
|
previous Monday and tomorrow. We need the "or fewer" condition to handle
|
||||||
|
the case of more than one holiday in a given week. If that happens,
|
||||||
|
garbage day still only moves by one day.
|
||||||
|
.PP
|
||||||
|
Obviously, the answer you get from \fBnonomitted\fR depends on the global
|
||||||
|
OMIT context. If you use moveable OMITs, you may get inconsistent results.
|
||||||
|
.RE
|
||||||
|
.TP
|
||||||
.B now()
|
.B now()
|
||||||
Returns the current system time, as a \fBTIME\fR type. This may be
|
Returns the current system time, as a \fBTIME\fR type. This may be
|
||||||
the actual time, or a time supplied on the command line.
|
the actual time, or a time supplied on the command line.
|
||||||
@@ -2253,12 +2317,13 @@ If three arguments are supplied, returns \fIstr1\fR if \fInum\fR is 1, and
|
|||||||
.RE
|
.RE
|
||||||
.TP
|
.TP
|
||||||
.B psmoon(i_phase [,i_size [,s_note [,i_notesize]]])
|
.B psmoon(i_phase [,i_size [,s_note [,i_notesize]]])
|
||||||
Returns a \fBSTRING\fR consisting of PostScript code to draw a moon in
|
[DEPRECATED] Returns a \fBSTRING\fR consisting of PostScript code to
|
||||||
the upper-left hand corner of the calendar box. \fIPhase\fR specifies
|
draw a moon in the upper-left hand corner of the calendar box.
|
||||||
the phase of the moon, and is 0 (new moon), 1 (first quarter), 2 (full
|
\fIPhase\fR specifies the phase of the moon, and is 0 (new moon), 1
|
||||||
moon) or 3 (third quarter). If \fIsize\fR is specified, it controls
|
(first quarter), 2 (full moon) or 3 (third quarter). If \fIsize\fR is
|
||||||
the radius of the moon in PostScript units (1/72 inch.) If it is not
|
specified, it controls the radius of the moon in PostScript units
|
||||||
specified or is negative, the size of the day-number font is used.
|
(1/72 inch.) If it is not specified or is negative, the size of the
|
||||||
|
day-number font is used.
|
||||||
.PP
|
.PP
|
||||||
.PP
|
.PP
|
||||||
.RS
|
.RS
|
||||||
@@ -2289,7 +2354,7 @@ Note how the time is coerced to a string by concatenating the null string.
|
|||||||
.RE
|
.RE
|
||||||
.TP
|
.TP
|
||||||
\fBpsshade(i_gray)\fR or \fBpsshade(i_red, i_green, i_blue)\fR
|
\fBpsshade(i_gray)\fR or \fBpsshade(i_red, i_green, i_blue)\fR
|
||||||
Returns a \fBSTRING\fR that consists of PostScript commands to
|
[DEPRECATED] Returns a \fBSTRING\fR that consists of PostScript commands to
|
||||||
shade a calendar box. \fINum\fR can range from 0 (completely black)
|
shade a calendar box. \fINum\fR can range from 0 (completely black)
|
||||||
to 100 (completely white.) If three arguments are given, they specify
|
to 100 (completely white.) If three arguments are given, they specify
|
||||||
red, green and blue intensity from 0 to 100.
|
red, green and blue intensity from 0 to 100.
|
||||||
@@ -2351,13 +2416,13 @@ of \fIstr\fR.
|
|||||||
.TP
|
.TP
|
||||||
.B sunrise([dq_date])
|
.B sunrise([dq_date])
|
||||||
Returns a \fBTIME\fR indicating the time of sunrise on the specified
|
Returns a \fBTIME\fR indicating the time of sunrise on the specified
|
||||||
\fIdate\fR (default \fBtoday()\fR.) In high lattitudes, there
|
\fIdate\fR (default \fBtoday()\fR.) In high latitudes, there
|
||||||
may be no sunrise on a particular day, in which case \fBsunrise()\fR
|
may be no sunrise on a particular day, in which case \fBsunrise()\fR
|
||||||
returns the \fBINT\fR 0 if the sun never sets, or 1440 if it never rises.
|
returns the \fBINT\fR 0 if the sun never sets, or 1440 if it never rises.
|
||||||
.TP
|
.TP
|
||||||
.B sunset([dq_date])
|
.B sunset([dq_date])
|
||||||
Returns a \fBTIME\fR indicating the time of sunset on the specified
|
Returns a \fBTIME\fR indicating the time of sunset on the specified
|
||||||
\fIdate\fR (default \fBtoday()\fR.) In high lattitudes, there
|
\fIdate\fR (default \fBtoday()\fR.) In high latitudes, there
|
||||||
may be no sunset on a particular day, in which case \fBsunset()\fR
|
may be no sunset on a particular day, in which case \fBsunset()\fR
|
||||||
returns the \fBINT\fR 0 if the sun never rises, or 1440 if it never
|
returns the \fBINT\fR 0 if the sun never rises, or 1440 if it never
|
||||||
sets.
|
sets.
|
||||||
@@ -3179,12 +3244,6 @@ You should not have any spaces between the \fB\-i\fR option and the equal
|
|||||||
sign; otherwise, strange variable names are created that can only be accessed
|
sign; otherwise, strange variable names are created that can only be accessed
|
||||||
with the \fBvalue()\fR or \fBdefined()\fR functions.
|
with the \fBvalue()\fR or \fBdefined()\fR functions.
|
||||||
.PP
|
.PP
|
||||||
If your site uses the \fBRemind-all\fR shell script to mail reminders
|
|
||||||
to users, the script will initialize the variable \fIremind_all\fR to 1
|
|
||||||
using the \fB\-i\fR option. Thus, you can detect when your reminder
|
|
||||||
script is being processed by \fBRemind-all\fR and can use this information
|
|
||||||
to control which reminders you want mailed to you.
|
|
||||||
.PP
|
|
||||||
.SH MORE ABOUT POSTSCRIPT
|
.SH MORE ABOUT POSTSCRIPT
|
||||||
.PP
|
.PP
|
||||||
The \fBPS\fR and \fBPSFILE\fR reminders pass PostScript code directly
|
The \fBPS\fR and \fBPSFILE\fR reminders pass PostScript code directly
|
||||||
@@ -3406,7 +3465,7 @@ be preceded by "(not important)".
|
|||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
In Calendar Mode (with the \fB\-c\fR, \fB\-s\fR or \fB\-p\fR options),
|
In Calendar Mode (with the \fB\-c\fR, \fB\-s\fR or \fB\-p\fR options),
|
||||||
an analagous pair of functions named \fBcalprefix()\fR and
|
an analogous pair of functions named \fBcalprefix()\fR and
|
||||||
\fBcalsuffix()\fR can be defined. They work with all reminders that
|
\fBcalsuffix()\fR can be defined. They work with all reminders that
|
||||||
produce an entry in the calendar (i.e., \fBCAL\fR- and possibly
|
produce an entry in the calendar (i.e., \fBCAL\fR- and possibly
|
||||||
\fBRUN\fR-type reminders as well as \fBMSG\fR-type reminders.)
|
\fBRUN\fR-type reminders as well as \fBMSG\fR-type reminders.)
|
||||||
@@ -3951,7 +4010,7 @@ Liviu Daia
|
|||||||
Rafa Couto
|
Rafa Couto
|
||||||
.PP
|
.PP
|
||||||
\fBIcelandic\fR --
|
\fBIcelandic\fR --
|
||||||
Björn Davíðsson
|
Bj\(:orn Dav\('i\[Sd]sson
|
||||||
.SH BUGS
|
.SH BUGS
|
||||||
.PP
|
.PP
|
||||||
There's no good reason why read-only system variables are not
|
There's no good reason why read-only system variables are not
|
||||||
@@ -3979,4 +4038,4 @@ Catalog\fR, Jewish Publication Society of America.
|
|||||||
.PP
|
.PP
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.PP
|
.PP
|
||||||
rem, elm, kall, rem2ps, tkremind
|
rem, rem2ps, tkremind
|
||||||
|
|||||||
@@ -235,6 +235,22 @@ press \fBApply Options\fR to put them into effect, \fBSave Options\fR
|
|||||||
to put them into effect and save them in $HOME/.tkremindrc, or
|
to put them into effect and save them in $HOME/.tkremindrc, or
|
||||||
\fBCancel\fR to cancel any changes you made.
|
\fBCancel\fR to cancel any changes you made.
|
||||||
|
|
||||||
|
.SH KEYBOARD SHORTCUTS
|
||||||
|
\fBTkRemind\fR's main window includes the following keyboard shortcuts:
|
||||||
|
|
||||||
|
.TP
|
||||||
|
.B Ctrl-Q
|
||||||
|
Quit
|
||||||
|
.TP
|
||||||
|
.B Left Arrow
|
||||||
|
Previous Month
|
||||||
|
.TP
|
||||||
|
.B Right Arrow
|
||||||
|
Next Month
|
||||||
|
.TP
|
||||||
|
.B Home
|
||||||
|
Today
|
||||||
|
|
||||||
.SH ODDS AND ENDS
|
.SH ODDS AND ENDS
|
||||||
\fBTkRemind\fR performs some basic consistency checks when you add or
|
\fBTkRemind\fR performs some basic consistency checks when you add or
|
||||||
preview a reminder. However, if you edit a reminder in the previewer,
|
preview a reminder. However, if you edit a reminder in the previewer,
|
||||||
@@ -268,7 +284,7 @@ for \fBTkRemind\fR (for example).
|
|||||||
script file. It also places special comments in the reminder
|
script file. It also places special comments in the reminder
|
||||||
file to store additional state. You can certainly mix
|
file to store additional state. You can certainly mix
|
||||||
"hand-crafted" reminders with reminders created by \fBTkRemind\fR
|
"hand-crafted" reminders with reminders created by \fBTkRemind\fR
|
||||||
if you are awared of the following rules and limitations:
|
if you are aware of the following rules and limitations:
|
||||||
.TP
|
.TP
|
||||||
o
|
o
|
||||||
Do not use the \fBTAG\fR keyword in hand-crafted reminders.
|
Do not use the \fBTAG\fR keyword in hand-crafted reminders.
|
||||||
|
|||||||
23
remind.lsm
@@ -1,23 +0,0 @@
|
|||||||
Begin3
|
|
||||||
Title: Remind
|
|
||||||
Version: 03.00.22
|
|
||||||
Entered-date: 12 Apr 1999
|
|
||||||
Description: Full-featured calendar/reminder program featuring
|
|
||||||
sophisticated date calculation, moon phases, sunrise/sunset,
|
|
||||||
Hebrew calendar, alarms, PostScript output, X-Windows
|
|
||||||
front-end, multilingual messages, and proper handling of
|
|
||||||
holidays. Available for UNIX, MS-DOS, OS/2, and other
|
|
||||||
platforms. Includes scripts for making a nice WWW
|
|
||||||
calendar server.
|
|
||||||
Keywords: calendar reminder alarm datebook PostScript www
|
|
||||||
Author: dskoll@iname.com (David F. Skoll)
|
|
||||||
Maintained-by: dskoll@iname.com (David F. Skoll)
|
|
||||||
Primary-site: http://www.roaringpenguin.com/remind.html
|
|
||||||
304kB remind-3.0.22.tgz
|
|
||||||
Alternate-site:
|
|
||||||
Original-site:
|
|
||||||
Platform: Linux, Solaris, SunOS, HP-UX -- virtually any UN*X-like
|
|
||||||
system. Wish 8.x required for TCL/Tk front-end, but
|
|
||||||
this is not essential to use the software.
|
|
||||||
Copying-policy: GPL
|
|
||||||
End
|
|
||||||
@@ -1,7 +1,4 @@
|
|||||||
Files in this directory:
|
Files in this directory:
|
||||||
|
|
||||||
kall -- Kills a program by command name, as in "kall remind"
|
tkremind -- Tcl/Tk graphical calendar using Remind as engine
|
||||||
rem -- Starts Remind with a default file of $HOME/.reminders
|
cm2rem.tcl -- Convert Sun's "cm" calendar manager files to Remind.
|
||||||
remind-all.csh -- Mails reminders to all users (C-Shell version)
|
|
||||||
remind-all.sh -- Mails reminders to all users (Bourne Shell version)
|
|
||||||
tkremind* -- Tcl/Tk graphical calendar using Remind as engine
|
|
||||||
|
|||||||
40
scripts/kall
@@ -1,40 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# kall - kill all processes belonging to this user that match
|
|
||||||
# specified string.
|
|
||||||
|
|
||||||
signal=`echo $1 | grep '^\-.*'`
|
|
||||||
me=`basename $0`
|
|
||||||
|
|
||||||
if [ "$signal" != "" ]; then
|
|
||||||
shift
|
|
||||||
else
|
|
||||||
signal="-TERM"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$1" = "" ]; then
|
|
||||||
echo "usage: $me [-signal] string [string...]"
|
|
||||||
echo " kills all of your processes where command name matches"
|
|
||||||
echo " any of the given strings."
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
msg="0"
|
|
||||||
|
|
||||||
while [ "$1" != "" ]; do
|
|
||||||
|
|
||||||
# NOTE: You may have to modify the next line, since PS is non-portable.
|
|
||||||
# The 'awk' command picks out the process IDs to pass them on to kill.
|
|
||||||
rprocs=`ps cx | awk '{if(prog == $NF && $1 != mypid) print $1}' prog=$1 mypid=$$ -`
|
|
||||||
if [ "$rprocs" != "" ]; then
|
|
||||||
msg="1"
|
|
||||||
echo -n "${me}: Sending $signal signal to $1 process(es)"
|
|
||||||
echo '...'
|
|
||||||
kill $signal $rprocs
|
|
||||||
fi
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ $msg = "1" ]; then
|
|
||||||
echo "${me}: Done."
|
|
||||||
fi
|
|
||||||
43
scripts/rem
@@ -1,43 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# rem - by David Skoll - 26 February 1991
|
|
||||||
#
|
|
||||||
# This script runs 'remind' with a default reminder file assumed. You
|
|
||||||
# can override the default by using "rem -F newfile ..." (But why would
|
|
||||||
# you use rem unless you wanted to accept the default??)
|
|
||||||
|
|
||||||
# ------ You may wish to change the defaults below this line ------
|
|
||||||
|
|
||||||
# The default reminder file
|
|
||||||
DEFAULT=$HOME/.reminders
|
|
||||||
|
|
||||||
# The executable file (you may wish to change this to /usr/local/bin/remind
|
|
||||||
# or whatever.
|
|
||||||
EXECUTABLE=remind
|
|
||||||
|
|
||||||
# No options yet
|
|
||||||
OPTIONS=""
|
|
||||||
|
|
||||||
# No parameters yet
|
|
||||||
PARAMETERS=""
|
|
||||||
|
|
||||||
# ------ You shouldn't change anything below this line -----
|
|
||||||
|
|
||||||
# Scan for options
|
|
||||||
while test "$1" != ""
|
|
||||||
do
|
|
||||||
case $1 in
|
|
||||||
|
|
||||||
-F) DEFAULT=$2
|
|
||||||
shift
|
|
||||||
shift ;;
|
|
||||||
|
|
||||||
-*) OPTIONS="$OPTIONS $1"
|
|
||||||
shift ;;
|
|
||||||
|
|
||||||
*) PARAMETERS=$*
|
|
||||||
break ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
$EXECUTABLE $OPTIONS $DEFAULT $PARAMETERS
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
#!/bin/csh -f
|
|
||||||
|
|
||||||
# Shell script to mail all users reminders.
|
|
||||||
|
|
||||||
# Run it AFTER MIDNIGHT so that date is correct!
|
|
||||||
# On our system, we have the following in our crontab:
|
|
||||||
# 05 5 * * * /usr/share/lib/remind/remind-all > /dev/null 2>&1
|
|
||||||
|
|
||||||
# This script must be run by root. The -u option MUST be supplied
|
|
||||||
# to Remind, or a severe security hole will exist. Note that Remind
|
|
||||||
# must be compiled to support the -u option for this script to work.
|
|
||||||
# Also, the -r and -q options must be used.
|
|
||||||
|
|
||||||
# The following line gets a list of users for systems using SUN's
|
|
||||||
# NIS service:
|
|
||||||
set USERS = `ypcat passwd | awk -F: '{print $1}'`
|
|
||||||
|
|
||||||
# The following line gets a list of users by examining /etc/passwd:
|
|
||||||
# set USERS = `awk -F: '{print $1}' /etc/passwd`
|
|
||||||
|
|
||||||
# If neither of the above methods works, you must come up with some
|
|
||||||
# way of getting a list of users on the system
|
|
||||||
|
|
||||||
# Set the following variables as appropriate for your system
|
|
||||||
set REMIND = /usr/local/bin/remind
|
|
||||||
set MAIL = /usr/ucb/mail
|
|
||||||
set RM = "/usr/bin/rm -f"
|
|
||||||
|
|
||||||
set REMFILE = /tmp/RemFile.$$
|
|
||||||
|
|
||||||
# Scan each user's directory for a .reminders file
|
|
||||||
foreach i ($USERS)
|
|
||||||
if (-r ~$i/.reminders) then
|
|
||||||
# echo "$i has a .reminders file." DEBUGGING PURPOSES ONLY
|
|
||||||
|
|
||||||
$REMIND -u$i -h -r -q -iremind_all=1 ~$i/.reminders < /dev/null > $REMFILE
|
|
||||||
if (! -z $REMFILE) then
|
|
||||||
# echo "Sending mail to $i" DEBUGGING PURPOSES ONLY
|
|
||||||
|
|
||||||
$MAIL -s "Reminders" $i < $REMFILE
|
|
||||||
endif
|
|
||||||
$RM $REMFILE
|
|
||||||
endif
|
|
||||||
end
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# Shell script to mail all users reminders.
|
|
||||||
|
|
||||||
# This file is part of REMIND
|
|
||||||
#
|
|
||||||
# REMIND is Copyright (C) 1992-1998 by David F. Skoll
|
|
||||||
# Copyright (C) 1999-2007 Roaring Penguin Software Inc.
|
|
||||||
# This file is Copyright (C) 1990 by Bill Aten
|
|
||||||
|
|
||||||
# Thanks to Bill Aten for this script.
|
|
||||||
|
|
||||||
# Run it AFTER MIDNIGHT so that date is correct!
|
|
||||||
# On our system, we have the following in our crontab:
|
|
||||||
# 02 00 * * * /usr/local/adm/remind-all >/dev/null 2>&1
|
|
||||||
|
|
||||||
# This script must be run by root. The -u option MUST be supplied
|
|
||||||
# to Remind, or a severe security hole will exist. Note that Remind
|
|
||||||
# must be compiled to support the -u option for this script to work.
|
|
||||||
# Also, the -r and -q options must be used.
|
|
||||||
|
|
||||||
# The following line gets a list of users for systems using SUN's
|
|
||||||
# NIS service:
|
|
||||||
# USERS=`ypcat passwd | awk -F: '{print $1}'`
|
|
||||||
|
|
||||||
# The following line gets a list of users by examining /etc/passwd:
|
|
||||||
USERS=`awk -F: '{print $1}' /etc/passwd`
|
|
||||||
|
|
||||||
# If neither of the above methods works, you must come up with some
|
|
||||||
# way of getting a list of users on the system
|
|
||||||
|
|
||||||
# Set the following variables as appropriate for your system
|
|
||||||
REMIND=/usr/local/bin/remind
|
|
||||||
MAIL=/usr/bin/mail
|
|
||||||
RM="/bin/rm -f"
|
|
||||||
|
|
||||||
REMFILE=/tmp/RemFile.$$
|
|
||||||
|
|
||||||
# Scan each user's directory for a .reminders file
|
|
||||||
for i in $USERS
|
|
||||||
do
|
|
||||||
HOME=`grep \^$i: /etc/passwd | awk -F: '{print $6}'`
|
|
||||||
if [ -r $HOME/.reminders ]; then
|
|
||||||
|
|
||||||
# echo "$i has a .reminders file." DEBUGGING PURPOSES ONLY
|
|
||||||
|
|
||||||
$REMIND -u$i -h -r -q -iremind_all=1 $HOME/.reminders < /dev/null > $REMFILE
|
|
||||||
if [ -s $REMFILE ]; then
|
|
||||||
# echo "Sending mail to $i" DEBUGGING PURPOSES ONLY
|
|
||||||
$MAIL -s "Reminders" $i < $REMFILE
|
|
||||||
fi
|
|
||||||
$RM $REMFILE
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
@@ -298,10 +298,8 @@ proc CreateCalFrame { w dayNames } {
|
|||||||
set f [expr $n+$j]
|
set f [expr $n+$j]
|
||||||
button $w.l$f -text "" -justify center -command "" \
|
button $w.l$f -text "" -justify center -command "" \
|
||||||
-state disabled -relief flat -border 0 -padx 0 -pady 0
|
-state disabled -relief flat -border 0 -padx 0 -pady 0
|
||||||
text $w.t$f -width 12 -height $h -border 1 -wrap word -relief flat \
|
text $w.t$f -width 12 -height $h -border 1 -spacing3 3 -wrap word -relief flat \
|
||||||
-state disabled -takefocus 0 -cursor {}
|
-state disabled -takefocus 0 -cursor {}
|
||||||
$w.t$f tag bind TAGGED <Enter> "TaggedEnter $w.t$f"
|
|
||||||
$w.t$f tag bind TAGGED <Leave> "TaggedLeave $w.t$f"
|
|
||||||
$w.t$f tag bind TAGGED <ButtonPress-1> "EditTaggedReminder $w.t$f"
|
$w.t$f tag bind TAGGED <ButtonPress-1> "EditTaggedReminder $w.t$f"
|
||||||
$w.t$f tag bind REM <ButtonPress-3> "FireEditor $w.t$f"
|
$w.t$f tag bind REM <ButtonPress-3> "FireEditor $w.t$f"
|
||||||
|
|
||||||
@@ -343,8 +341,6 @@ proc ConfigureCalFrame { w firstDay numDays } {
|
|||||||
foreach t [$w.t$i tag names] {
|
foreach t [$w.t$i tag names] {
|
||||||
$w.t$i tag delete $t
|
$w.t$i tag delete $t
|
||||||
}
|
}
|
||||||
$w.t$i tag bind TAGGED <Enter> "TaggedEnter $w.t$i"
|
|
||||||
$w.t$i tag bind TAGGED <Leave> "TaggedLeave $w.t$i"
|
|
||||||
$w.t$i tag bind TAGGED <ButtonPress-1> "EditTaggedReminder $w.t$i"
|
$w.t$i tag bind TAGGED <ButtonPress-1> "EditTaggedReminder $w.t$i"
|
||||||
$w.t$i tag bind REM <ButtonPress-3> "FireEditor $w.t$i"
|
$w.t$i tag bind REM <ButtonPress-3> "FireEditor $w.t$i"
|
||||||
$w.t$i configure -state disabled
|
$w.t$i configure -state disabled
|
||||||
@@ -361,8 +357,6 @@ proc ConfigureCalFrame { w firstDay numDays } {
|
|||||||
foreach t [$w.t$i tag names] {
|
foreach t [$w.t$i tag names] {
|
||||||
$w.t$i tag delete $t
|
$w.t$i tag delete $t
|
||||||
}
|
}
|
||||||
$w.t$i tag bind TAGGED <Enter> "TaggedEnter $w.t$i"
|
|
||||||
$w.t$i tag bind TAGGED <Leave> "TaggedLeave $w.t$i"
|
|
||||||
$w.t$i tag bind TAGGED <ButtonPress-1> "EditTaggedReminder $w.t$i"
|
$w.t$i tag bind TAGGED <ButtonPress-1> "EditTaggedReminder $w.t$i"
|
||||||
$w.t$i tag bind REM <ButtonPress-3> "FireEditor $w.t$i"
|
$w.t$i tag bind REM <ButtonPress-3> "FireEditor $w.t$i"
|
||||||
$w.t$i configure -state disabled
|
$w.t$i configure -state disabled
|
||||||
@@ -388,8 +382,6 @@ proc ConfigureCalFrame { w firstDay numDays } {
|
|||||||
foreach t [$w.t$i tag names] {
|
foreach t [$w.t$i tag names] {
|
||||||
$w.t$i tag delete $t
|
$w.t$i tag delete $t
|
||||||
}
|
}
|
||||||
$w.t$i tag bind TAGGED <Enter> "TaggedEnter $w.t$i"
|
|
||||||
$w.t$i tag bind TAGGED <Leave> "TaggedLeave $w.t$i"
|
|
||||||
$w.t$i tag bind TAGGED <ButtonPress-1> "EditTaggedReminder $w.t$i"
|
$w.t$i tag bind TAGGED <ButtonPress-1> "EditTaggedReminder $w.t$i"
|
||||||
$w.t$i tag bind REM <ButtonPress-3> "FireEditor $w.t$i"
|
$w.t$i tag bind REM <ButtonPress-3> "FireEditor $w.t$i"
|
||||||
$w.t$i configure -state disabled
|
$w.t$i configure -state disabled
|
||||||
@@ -435,6 +427,13 @@ proc CreateCalWindow { dayNames } {
|
|||||||
wm iconname . ""
|
wm iconname . ""
|
||||||
wm protocol . WM_DELETE_WINDOW Quit
|
wm protocol . WM_DELETE_WINDOW Quit
|
||||||
wm deiconify .
|
wm deiconify .
|
||||||
|
bind . <Control-KeyPress-q> Quit
|
||||||
|
bind . <KeyPress-Left> ".b.prev flash; .b.prev invoke"
|
||||||
|
bind . <KeyPress-Right> ".b.next flash; .b.next invoke"
|
||||||
|
bind . <KeyPress-Prior> ".b.prev flash; .b.prev invoke"
|
||||||
|
bind . <KeyPress-Next> ".b.next flash; .b.next invoke"
|
||||||
|
bind . <KeyPress-Home> ".b.this flash; .b.this invoke"
|
||||||
|
|
||||||
if {$Option(StartIconified)} {
|
if {$Option(StartIconified)} {
|
||||||
wm iconify .
|
wm iconify .
|
||||||
}
|
}
|
||||||
@@ -701,10 +700,6 @@ proc FillCalWindow {} {
|
|||||||
ConfigureCalWindow $monthName $year $firstWkday $daysInMonth
|
ConfigureCalWindow $monthName $year $firstWkday $daysInMonth
|
||||||
set offset [CalEntryOffset $firstWkday]
|
set offset [CalEntryOffset $firstWkday]
|
||||||
|
|
||||||
for {set i 1} {$i <= 31} {incr i} {
|
|
||||||
set didSomething($i) 0
|
|
||||||
}
|
|
||||||
|
|
||||||
set fntag "x"
|
set fntag "x"
|
||||||
while { [gets $file line] >= 0 } {
|
while { [gets $file line] >= 0 } {
|
||||||
# File info
|
# File info
|
||||||
@@ -763,12 +758,10 @@ proc FillCalWindow {} {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
.cal.t$n configure -state normal
|
.cal.t$n configure -state normal
|
||||||
if { $didSomething($day) } {
|
|
||||||
.cal.t$n insert end " .....\n"
|
|
||||||
}
|
|
||||||
set didSomething($day) 1
|
|
||||||
if {[regexp {TKTAG([0-9]+)} $tag all tagno]} {
|
if {[regexp {TKTAG([0-9]+)} $tag all tagno]} {
|
||||||
.cal.t$n insert end [string trim $stuff] [list REM TAGGED "TKTAG$tagno" $extratags $fntag]
|
.cal.t$n insert end [string trim $stuff] [list REM TAGGED "TKTAG$tagno" $extratags $fntag]
|
||||||
|
.cal.t$n tag bind "TKTAG$tagno" <Enter> "TaggedEnter .cal.t$n"
|
||||||
|
.cal.t$n tag bind "TKTAG$tagno" <Leave> "TaggedLeave .cal.t$n"
|
||||||
} else {
|
} else {
|
||||||
.cal.t$n insert end [string trim $stuff] [list REM $extratags $fntag]
|
.cal.t$n insert end [string trim $stuff] [list REM $extratags $fntag]
|
||||||
}
|
}
|
||||||
@@ -1248,7 +1241,10 @@ proc CreateModifyDialog {w day firstDay args} {
|
|||||||
pack $w.but$nbut -side left -anchor w -in $w.buttons -expand 1 -fill x
|
pack $w.but$nbut -side left -anchor w -in $w.buttons -expand 1 -fill x
|
||||||
}
|
}
|
||||||
|
|
||||||
bind $w <KeyPress-Escape> "$w.but1 invoke"
|
bind $w <KeyPress-Escape> "$w.but1 flash; $w.but1 invoke"
|
||||||
|
if {$nbut >= 2} {
|
||||||
|
bind $w.entry <KeyPress-Return> "$w.but2 flash; $w.but2 invoke"
|
||||||
|
}
|
||||||
set ModifyDialogResult 0
|
set ModifyDialogResult 0
|
||||||
|
|
||||||
# Center the window on the root
|
# Center the window on the root
|
||||||
@@ -1280,7 +1276,7 @@ proc RemindDialogToOptions { w } {
|
|||||||
lappend ans "-global-$winstem" [eval set $winstem]
|
lappend ans "-global-$winstem" [eval set $winstem]
|
||||||
}
|
}
|
||||||
"Entry" {
|
"Entry" {
|
||||||
lappend ans "-entry-$winstem" [$win get]
|
lappend ans "-entry-$winstem" [string map -nocase {"\n" " "} [$win get]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1559,7 +1555,7 @@ proc CreateReminder {w} {
|
|||||||
regsub -- {^-stdin-\([0-9]*\): } $err {} err
|
regsub -- {^-stdin-\([0-9]*\): } $err {} err
|
||||||
error "Error from Remind: $err"
|
error "Error from Remind: $err"
|
||||||
}
|
}
|
||||||
append rem " MSG $body"
|
append rem " MSG " [string map -nocase {"\n" " "} $body]
|
||||||
return $rem
|
return $rem
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1734,7 +1730,7 @@ proc EditReminder {rem args} {
|
|||||||
}
|
}
|
||||||
pack .edit.t -side top -fill both -expand 1
|
pack .edit.t -side top -fill both -expand 1
|
||||||
pack .edit.f -side top -fill x -expand 1
|
pack .edit.f -side top -fill x -expand 1
|
||||||
bind .edit <KeyPress-Escape> ".edit.but1 invoke"
|
bind .edit <KeyPress-Escape> ".edit.but1 flash; .edit.but1 invoke"
|
||||||
set ModifyDialogResult 0
|
set ModifyDialogResult 0
|
||||||
CenterWindow .edit
|
CenterWindow .edit
|
||||||
tkwait visibility .edit
|
tkwait visibility .edit
|
||||||
@@ -2289,6 +2285,8 @@ proc FireEditor { w } {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Status "Firing up editor..."
|
||||||
|
after 1500 DisplayTime
|
||||||
set EditorPid [exec sh -c $editor &]
|
set EditorPid [exec sh -c $editor &]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2630,12 +2628,13 @@ proc DoMoonSpecial { n stuff } {
|
|||||||
3 { set image last }
|
3 { set image last }
|
||||||
}
|
}
|
||||||
.cal.t$n configure -state normal
|
.cal.t$n configure -state normal
|
||||||
.cal.t$n image create end -image $image
|
.cal.t$n image create 1.0 -image $image
|
||||||
|
|
||||||
if {$msg != ""} {
|
if {$msg != ""} {
|
||||||
.cal.t$n insert end " $msg"
|
.cal.t$n insert 1.1 " $msg\n"
|
||||||
|
} else {
|
||||||
|
.cal.t$n insert 1.1 "\n"
|
||||||
}
|
}
|
||||||
.cal.t$n insert end "\n"
|
|
||||||
.cal.t$n configure -state disabled
|
.cal.t$n configure -state disabled
|
||||||
}
|
}
|
||||||
#***********************************************************************
|
#***********************************************************************
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Makefile.in for REMIND
|
# Makefile.in for REMIND
|
||||||
#
|
#
|
||||||
|
|
||||||
VERSION=03.01.00
|
VERSION=03.01.02
|
||||||
SHELL= /bin/sh
|
SHELL= /bin/sh
|
||||||
BETA = 1
|
BETA = 1
|
||||||
srcdir=@srcdir@
|
srcdir=@srcdir@
|
||||||
@@ -10,6 +10,7 @@ exec_prefix=@exec_prefix@
|
|||||||
mandir=@mandir@
|
mandir=@mandir@
|
||||||
bindir=@bindir@
|
bindir=@bindir@
|
||||||
datadir=@datadir@
|
datadir=@datadir@
|
||||||
|
datarootdir=@datarootdir@
|
||||||
VPATH=$(srcdir)
|
VPATH=$(srcdir)
|
||||||
|
|
||||||
INSTALL=@INSTALL@
|
INSTALL=@INSTALL@
|
||||||
@@ -17,12 +18,11 @@ INSTALL_PROGRAM=@INSTALL_PROGRAM@
|
|||||||
INSTALL_DATA=@INSTALL_DATA@
|
INSTALL_DATA=@INSTALL_DATA@
|
||||||
|
|
||||||
PROGS= remind rem2ps
|
PROGS= remind rem2ps
|
||||||
SCRIPTS= $(srcdir)/../scripts/kall $(srcdir)/../scripts/rem \
|
SCRIPTS= $(srcdir)/../scripts/tkremind $(srcdir)/../scripts/cm2rem.tcl
|
||||||
$(srcdir)/../scripts/tkremind $(srcdir)/../scripts/cm2rem.tcl
|
|
||||||
|
|
||||||
MANS= $(srcdir)/../man/kall.1 $(srcdir)/../man/rem.1 \
|
MANS= $(srcdir)/../man/rem2ps.1 $(srcdir)/../man/remind.1 \
|
||||||
$(srcdir)/../man/rem2ps.1 $(srcdir)/../man/remind.1 \
|
$(srcdir)/../man/tkremind.1 $(srcdir)/../man/cm2rem.1 \
|
||||||
$(srcdir)/../man/tkremind.1 $(srcdir)/../man/cm2rem.1
|
$(srcdir)/../man/rem.1
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.SUFFIXES: .c .o
|
.SUFFIXES: .c .o
|
||||||
@@ -44,23 +44,27 @@ test: remind
|
|||||||
@CC@ -c @CFLAGS@ @DEFS@ $(CEXTRA) $(LANGDEF) -I. -I$(srcdir) $<
|
@CC@ -c @CFLAGS@ @DEFS@ $(CEXTRA) $(LANGDEF) -I. -I$(srcdir) $<
|
||||||
|
|
||||||
rem2ps: rem2ps.o dynbuf.o
|
rem2ps: rem2ps.o dynbuf.o
|
||||||
@CC@ @LDFLAGS@ -o rem2ps rem2ps.o dynbuf.o
|
@CC@ @LDFLAGS@ $(LDEXTRA) -o rem2ps rem2ps.o dynbuf.o
|
||||||
|
|
||||||
remind: $(REMINDOBJS)
|
remind: $(REMINDOBJS)
|
||||||
@CC@ @LDFLAGS@ -o remind $(REMINDOBJS) @LIBS@
|
@CC@ @LDFLAGS@ $(LDEXTRA) -o remind $(REMINDOBJS) @LIBS@
|
||||||
|
|
||||||
install: all
|
install-nostripped: all
|
||||||
-mkdir -p $(DESTDIR)$(bindir) || true
|
-mkdir -p $(DESTDIR)$(bindir) || true
|
||||||
for prog in $(PROGS) $(SCRIPTS) ; do \
|
for prog in $(PROGS) $(SCRIPTS) ; do \
|
||||||
$(INSTALL_PROGRAM) $$prog $(DESTDIR)$(bindir) || exit 1; \
|
$(INSTALL_PROGRAM) $$prog $(DESTDIR)$(bindir) || exit 1; \
|
||||||
done
|
done
|
||||||
-strip $(DESTDIR)$(bindir)/remind || true
|
rm -f $(DESTDIR)$(bindir)/rem > /dev/null 2>&1 || true
|
||||||
-strip $(DESTDIR)$(bindir)/rem2ps || true
|
ln -s remind $(DESTDIR)$(bindir)/rem
|
||||||
-mkdir -p $(DESTDIR)$(mandir)/man1 || true
|
-mkdir -p $(DESTDIR)$(mandir)/man1 || true
|
||||||
for man in $(MANS) ; do \
|
for man in $(MANS) ; do \
|
||||||
$(INSTALL_DATA) $$man $(DESTDIR)$(mandir)/man1 || exit 1; \
|
$(INSTALL_DATA) $$man $(DESTDIR)$(mandir)/man1 || exit 1; \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
install: install-nostripped
|
||||||
|
strip $(DESTDIR)$(bindir)/remind || true
|
||||||
|
strip $(DESTDIR)$(bindir)/rem2ps || true
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o *~ core *.bak $(PROGS)
|
rm -f *.o *~ core *.bak $(PROGS)
|
||||||
|
|
||||||
@@ -76,13 +80,13 @@ depend:
|
|||||||
# Build a tar file based on all files checked into git.
|
# Build a tar file based on all files checked into git.
|
||||||
distro:
|
distro:
|
||||||
ln -s . ../remind-$(VERSION)
|
ln -s . ../remind-$(VERSION)
|
||||||
(cd ..; git-ls-files) | sed -e 's/^/remind-$(VERSION)\//' | xargs tar -C .. -cvf remind-$(VERSION).tar
|
(cd ..; git-ls-files -x .gitignore) | sed -e 's/^/remind-$(VERSION)\//' | xargs tar -C .. -cvf remind-$(VERSION).tar
|
||||||
gzip -f -v -9 remind-$(VERSION).tar
|
gzip -f -v -9 remind-$(VERSION).tar
|
||||||
rm -f ../remind-$(VERSION)
|
rm -f ../remind-$(VERSION)
|
||||||
|
|
||||||
beta-tgz:
|
beta-tgz:
|
||||||
ln -s . ../remind-$(VERSION)-BETA-$(BETA)
|
ln -s . ../remind-$(VERSION)-BETA-$(BETA)
|
||||||
(cd ..; git-ls-files) | sed -e 's/^/remind-$(VERSION)-BETA-$(BETA)\//' | xargs tar -C .. -cvf remind-$(VERSION)-BETA-$(BETA).tar
|
(cd ..; git-ls-files -x .gitignore) | sed -e 's/^/remind-$(VERSION)-BETA-$(BETA)\//' | xargs tar -C .. -cvf remind-$(VERSION)-BETA-$(BETA).tar
|
||||||
gzip -f -v -9 remind-$(VERSION)-BETA-$(BETA).tar
|
gzip -f -v -9 remind-$(VERSION)-BETA-$(BETA).tar
|
||||||
rm -f ../remind-$(VERSION)-BETA-$(BETA)
|
rm -f ../remind-$(VERSION)-BETA-$(BETA)
|
||||||
|
|
||||||
|
|||||||
@@ -1,84 +0,0 @@
|
|||||||
# Makefile for REMIND for QDOS / SMSQ
|
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
|
||||||
# THINGS FOR YOU TO EDIT START BELOW
|
|
||||||
#-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
# Uncomment the next lines if you want to use gcc instead of default compiler
|
|
||||||
# NOTE: Tempting as it may be, if you use 'cc' for the C compiler, do not
|
|
||||||
# use 'ld' for the linker. It will probably work much better if you use
|
|
||||||
# LD= cc rather than LD= ld.
|
|
||||||
# QDOS remark: I made it work the following way, and I found it to be working.
|
|
||||||
CC= cc
|
|
||||||
LD= ld
|
|
||||||
|
|
||||||
# Put any additional flags for the C compiler or linker here - if you
|
|
||||||
# are not using gcc, you probably want to remove '-ansi'.
|
|
||||||
# QDOS remark: no -ansi option and no gcc on QDOS / SMSQ
|
|
||||||
CFLAGS= -V -O -DQDOS
|
|
||||||
CDEFS=
|
|
||||||
LDFLAGS= -bufp200K
|
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
|
||||||
# YOU SHOULDN'T EDIT ANYTHING BELOW HERE. You may want to change some things
|
|
||||||
# in config_h; then, you should be able to type 'make'.
|
|
||||||
#-----------------------------------------------------------------------------
|
|
||||||
MATHLIB= -lm
|
|
||||||
|
|
||||||
HDRS= config_h err_h expr_h globals_h protos_h types_h version_h \
|
|
||||||
lang_h english_h german_h dutch_h finnish_h french_h norwgian_h \
|
|
||||||
danish_h polish_h
|
|
||||||
|
|
||||||
STDHDRS= config_h types_h protos_h globals_h err_h lang_h
|
|
||||||
|
|
||||||
LANGHDRS= english_h german_h dutch_h finnish_h french_h norwgian_h danish_h \
|
|
||||||
polish_h
|
|
||||||
|
|
||||||
SRCS= calendar_c dorem_c dosubst_c expr_c files_c funcs_c globals_c hbcal_c \
|
|
||||||
init_c main_c moon_c omit_c sort_c queue_c token_c trigger_c userfns_c \
|
|
||||||
utils_c var_c
|
|
||||||
|
|
||||||
OBJS= calendar_o dorem_o dosubst_o expr_o files_o funcs_o globals_o hbcal_o \
|
|
||||||
init_o main_o moon_o omit_o sort_o queue_o token_o trigger_o userfns_o \
|
|
||||||
utils_o var_o
|
|
||||||
|
|
||||||
all: remind rem2ps
|
|
||||||
|
|
||||||
# _c_o:
|
|
||||||
# $(CC) $(UNIX) $(SYSV) -c $(CFLAGS) $(CDEFS) $*_c
|
|
||||||
|
|
||||||
rem2ps: rem2ps_o
|
|
||||||
# $(CC) $(CFLAGS) rem2ps_c
|
|
||||||
$(LD) $(LDFLAGS) -orem2ps rem2ps_o
|
|
||||||
|
|
||||||
remind: $(OBJS)
|
|
||||||
# $(CC) $(CFLAGS) $(SRCS)
|
|
||||||
$(LD) $(LDFLAGS) -oremind $(OBJS) $(MATHLIB)
|
|
||||||
|
|
||||||
rem2ps_o: rem2ps_c rem2ps_h lang_h config_h
|
|
||||||
calendar_o: calendar_c $(STDHDRS) expr_h
|
|
||||||
dorem_o: dorem_c $(STDHDRS) expr_h
|
|
||||||
dosubst_o: dosubst_c $(STDHDRS) $(LANGHDRS)
|
|
||||||
expr_o: expr_c $(STDHDRS) expr_h
|
|
||||||
files_o: files_c $(STDHDRS)
|
|
||||||
funcs_o: funcs_c $(STDHDRS) expr_h version_h
|
|
||||||
globals_o: globals_c config_h types_h globals_h err_h lang_h $(LANGHDRS)
|
|
||||||
hbcal_o: hbcal_c $(STDHDRS)
|
|
||||||
init_o: init_c $(STDHDRS) expr_h version_h lang_h $(LANGHDRS)
|
|
||||||
main_o: main_c $(STDHDRS) expr_h
|
|
||||||
moon_o: moon_c $(STDHDRS)
|
|
||||||
omit_o: omit_c $(STDHDRS)
|
|
||||||
sort_o: sort_c $(STDHDRS)
|
|
||||||
queue_o: queue_c $(STDHDRS)
|
|
||||||
token_o: token_c $(STDHDRS)
|
|
||||||
trigger_o: trigger_c $(STDHDRS) expr_h
|
|
||||||
userfns_o: userfns_c $(STDHDRS) expr_h
|
|
||||||
utils_o: utils_c $(STDHDRS)
|
|
||||||
var_o: var_c $(STDHDRS) expr_h
|
|
||||||
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *_o *_bak
|
|
||||||
|
|
||||||
clobber:
|
|
||||||
rm -f *_o remind rem2ps test_out *_bak
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
IGNORE=154
|
|
||||||
IGNORE=161
|
|
||||||
IGNORE=100
|
|
||||||
IGNORE=85
|
|
||||||
LINKOPT SC
|
|
||||||
LINKOPT SD
|
|
||||||
LINKOPT NOICONS
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
/***************************************************************/
|
|
||||||
/* */
|
|
||||||
/* AMIGA.C */
|
|
||||||
/* */
|
|
||||||
/* Support functions for AmigaDOS */
|
|
||||||
/* */
|
|
||||||
/* This file is Copyright (C) 1995 by Martin Hohl */
|
|
||||||
/* */
|
|
||||||
/* This file is part of REMIND. */
|
|
||||||
/* Remind is Copyright (C) 1992-1998 by David F. Skoll */
|
|
||||||
/* Copyright (C) 1999-2000 by Roaring Penguin Software Inc. */
|
|
||||||
/* */
|
|
||||||
/***************************************************************/
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include <exec/types.h>
|
|
||||||
#include <dos/dos.h>
|
|
||||||
#include <dos/dosextens.h>
|
|
||||||
|
|
||||||
#include <proto/dos.h>
|
|
||||||
|
|
||||||
#include "version.h" /* Hopefully this will define VERSION as a string */
|
|
||||||
|
|
||||||
#ifdef __SASC_60
|
|
||||||
/* AmigaDOS 2.04 compatible version string for "version" utility */
|
|
||||||
const static char ver_string[] = "$VER: remind "VERSION" "__AMIGADATE__;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void sleep(int dt)
|
|
||||||
{
|
|
||||||
register long Ticks;
|
|
||||||
|
|
||||||
if (dt != 0) {
|
|
||||||
Ticks = 50L * dt;
|
|
||||||
Delay(Ticks);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void execvp(char *name, char **argvec)
|
|
||||||
{
|
|
||||||
char *cmdline;
|
|
||||||
int i,l;
|
|
||||||
|
|
||||||
l = strlen(name)+2;
|
|
||||||
i=1;
|
|
||||||
while (argvec[i] != 0L) {
|
|
||||||
l += strlen(argvec[i])+1;
|
|
||||||
i++;
|
|
||||||
};
|
|
||||||
cmdline = malloc(l+1);
|
|
||||||
if (cmdline == 0L) return;
|
|
||||||
strcpy(cmdline,name);
|
|
||||||
i=1;
|
|
||||||
while (argvec[i] != 0L) {
|
|
||||||
strcat(cmdline," ");
|
|
||||||
strcat(cmdline,argvec[i]);
|
|
||||||
i++;
|
|
||||||
};
|
|
||||||
system(cmdline);
|
|
||||||
free(cmdline);
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
calendar.obj
|
|
||||||
dorem.obj
|
|
||||||
dosubst.obj
|
|
||||||
expr.obj
|
|
||||||
files.obj
|
|
||||||
funcs.obj
|
|
||||||
globals.obj
|
|
||||||
hbcal.obj
|
|
||||||
init.obj
|
|
||||||
main.obj
|
|
||||||
moon.obj
|
|
||||||
omit.obj
|
|
||||||
os2func.obj
|
|
||||||
queue.obj
|
|
||||||
sort.obj
|
|
||||||
token.obj
|
|
||||||
trigger.obj
|
|
||||||
userfns.obj
|
|
||||||
utils.obj
|
|
||||||
var.obj
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
calendar.obj +
|
|
||||||
dorem.obj +
|
|
||||||
dosubst.obj +
|
|
||||||
expr.obj +
|
|
||||||
files.obj +
|
|
||||||
funcs.obj +
|
|
||||||
globals.obj +
|
|
||||||
hbcal.obj +
|
|
||||||
init.obj +
|
|
||||||
main.obj +
|
|
||||||
moon.obj +
|
|
||||||
omit.obj +
|
|
||||||
sort.obj +
|
|
||||||
token.obj +
|
|
||||||
trigger.obj +
|
|
||||||
userfns.obj +
|
|
||||||
utils.obj +
|
|
||||||
var.obj
|
|
||||||
remind.exe
|
|
||||||
nul
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
-eremind.exe
|
|
||||||
calendar.obj
|
|
||||||
dorem.obj
|
|
||||||
dosubst.obj
|
|
||||||
expr.obj
|
|
||||||
files.obj
|
|
||||||
funcs.obj
|
|
||||||
globals.obj
|
|
||||||
hbcal.obj
|
|
||||||
init.obj
|
|
||||||
main.obj
|
|
||||||
moon.obj
|
|
||||||
omit.obj
|
|
||||||
sort.obj
|
|
||||||
token.obj
|
|
||||||
trigger.obj
|
|
||||||
userfns.obj
|
|
||||||
utils.obj
|
|
||||||
var.obj
|
|
||||||
@@ -1,94 +0,0 @@
|
|||||||
# Makefile for REMIND for Borland C++
|
|
||||||
|
|
||||||
MODEL=l
|
|
||||||
|
|
||||||
!if $d(__OS2__)
|
|
||||||
CFLAGS= -DOS2_POPUP -w-pia -O2
|
|
||||||
BINDIR= ..\OS2-EX
|
|
||||||
DELFLAG= /f
|
|
||||||
!else
|
|
||||||
CFLAGS= -w-pia -O2 -m$(MODEL)
|
|
||||||
BINDIR= ..\MSDOS-EX
|
|
||||||
DELFLAG=
|
|
||||||
!endif
|
|
||||||
|
|
||||||
HDRS= config.h err.h expr.h globals.h protos.h types.h version.h \
|
|
||||||
lang.h english.h german.h dutch.h finnish.h french.h norwgian.h \
|
|
||||||
danish.h polish.h
|
|
||||||
|
|
||||||
STDHDRS= config.h types.h protos.h globals.h err.h lang.h
|
|
||||||
|
|
||||||
LANGHDRS= english.h german.h dutch.h finnish.h french.h norwgian.h danish.h \
|
|
||||||
polish.h
|
|
||||||
|
|
||||||
SRCS= calendar.c dorem.c dosubst.c expr.c files.c funcs.c globals.c init.c \
|
|
||||||
main.c omit.c sort.c token.c trigger.c userfns.c utils.c var.c hbcal.c \
|
|
||||||
queue.c moon.c os2func.c
|
|
||||||
|
|
||||||
OBJS=calendar.obj dorem.obj dosubst.obj expr.obj files.obj funcs.obj \
|
|
||||||
globals.obj init.obj main.obj omit.obj sort.obj token.obj trigger.obj \
|
|
||||||
utils.obj userfns.obj var.obj hbcal.obj queue.obj moon.obj os2func.obj
|
|
||||||
|
|
||||||
all: exes test-rem.cmd test-rem.bat
|
|
||||||
test-rem
|
|
||||||
|
|
||||||
clean:
|
|
||||||
-del $(DELFLAG) *.obj
|
|
||||||
-del $(DELFLAG) $(BINDIR)\*.exe
|
|
||||||
|
|
||||||
exes: $(BINDIR)\remind.exe $(BINDIR)\rem2ps.exe
|
|
||||||
|
|
||||||
..\os2-ex\remind.exe: $(OBJS)
|
|
||||||
bcc -e..\os2-ex\remind @lnk.bcc -lap;Toe
|
|
||||||
|
|
||||||
..\msdos-ex\remind.exe: $(OBJS)
|
|
||||||
bcc -e..\msdos-ex\remind -m$(MODEL) @lnk.bcc
|
|
||||||
|
|
||||||
..\os2-ex\rem2ps.exe: rem2ps.obj
|
|
||||||
bcc -e..\os2-ex\rem2ps rem2ps.obj -lap;Toe
|
|
||||||
|
|
||||||
..\msdos-ex\rem2ps.exe: rem2ps.obj
|
|
||||||
bcc -e..\msdos-ex\rem2ps -m$(MODEL) rem2ps.obj
|
|
||||||
|
|
||||||
.c.obj:
|
|
||||||
bcc $(CFLAGS) -c {$< }
|
|
||||||
|
|
||||||
rem2ps.obj: rem2ps.c rem2ps.h config.h lang.h
|
|
||||||
|
|
||||||
calendar.obj: calendar.c $(STDHDRS) expr.h
|
|
||||||
|
|
||||||
dorem.obj: dorem.c $(STDHDRS) expr.h
|
|
||||||
|
|
||||||
dosubst.obj: dosubst.c $(STDHDRS) $(LANGHDRS)
|
|
||||||
|
|
||||||
expr.obj: expr.c $(STDHDRS) expr.h
|
|
||||||
|
|
||||||
files.obj: files.c $(STDHDRS)
|
|
||||||
|
|
||||||
funcs.obj: funcs.c $(STDHDRS) expr.h version.h
|
|
||||||
|
|
||||||
globals.obj: globals.c config.h types.h globals.h err.h lang.h
|
|
||||||
|
|
||||||
init.obj: init.c $(STDHDRS) expr.h version.h
|
|
||||||
|
|
||||||
main.obj: main.c $(STDHDRS) expr.h
|
|
||||||
|
|
||||||
moon.obj: moon.c $(STDHDRS) expr.h
|
|
||||||
|
|
||||||
omit.obj: omit.c $(STDHDRS)
|
|
||||||
|
|
||||||
os2func.obj: os2func.c $(STDHDRS)
|
|
||||||
|
|
||||||
queue.obj: queue.c $(STDHDRS)
|
|
||||||
|
|
||||||
sort.obj: sort.c $(STDHDRS)
|
|
||||||
|
|
||||||
token.obj: token.c $(STDHDRS)
|
|
||||||
|
|
||||||
trigger.obj: trigger.c $(STDHDRS) expr.h
|
|
||||||
|
|
||||||
userfns.obj: userfns.c $(STDHDRS) expr.h
|
|
||||||
|
|
||||||
utils.obj: utils.c $(STDHDRS)
|
|
||||||
|
|
||||||
var.obj: var.c $(STDHDRS) expr.h
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
# Makefile for REMIND for Microsoft C for MSDOS
|
|
||||||
|
|
||||||
OBJS= calendar.obj dorem.obj dosubst.obj expr.obj files.obj funcs.obj \
|
|
||||||
globals.obj init.obj main.obj omit.obj token.obj trigger.obj userfns.obj \
|
|
||||||
utils.obj var.obj sort.obj hbcal.obj moon.obj
|
|
||||||
|
|
||||||
DEFINES= /D__MSDOS__ /D__MSC__
|
|
||||||
|
|
||||||
MODEL= /AM
|
|
||||||
|
|
||||||
calendar.obj: calendar.c
|
|
||||||
cl /c $(DEFINES) $(MODEL) /Focalendar.obj calendar.c
|
|
||||||
|
|
||||||
dorem.obj: dorem.c
|
|
||||||
cl /c $(DEFINES) $(MODEL) /Fodorem.obj dorem.c
|
|
||||||
|
|
||||||
dosubst.obj: dosubst.c
|
|
||||||
cl /c $(DEFINES) $(MODEL) /Fodosubst.obj dosubst.c
|
|
||||||
|
|
||||||
expr.obj: expr.c
|
|
||||||
cl /c $(DEFINES) $(MODEL) /Foexpr.obj expr.c
|
|
||||||
|
|
||||||
hbcal.obj: hbcal.c
|
|
||||||
cl /c $(DEFINES) $(MODEL) /Fohbcal.obj hbcal.c
|
|
||||||
|
|
||||||
sort.obj: sort.c
|
|
||||||
cl /c $(DEFINES) $(MODEL) /Fosort.obj sort.c
|
|
||||||
|
|
||||||
files.obj: files.c
|
|
||||||
cl /c $(DEFINES) $(MODEL) /Fofiles.obj files.c
|
|
||||||
|
|
||||||
funcs.obj: funcs.c
|
|
||||||
cl /c $(DEFINES) $(MODEL) /Fofuncs.obj funcs.c
|
|
||||||
|
|
||||||
globals.obj: globals.c
|
|
||||||
cl /c $(DEFINES) $(MODEL) /Foglobals.obj globals.c
|
|
||||||
|
|
||||||
init.obj: init.c
|
|
||||||
cl /c $(DEFINES) $(MODEL) /Foinit.obj init.c
|
|
||||||
|
|
||||||
main.obj: main.c
|
|
||||||
cl /c $(DEFINES) $(MODEL) /Fomain.obj main.c
|
|
||||||
|
|
||||||
moon.obj: moon.c
|
|
||||||
cl /c $(DEFINES) $(MODEL) /Fomoon.obj moon.c
|
|
||||||
|
|
||||||
omit.obj: omit.c
|
|
||||||
cl /c $(DEFINES) $(MODEL) /Foomit.obj omit.c
|
|
||||||
|
|
||||||
token.obj: token.c
|
|
||||||
cl /c $(DEFINES) $(MODEL) /Fotoken.obj token.c
|
|
||||||
|
|
||||||
trigger.obj: trigger.c
|
|
||||||
cl /c $(DEFINES) $(MODEL) /Fotrigger.obj trigger.c
|
|
||||||
|
|
||||||
userfns.obj: userfns.c
|
|
||||||
cl /c $(DEFINES) $(MODEL) /Fouserfns.obj userfns.c
|
|
||||||
|
|
||||||
utils.obj: utils.c
|
|
||||||
cl /c $(DEFINES) $(MODEL) /Foutils.obj utils.c
|
|
||||||
|
|
||||||
var.obj: var.c
|
|
||||||
cl /c $(DEFINES) $(MODEL) /Fovar.obj var.c
|
|
||||||
|
|
||||||
remind.exe: $(OBJS)
|
|
||||||
link /NOI @lnk.msc
|
|
||||||
|
|
||||||
rem2ps.obj: rem2ps.c
|
|
||||||
cl /c $(DEFINES) $(MODEL) /Forem2ps.obj rem2ps.c
|
|
||||||
|
|
||||||
rem2ps.exe: rem2ps.obj
|
|
||||||
link /NOI rem2ps,rem2ps.exe,,,
|
|
||||||
|
|
||||||
@@ -1,120 +0,0 @@
|
|||||||
# Makefile for REMIND
|
|
||||||
#
|
|
||||||
# THIS IS OUT OF DATE!
|
|
||||||
#
|
|
||||||
# - for GNU gcc (emx 0.8g kit) [executables for OS/2 2.x or DOS (32-bit)]
|
|
||||||
# - for Microsoft C 6.00A [executables for OS/2 or MSDOS (16-bit)]
|
|
||||||
|
|
||||||
# To use, enter "make -f Makefile.os2" (this makefile depends on its
|
|
||||||
# name being "Makefile.os2").
|
|
||||||
#
|
|
||||||
# Tested with dmake 3.8 and GNU make 3.68 under OS/2
|
|
||||||
|
|
||||||
default:
|
|
||||||
@echo "Enter $(MAKE) -f Makefile.os2 target "
|
|
||||||
@echo " where 'target' is chosen from "
|
|
||||||
@echo " msc OS/2 exe [Microsoft C 6.00a] "
|
|
||||||
@echo " mscbnd OS/2 and DOS exe [Microsoft C 6.00a] "
|
|
||||||
@echo " emx OS/2 and DOS 32-bit exe [EMX/gcc] "
|
|
||||||
@echo " emxomf OS/2 32-bit exe w/DLL C library [EMX/gcc] "
|
|
||||||
|
|
||||||
|
|
||||||
msc:
|
|
||||||
$(MAKE) -f Makefile.os2 all \
|
|
||||||
CC="cl -nologo -AM" O=".obj" \
|
|
||||||
CFLAGS="-D__STDC__ -D__OS2__" \
|
|
||||||
LFLAGS="-Lp" \
|
|
||||||
LFLAGS2="setargv.obj remind.def -link /NOE"
|
|
||||||
|
|
||||||
mscbnd:
|
|
||||||
$(MAKE) -f Makefile.os2 all \
|
|
||||||
CC="cl -nologo -AM" O=".obj" \
|
|
||||||
CFLAGS="-D__STDC__ -D__OS2__ -D__MSDOS__" \
|
|
||||||
LFLAGS="-Lp" LBIND="-Fb" \
|
|
||||||
LFLAGS2="setargv.obj remind.def -link /NOE" \
|
|
||||||
BIND="bind remind /n DOSMAKEPIPE DOSCWAIT VIOENDPOPUP VIOPOPUP"
|
|
||||||
|
|
||||||
emx:
|
|
||||||
$(MAKE) -f Makefile.os2 all \
|
|
||||||
CC="gcc -O -s" O=".o" \
|
|
||||||
CFLAGS="-D__OS2__ -D__MSDOS__" \
|
|
||||||
LFLAGS=""
|
|
||||||
|
|
||||||
emxomf:
|
|
||||||
$(MAKE) -f Makefile.os2 all \
|
|
||||||
CC="gcc -Zomf -O -s" O=".obj" \
|
|
||||||
CFLAGS="-D__OS2__" \
|
|
||||||
LFLAGS="-Zcrtdll -Zstack 32" \
|
|
||||||
LFLAGS2="remind.def"
|
|
||||||
|
|
||||||
|
|
||||||
# OS2_POPUP enables Russ Herman's popup reminders
|
|
||||||
#OS2_POPUP =
|
|
||||||
OS2_POPUP = -DOS2_POPUP
|
|
||||||
|
|
||||||
HDRS= config.h err.h expr.h globals.h protos.h types.h version.h \
|
|
||||||
lang.h english.h german.h dutch.h finnish.h french.h norwgian.h \
|
|
||||||
danish.h polish.h
|
|
||||||
|
|
||||||
STDHDRS= config.h types.h protos.h globals.h err.h lang.h
|
|
||||||
|
|
||||||
LANGHDRS= english.h german.h dutch.h finnish.h french.h norwgian.h danish.h \
|
|
||||||
polish.h
|
|
||||||
|
|
||||||
SRCS= calendar.c dorem.c dosubst.c expr.c files.c funcs.c globals.c hbcal.c \
|
|
||||||
init.c main.c moon.c omit.c sort.c queue.c token.c trigger.c userfns.c \
|
|
||||||
utils.c var.c os2func.c
|
|
||||||
|
|
||||||
MANIFEST= README.UNIX README.DOS COPYRIGHT $(HDRS) $(SRCS) Makefile rem rem.1 \
|
|
||||||
remind.1 remind-all.csh remind-all.sh test.rem test-rem test.cmp makefile.tc \
|
|
||||||
makefile.msc lnk.msc lnk.tc MANIFEST.UNX MANIFEST.DOS WHATSNEW.30 kall kall.1 \
|
|
||||||
defs.rem README.OS2 makefile.os2 rem2ps.c rem2ps.h remind.def rem2ps.1 \
|
|
||||||
tstlang.rem README.BCC lnk.bcc makefile.bcc os2func.c \
|
|
||||||
test-rem.bat test-rem.cmd test1.cmp test2.cmp
|
|
||||||
|
|
||||||
|
|
||||||
OBJS= $(SRCS:.c=$O)
|
|
||||||
|
|
||||||
all: remind.exe rem2ps.exe
|
|
||||||
|
|
||||||
.SUFFIXES: $O
|
|
||||||
|
|
||||||
.c$O:
|
|
||||||
$(CC) -c $(CFLAGS) $(OS2_POPUP) $*.c
|
|
||||||
|
|
||||||
rem2ps.exe: rem2ps$O
|
|
||||||
$(CC) $(LFLAGS) $(LBIND) -o $@ rem2ps$O $(LFLAGS2)
|
|
||||||
|
|
||||||
remind.exe: $(OBJS)
|
|
||||||
$(CC) $(LFLAGS) -o $@ $(OBJS) $(LFLAGS2)
|
|
||||||
$(BIND)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.o *.obj *~ core *.bak
|
|
||||||
|
|
||||||
clobber:
|
|
||||||
rm -f *.o *.obj *~ remind.exe rem2ps.exe test.out core *.bak
|
|
||||||
|
|
||||||
test:
|
|
||||||
test-rem.cmd
|
|
||||||
|
|
||||||
rem2ps$O: rem2ps.c rem2ps.h lang.h config.h
|
|
||||||
calendar$O: calendar.c $(STDHDRS) expr.h
|
|
||||||
dorem$O: dorem.c $(STDHDRS) expr.h
|
|
||||||
dosubst$O: dosubst.c $(STDHDRS) $(LANGHDRS)
|
|
||||||
expr$O: expr.c $(STDHDRS) expr.h
|
|
||||||
files$O: files.c $(STDHDRS)
|
|
||||||
funcs$O: funcs.c $(STDHDRS) expr.h version.h
|
|
||||||
globals$O: globals.c config.h types.h globals.h err.h lang.h $(LANGHDRS)
|
|
||||||
hbcal$O: hbcal.c $(STDHDRS)
|
|
||||||
init$O: init.c $(STDHDRS) expr.h version.h $(LANGHDRS)
|
|
||||||
main$O: main.c $(STDHDRS) expr.h
|
|
||||||
moon$O: moon.c $(STDHDRS)
|
|
||||||
omit$O: omit.c $(STDHDRS)
|
|
||||||
sort$O: sort.c $(STDHDRS)
|
|
||||||
queue$O: queue.c $(STDHDRS)
|
|
||||||
token$O: token.c $(STDHDRS)
|
|
||||||
trigger$O: trigger.c $(STDHDRS) expr.h
|
|
||||||
userfns$O: userfns.c $(STDHDRS) expr.h
|
|
||||||
utils$O: utils.c $(STDHDRS)
|
|
||||||
var$O: var.c $(STDHDRS) expr.h
|
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
# Makefile for REMIND for Turbo C for MSDOS
|
|
||||||
|
|
||||||
CC= tcc
|
|
||||||
|
|
||||||
HDRS= config.h err.h expr.h globals.h protos.h types.h version.h \
|
|
||||||
lang.h english.h german.h dutch.h finnish.h french.h norwgian.h \
|
|
||||||
danish.h polish.h
|
|
||||||
|
|
||||||
STDHDRS= config.h types.h protos.h globals.h err.h lang.h
|
|
||||||
|
|
||||||
LANGHDRS= english.h german.h dutch.h finnish.h french.h norwgian.h danish.h \
|
|
||||||
polish.h
|
|
||||||
|
|
||||||
SRCS= calendar.c dorem.c dosubst.c expr.c files.c funcs.c globals.c init.c \
|
|
||||||
moon.c main.c omit.c sort.c token.c trigger.c userfns.c utils.c var.c hbcal.c
|
|
||||||
|
|
||||||
OBJS=calendar.obj dorem.obj dosubst.obj expr.obj files.obj funcs.obj \
|
|
||||||
globals.obj init.obj main.obj omit.obj sort.obj token.obj trigger.obj \
|
|
||||||
utils.obj userfns.obj var.obj hbcal.obj
|
|
||||||
|
|
||||||
all: remind.exe rem2ps.exe
|
|
||||||
|
|
||||||
remind.exe: $(OBJS)
|
|
||||||
$(CC) @lnk.tc
|
|
||||||
|
|
||||||
rem2ps.exe: rem2ps.obj
|
|
||||||
$(CC) -erem2ps.exe rem2ps.obj
|
|
||||||
|
|
||||||
.c.obj:
|
|
||||||
$(CC) -w-pia -c -O -mm {$< }
|
|
||||||
|
|
||||||
rem2ps.obj: rem2ps.c rem2ps.h config.h lang.h
|
|
||||||
|
|
||||||
calendar.obj: calendar.c $(STDHDRS) expr.h
|
|
||||||
|
|
||||||
dorem.obj: dorem.c $(STDHDRS) expr.h
|
|
||||||
|
|
||||||
dosubst.obj: dosubst.c $(STDHDRS) $(LANGHDRS)
|
|
||||||
|
|
||||||
expr.obj: expr.c $(STDHDRS) expr.h
|
|
||||||
|
|
||||||
files.obj: files.c $(STDHDRS)
|
|
||||||
|
|
||||||
funcs.obj: funcs.c $(STDHDRS) expr.h version.h
|
|
||||||
|
|
||||||
globals.obj: globals.c config.h types.h globals.h err.h lang.h
|
|
||||||
|
|
||||||
init.obj: init.c $(STDHDRS) expr.h version.h
|
|
||||||
|
|
||||||
main.obj: main.c $(STDHDRS) expr.h
|
|
||||||
|
|
||||||
moon.obj: moon.c $(STDHDRS) expr.h
|
|
||||||
|
|
||||||
omit.obj: omit.c $(STDHDRS)
|
|
||||||
|
|
||||||
sort.obj: sort.c $(STDHDRS)
|
|
||||||
|
|
||||||
token.obj: token.c $(STDHDRS)
|
|
||||||
|
|
||||||
trigger.obj: trigger.c $(STDHDRS) expr.h
|
|
||||||
|
|
||||||
userfns.obj: userfns.c $(STDHDRS) expr.h
|
|
||||||
|
|
||||||
utils.obj: utils.c $(STDHDRS)
|
|
||||||
|
|
||||||
var.obj: var.c $(STDHDRS) expr.h
|
|
||||||
@@ -1,158 +0,0 @@
|
|||||||
/***************************************************************/
|
|
||||||
/* */
|
|
||||||
/* OS2FUNC.C */
|
|
||||||
/* */
|
|
||||||
/* Functions to support OS/2. */
|
|
||||||
/* */
|
|
||||||
/* This file is part of REMIND. */
|
|
||||||
/* */
|
|
||||||
/* This file is Copyright (C) 1993 by Russ Herman. */
|
|
||||||
/* REMIND is Copyright (C) 1992-1998 by David F. Skoll */
|
|
||||||
/* Copyright (C) 1999-2000 by Roaring Penguin Software Inc. */
|
|
||||||
/* */
|
|
||||||
/***************************************************************/
|
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#ifdef OS2_POPUP
|
|
||||||
#define INCL_VIO
|
|
||||||
#define INCL_KBD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define INCL_DOSPROCESS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(OS2_POPUP) || defined(_MSC_VER)
|
|
||||||
#include <os2.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef OS2_POPUP
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#ifdef OS2DBG
|
|
||||||
#include <dos.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#endif
|
|
||||||
#include "globals.h"
|
|
||||||
|
|
||||||
/* EMX defines PS_TYPE, so we undefine it here to avoid
|
|
||||||
a redefinition warning when we include "types.h" */
|
|
||||||
#ifdef PS_TYPE
|
|
||||||
#undef PS_TYPE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "types.h"
|
|
||||||
#include "protos.h"
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
typedef USHORT APIRET;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static APIRET apiret = 0;
|
|
||||||
static KBDKEYINFO kbci;
|
|
||||||
static char *pszPressAny = "\r\nPress any key to continue";
|
|
||||||
static USHORT pflags = VP_WAIT; /* | VP_TRANSPARENT; */
|
|
||||||
static HKBD hkbd = 0;
|
|
||||||
static char VioSubstBuffer[SHELLSIZE + 1];
|
|
||||||
|
|
||||||
void StartPopUp()
|
|
||||||
{
|
|
||||||
if (OS2MODE)
|
|
||||||
if (!(DebugFlag & DB_ECHO_LINE))
|
|
||||||
VioPopUp(&pflags, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void EndPopUp()
|
|
||||||
{
|
|
||||||
if (DebugFlag & DB_ECHO_LINE)
|
|
||||||
return;
|
|
||||||
if (OS2MODE) {
|
|
||||||
VioWrtTTY(pszPressAny, strlen(pszPressAny), 0);
|
|
||||||
KbdCharIn(&kbci, IO_WAIT, hkbd);
|
|
||||||
VioEndPopUp(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int PutsPopUp(char *s)
|
|
||||||
{
|
|
||||||
char c, *os = VioSubstBuffer;
|
|
||||||
|
|
||||||
if (DebugFlag & DB_ECHO_LINE)
|
|
||||||
printf("%s", s);
|
|
||||||
else {
|
|
||||||
do {
|
|
||||||
/* Convert \n to \r\n in auxiliary buffer for VIO */
|
|
||||||
if ((c= *s++) == '\n')
|
|
||||||
*os++ = '\r';
|
|
||||||
*os++ = c;
|
|
||||||
} while (c > 0);
|
|
||||||
VioWrtTTY(VioSubstBuffer, strlen(VioSubstBuffer), 0);
|
|
||||||
}
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
int PutlPopUp(char *s)
|
|
||||||
{
|
|
||||||
StartPopUp();
|
|
||||||
PutsPopUp(s);
|
|
||||||
if (DebugFlag & DB_ECHO_LINE)
|
|
||||||
fputc('\n', stdout);
|
|
||||||
else
|
|
||||||
VioWrtTTY("\r\n", 2, 0);
|
|
||||||
EndPopUp();
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int PutcPopUp(int c)
|
|
||||||
{
|
|
||||||
char *s = " ";
|
|
||||||
|
|
||||||
if (DebugFlag & DB_ECHO_LINE)
|
|
||||||
fputc(c, stdout);
|
|
||||||
else {
|
|
||||||
switch (c) {
|
|
||||||
case '\n':
|
|
||||||
VioWrtTTY("\r\n", 2, 0);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
s[0] = c;
|
|
||||||
VioWrtTTY(s, 1, 0);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef OS2DBG
|
|
||||||
#define DB_ECHO_LINE 16
|
|
||||||
int DebugFlag = 0;
|
|
||||||
void main(/* int argc, char **argv */)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
ret = os2fputs("Test VIO PopUp Writing");
|
|
||||||
if (ret)
|
|
||||||
fprintf(stderr, "Test VIO PopUP Writing returned %d %ld",
|
|
||||||
ret, apiret);
|
|
||||||
exit(ret);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
unsigned sleep(unsigned sec)
|
|
||||||
{
|
|
||||||
return DosSleep(sec * 1000L);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef __EMX__
|
|
||||||
int fork()
|
|
||||||
{
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
NAME WINDOWCOMPAT NEWFILES
|
|
||||||
@@ -1,93 +0,0 @@
|
|||||||
# Makefile for REMIND, suitable for SAS/C 6.50 under AmigaDOS
|
|
||||||
# English version
|
|
||||||
# THIS IS OUT OF DATE!
|
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
|
||||||
# THINGS FOR YOU TO EDIT START BELOW
|
|
||||||
#-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
# Uncomment the next line if you are running on a SYSV system
|
|
||||||
# SYSV= -DSYSV
|
|
||||||
|
|
||||||
# Uncomment the next line if you are running under UNIX (including SYSV!)
|
|
||||||
#UNIX= -DUNIX
|
|
||||||
|
|
||||||
# Uncomment the next lines if you want to use gcc instead of default compiler
|
|
||||||
# NOTE: Tempting as it may be, if you use 'cc' for the C compiler, do not
|
|
||||||
# use 'ld' for the linker. It will probably work much better if you use
|
|
||||||
# LD= cc rather than LD= ld.
|
|
||||||
CC= SC
|
|
||||||
LD= SC
|
|
||||||
|
|
||||||
# Put any additional flags for the C compiler or linker here - if you
|
|
||||||
# are not using gcc, you probably want to remove '-ansi'.
|
|
||||||
CFLAGS= OPT NOSTKCHK NOSINT MATH=IEEE
|
|
||||||
CDEFS=
|
|
||||||
LDFLAGS= LINK
|
|
||||||
|
|
||||||
HDRS= config.h err.h expr.h globals.h protos.h types.h version.h \
|
|
||||||
lang.h english.h german.h dutch.h finnish.h french.h norwgian.h
|
|
||||||
|
|
||||||
STDHDRS= config.h types.h protos.h globals.h err.h lang.h
|
|
||||||
|
|
||||||
LANGHDRS= english.h german.h dutch.h finnish.h french.h norwgian.h
|
|
||||||
|
|
||||||
SRCS= calendar.c dorem.c dosubst.c expr.c files.c funcs.c globals.c hbcal.c \
|
|
||||||
init.c main.c moon.c omit.c sort.c queue.c token.c trigger.c userfns.c \
|
|
||||||
utils.c var.c amiga.c
|
|
||||||
|
|
||||||
OBJS= calendar.o dorem.o dosubst.o expr.o files.o funcs.o globals.o hbcal.o \
|
|
||||||
init.o main.o moon.o omit.o sort.o queue.o token.o trigger.o userfns.o \
|
|
||||||
utils.o var.o amiga.o
|
|
||||||
|
|
||||||
MANIFEST= README.UNIX README.DOS COPYRIGHT $(HDRS) $(SRCS) Makefile rem rem.1 \
|
|
||||||
remind.1 remind-all.csh remind-all.sh test.rem test-rem test.cmp makefile.tc \
|
|
||||||
makefile.msc lnk.msc lnk.tc MANIFEST.UNX MANIFEST.DOS WHATSNEW.30 kall kall.1 \
|
|
||||||
defs.rem README.OS2 makefile.os2 rem2ps.c rem2ps.h remind.def rem2ps.1 \
|
|
||||||
tstlang.rem README.BCC lnk.bcc makefile.bcc os2func.c \
|
|
||||||
test-rem.bat test-rem.cmd test1.cmp test2.cmp
|
|
||||||
|
|
||||||
|
|
||||||
all: remind rem2ps
|
|
||||||
|
|
||||||
.c.o:
|
|
||||||
$(CC) $(UNIX) $(SYSV) $(CFLAGS) $(CDEFS) $*.c
|
|
||||||
|
|
||||||
rem2ps: rem2ps.o
|
|
||||||
$(LD) MATH=IEEE $(LDFLAGS) PNAME=rem2ps rem2ps.o
|
|
||||||
|
|
||||||
remind: $(OBJS)
|
|
||||||
$(LD) MATH=IEEE $(LDFLAGS) PNAME=remind $(OBJS)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.o *~ core *.bak
|
|
||||||
|
|
||||||
clobber:
|
|
||||||
rm -f *.o *~ remind rem2ps test.out core *.bak
|
|
||||||
|
|
||||||
test: remind
|
|
||||||
sh test-rem
|
|
||||||
|
|
||||||
rem2ps.o: rem2ps.c rem2ps.h lang.h config.h
|
|
||||||
calendar.o: calendar.c $(STDHDRS) expr.h
|
|
||||||
dorem.o: dorem.c $(STDHDRS) expr.h
|
|
||||||
dosubst.o: dosubst.c $(STDHDRS) $(LANGHDRS)
|
|
||||||
expr.o: expr.c $(STDHDRS) expr.h
|
|
||||||
files.o: files.c $(STDHDRS)
|
|
||||||
funcs.o: funcs.c $(STDHDRS) expr.h version.h
|
|
||||||
globals.o: globals.c config.h types.h globals.h err.h lang.h $(LANGHDRS)
|
|
||||||
hbcal.o: hbcal.c $(STDHDRS)
|
|
||||||
init.o: init.c $(STDHDRS) expr.h version.h lang.h $(LANGHDRS)
|
|
||||||
main.o: main.c $(STDHDRS) expr.h
|
|
||||||
moon.o: moon.c $(STDHDRS)
|
|
||||||
omit.o: omit.c $(STDHDRS)
|
|
||||||
sort.o: sort.c $(STDHDRS)
|
|
||||||
queue.o: queue.c $(STDHDRS)
|
|
||||||
token.o: token.c $(STDHDRS)
|
|
||||||
trigger.o: trigger.c $(STDHDRS) expr.h
|
|
||||||
userfns.o: userfns.c $(STDHDRS) expr.h
|
|
||||||
utils.o: utils.c $(STDHDRS)
|
|
||||||
var.o: var.c $(STDHDRS) expr.h
|
|
||||||
|
|
||||||
amiga.o: amiga.c
|
|
||||||
$(CC) OBJNAME=amiga.o $(CFLAGS) amiga.c
|
|
||||||
130
src/calendar.c
@@ -41,7 +41,6 @@ typedef struct cal_entry {
|
|||||||
|
|
||||||
/* Global variables */
|
/* Global variables */
|
||||||
static CalEntry *CalColumn[7];
|
static CalEntry *CalColumn[7];
|
||||||
static CalEntry *CalPs[7];
|
|
||||||
|
|
||||||
static int ColSpaces;
|
static int ColSpaces;
|
||||||
|
|
||||||
@@ -588,13 +587,13 @@ static int DoCalRem(ParsePtr p, int col)
|
|||||||
int r;
|
int r;
|
||||||
int jul;
|
int jul;
|
||||||
CalEntry *CurCol = CalColumn[col];
|
CalEntry *CurCol = CalColumn[col];
|
||||||
CalEntry *CurPs = CalPs[col];
|
|
||||||
CalEntry *e;
|
CalEntry *e;
|
||||||
char *s, *s2;
|
char *s, *s2;
|
||||||
DynamicBuffer buf, obuf;
|
DynamicBuffer buf, obuf, pre_buf;
|
||||||
Token tok;
|
Token tok;
|
||||||
|
|
||||||
DBufInit(&buf);
|
DBufInit(&buf);
|
||||||
|
DBufInit(&pre_buf);
|
||||||
|
|
||||||
/* Parse the trigger date and time */
|
/* Parse the trigger date and time */
|
||||||
if ( (r=ParseRem(p, &trig, &tim)) ) return r;
|
if ( (r=ParseRem(p, &trig, &tim)) ) return r;
|
||||||
@@ -638,27 +637,30 @@ static int DoCalRem(ParsePtr p, int col)
|
|||||||
strcpy(trig.passthru, "PSFile");
|
strcpy(trig.passthru, "PSFile");
|
||||||
trig.typ = PASSTHRU_TYPE;
|
trig.typ = PASSTHRU_TYPE;
|
||||||
}
|
}
|
||||||
if (!PsCal) {
|
if (trig.typ == PASSTHRU_TYPE) {
|
||||||
if (trig.typ == PASSTHRU_TYPE) {
|
if (!PsCal && strcmp(trig.passthru, "COLOR")) return OK;
|
||||||
if (strcmp(trig.passthru, "COLOR")) return OK;
|
if (!strcmp(trig.passthru, "COLOR")) {
|
||||||
/* Strip off the three color numbers */
|
/* Strip off the three color numbers */
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
r=ParseToken(p, &buf);
|
r=ParseToken(p, &buf);
|
||||||
DBufFree(&buf);
|
DBufPuts(&pre_buf, DBufValue(&buf));
|
||||||
if (r) return r;
|
DBufPutc(&pre_buf, ' ');
|
||||||
r=ParseToken(p, &buf);
|
DBufFree(&buf);
|
||||||
DBufFree(&buf);
|
if (r) return r;
|
||||||
if (r) return r;
|
r=ParseToken(p, &buf);
|
||||||
r=ParseToken(p, &buf);
|
DBufPuts(&pre_buf, DBufValue(&buf));
|
||||||
DBufFree(&buf);
|
DBufPutc(&pre_buf, ' ');
|
||||||
if (r) return r;
|
DBufFree(&buf);
|
||||||
}
|
if (r) return r;
|
||||||
}
|
r=ParseToken(p, &buf);
|
||||||
|
DBufPuts(&pre_buf, DBufValue(&buf));
|
||||||
/* Remove any "at" times from PS or PSFILE reminders */
|
DBufPutc(&pre_buf, ' ');
|
||||||
if (trig.typ == PASSTHRU_TYPE && strcmp(trig.passthru, "COLOR")) {
|
DBufFree(&buf);
|
||||||
tim.ttime = NO_TIME;
|
if (r) return r;
|
||||||
tim.duration = NO_TIME;
|
if (!PsCal && !DoSimpleCalendar) {
|
||||||
|
DBufFree(&pre_buf);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If trigger date == today, add it to the current entry */
|
/* If trigger date == today, add it to the current entry */
|
||||||
@@ -670,15 +672,19 @@ static int DoCalRem(ParsePtr p, int col)
|
|||||||
NumTriggered++;
|
NumTriggered++;
|
||||||
|
|
||||||
if (DoSimpleCalendar || tim.ttime != NO_TIME) {
|
if (DoSimpleCalendar || tim.ttime != NO_TIME) {
|
||||||
/* Suppress time if it's not today */
|
/* Suppress time if it's not today or if it's a non-COLOR special */
|
||||||
if (jul != JulianToday) {
|
if (jul != JulianToday ||
|
||||||
|
(trig.typ == PASSTHRU_TYPE &&
|
||||||
|
strcmp(trig.passthru, "COLOR"))) {
|
||||||
if (DBufPuts(&obuf, SimpleTime(NO_TIME)) != OK) {
|
if (DBufPuts(&obuf, SimpleTime(NO_TIME)) != OK) {
|
||||||
DBufFree(&obuf);
|
DBufFree(&obuf);
|
||||||
|
DBufFree(&pre_buf);
|
||||||
return E_NO_MEM;
|
return E_NO_MEM;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (DBufPuts(&obuf, SimpleTime(tim.ttime)) != OK) {
|
if (DBufPuts(&obuf, SimpleTime(tim.ttime)) != OK) {
|
||||||
DBufFree(&obuf);
|
DBufFree(&obuf);
|
||||||
|
DBufFree(&pre_buf);
|
||||||
return E_NO_MEM;
|
return E_NO_MEM;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -694,6 +700,7 @@ static int DoCalRem(ParsePtr p, int col)
|
|||||||
if (DBufPuts(&obuf, v.v.str) != OK) {
|
if (DBufPuts(&obuf, v.v.str) != OK) {
|
||||||
DestroyValue(v);
|
DestroyValue(v);
|
||||||
DBufFree(&obuf);
|
DBufFree(&obuf);
|
||||||
|
DBufFree(&pre_buf);
|
||||||
return E_NO_MEM;
|
return E_NO_MEM;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -710,11 +717,13 @@ static int DoCalRem(ParsePtr p, int col)
|
|||||||
r = DoSubst(p, &obuf, &trig, &tim, jul, CAL_MODE);
|
r = DoSubst(p, &obuf, &trig, &tim, jul, CAL_MODE);
|
||||||
}
|
}
|
||||||
if (r) {
|
if (r) {
|
||||||
|
DBufFree(&pre_buf);
|
||||||
DBufFree(&obuf);
|
DBufFree(&obuf);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
if (DBufLen(&obuf) <= oldLen) {
|
if (DBufLen(&obuf) <= oldLen) {
|
||||||
DBufFree(&obuf);
|
DBufFree(&obuf);
|
||||||
|
DBufFree(&pre_buf);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
if (trig.typ != PASSTHRU_TYPE &&
|
if (trig.typ != PASSTHRU_TYPE &&
|
||||||
@@ -728,6 +737,7 @@ static int DoCalRem(ParsePtr p, int col)
|
|||||||
if (DBufPuts(&obuf, v.v.str) != OK) {
|
if (DBufPuts(&obuf, v.v.str) != OK) {
|
||||||
DestroyValue(v);
|
DestroyValue(v);
|
||||||
DBufFree(&obuf);
|
DBufFree(&obuf);
|
||||||
|
DBufFree(&pre_buf);
|
||||||
return E_NO_MEM;
|
return E_NO_MEM;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -736,13 +746,17 @@ static int DoCalRem(ParsePtr p, int col)
|
|||||||
}
|
}
|
||||||
s = DBufValue(&obuf);
|
s = DBufValue(&obuf);
|
||||||
if (!DoSimpleCalendar) while (isspace(*s)) s++;
|
if (!DoSimpleCalendar) while (isspace(*s)) s++;
|
||||||
|
DBufPuts(&pre_buf, s);
|
||||||
|
s = DBufValue(&pre_buf);
|
||||||
e = NEW(CalEntry);
|
e = NEW(CalEntry);
|
||||||
if (!e) {
|
if (!e) {
|
||||||
DBufFree(&obuf);
|
DBufFree(&obuf);
|
||||||
|
DBufFree(&pre_buf);
|
||||||
return E_NO_MEM;
|
return E_NO_MEM;
|
||||||
}
|
}
|
||||||
e->text = StrDup(s);
|
e->text = StrDup(s);
|
||||||
DBufFree(&obuf);
|
DBufFree(&obuf);
|
||||||
|
DBufFree(&pre_buf);
|
||||||
if (!e->text) {
|
if (!e->text) {
|
||||||
free(e);
|
free(e);
|
||||||
return E_NO_MEM;
|
return E_NO_MEM;
|
||||||
@@ -764,35 +778,20 @@ static int DoCalRem(ParsePtr p, int col)
|
|||||||
}
|
}
|
||||||
e->lineno = LineNo;
|
e->lineno = LineNo;
|
||||||
|
|
||||||
/* Ugly hack... SPECIAL COLOR and SPECIAL HTML are not treated
|
if (trig.typ == PASSTHRU_TYPE) {
|
||||||
as "passthru" to preserve ordering and make them behave like
|
|
||||||
a MSG-type reminder */
|
|
||||||
|
|
||||||
if (trig.typ == PASSTHRU_TYPE &&
|
|
||||||
strcmp(trig.passthru, "COLOR") &&
|
|
||||||
strcmp(trig.passthru, "HTML")) {
|
|
||||||
StrnCpy(e->passthru, trig.passthru, PASSTHRU_LEN);
|
StrnCpy(e->passthru, trig.passthru, PASSTHRU_LEN);
|
||||||
e->pos = e->passthru;
|
|
||||||
e->time = NO_TIME;
|
|
||||||
e->next = CurPs;
|
|
||||||
CalPs[col] = e;
|
|
||||||
SortCol(&CalPs[col]);
|
|
||||||
} else {
|
} else {
|
||||||
if (trig.typ == PASSTHRU_TYPE) {
|
e->passthru[0] = 0;
|
||||||
StrnCpy(e->passthru, trig.passthru, PASSTHRU_LEN);
|
|
||||||
} else {
|
|
||||||
e->passthru[0] = 0;
|
|
||||||
}
|
|
||||||
e->pos = e->text;
|
|
||||||
if (jul == JulianToday) {
|
|
||||||
e->time = tim.ttime;
|
|
||||||
} else {
|
|
||||||
e->time = NO_TIME;
|
|
||||||
}
|
|
||||||
e->next = CurCol;
|
|
||||||
CalColumn[col] = e;
|
|
||||||
SortCol(&CalColumn[col]);
|
|
||||||
}
|
}
|
||||||
|
e->pos = e->text;
|
||||||
|
if (jul == JulianToday) {
|
||||||
|
e->time = tim.ttime;
|
||||||
|
} else {
|
||||||
|
e->time = NO_TIME;
|
||||||
|
}
|
||||||
|
e->next = CurCol;
|
||||||
|
CalColumn[col] = e;
|
||||||
|
SortCol(&CalColumn[col]);
|
||||||
}
|
}
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
@@ -806,36 +805,11 @@ static int DoCalRem(ParsePtr p, int col)
|
|||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
static void WriteSimpleEntries(int col, int jul)
|
static void WriteSimpleEntries(int col, int jul)
|
||||||
{
|
{
|
||||||
CalEntry *e = CalPs[col];
|
CalEntry *e = CalColumn[col];
|
||||||
CalEntry *n;
|
CalEntry *n;
|
||||||
int y, m, d;
|
int y, m, d;
|
||||||
|
|
||||||
/* Do all the PASSTHRU entries first, if any */
|
|
||||||
FromJulian(jul, &y, &m, &d);
|
FromJulian(jul, &y, &m, &d);
|
||||||
while(e) {
|
|
||||||
if (DoPrefixLineNo) printf("# fileinfo %d %s\n", e->lineno, e->filename);
|
|
||||||
printf("%04d/%02d/%02d ", y, m+1, d);
|
|
||||||
printf("%s %s ", e->passthru, e->tag);
|
|
||||||
if (e->duration != NO_TIME) {
|
|
||||||
printf("%d ", e->duration);
|
|
||||||
} else {
|
|
||||||
printf("* ");
|
|
||||||
}
|
|
||||||
if (e->time != NO_TIME) {
|
|
||||||
printf("%d ", e->time);
|
|
||||||
} else {
|
|
||||||
printf("* ");
|
|
||||||
}
|
|
||||||
printf("%s\n", e->text);
|
|
||||||
free(e->text);
|
|
||||||
free(e->filename);
|
|
||||||
n = e->next;
|
|
||||||
free(e);
|
|
||||||
e = n;
|
|
||||||
}
|
|
||||||
CalPs[col] = NULL;
|
|
||||||
|
|
||||||
e = CalColumn[col];
|
|
||||||
while(e) {
|
while(e) {
|
||||||
if (DoPrefixLineNo) printf("# fileinfo %d %s\n", e->lineno, e->filename);
|
if (DoPrefixLineNo) printf("# fileinfo %d %s\n", e->lineno, e->filename);
|
||||||
printf("%04d/%02d/%02d", y, m+1, d);
|
printf("%04d/%02d/%02d", y, m+1, d);
|
||||||
|
|||||||
@@ -87,8 +87,7 @@
|
|||||||
|
|
||||||
/*---------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------*/
|
||||||
/* WANT_U_OPTION: Comment out the next define to permanently disable */
|
/* WANT_U_OPTION: Comment out the next define to permanently disable */
|
||||||
/* the -u option. If you do this, however, remind-all.[c]sh will not */
|
/* the -u option. */
|
||||||
/* work. */
|
|
||||||
/*---------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------*/
|
||||||
#define WANT_U_OPTION 1
|
#define WANT_U_OPTION 1
|
||||||
|
|
||||||
|
|||||||
@@ -87,8 +87,7 @@
|
|||||||
|
|
||||||
/*---------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------*/
|
||||||
/* WANT_U_OPTION: Comment out the next define to permanently disable */
|
/* WANT_U_OPTION: Comment out the next define to permanently disable */
|
||||||
/* the -u option. If you do this, however, remind-all.[c]sh will not */
|
/* the -u option. */
|
||||||
/* work. */
|
|
||||||
/*---------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------*/
|
||||||
#define WANT_U_OPTION 1
|
#define WANT_U_OPTION 1
|
||||||
|
|
||||||
|
|||||||
31
src/dorem.c
@@ -145,6 +145,7 @@ int ParseRem(ParsePtr s, Trigger *trig, TimeTrig *tim)
|
|||||||
trig->sched[0] = 0;
|
trig->sched[0] = 0;
|
||||||
trig->warn[0] = 0;
|
trig->warn[0] = 0;
|
||||||
trig->tag[0] = 0;
|
trig->tag[0] = 0;
|
||||||
|
trig->passthru[0] = 0;
|
||||||
tim->ttime = NO_TIME;
|
tim->ttime = NO_TIME;
|
||||||
tim->delta = NO_DELTA;
|
tim->delta = NO_DELTA;
|
||||||
tim->rep = NO_REP;
|
tim->rep = NO_REP;
|
||||||
@@ -473,8 +474,9 @@ static int ParseScanFrom(ParsePtr s, Trigger *t, int type)
|
|||||||
Token tok;
|
Token tok;
|
||||||
int r;
|
int r;
|
||||||
DynamicBuffer buf;
|
DynamicBuffer buf;
|
||||||
DBufInit(&buf);
|
|
||||||
char const *word;
|
char const *word;
|
||||||
|
|
||||||
|
DBufInit(&buf);
|
||||||
if (type == SCANFROM_TYPE) {
|
if (type == SCANFROM_TYPE) {
|
||||||
word = "SCANFROM";
|
word = "SCANFROM";
|
||||||
} else {
|
} else {
|
||||||
@@ -551,11 +553,13 @@ int TriggerReminder(ParsePtr p, Trigger *t, TimeTrig *tim, int jul)
|
|||||||
char PrioExpr[25];
|
char PrioExpr[25];
|
||||||
char tmpBuf[64];
|
char tmpBuf[64];
|
||||||
DynamicBuffer buf, calRow;
|
DynamicBuffer buf, calRow;
|
||||||
|
DynamicBuffer pre_buf;
|
||||||
char *s;
|
char *s;
|
||||||
Value v;
|
Value v;
|
||||||
|
|
||||||
DBufInit(&buf);
|
DBufInit(&buf);
|
||||||
DBufInit(&calRow);
|
DBufInit(&calRow);
|
||||||
|
DBufInit(&pre_buf);
|
||||||
if (t->typ == RUN_TYPE && RunDisabled) return E_RUN_DISABLED;
|
if (t->typ == RUN_TYPE && RunDisabled) return E_RUN_DISABLED;
|
||||||
if ((t->typ == PASSTHRU_TYPE && strcmp(t->passthru, "COLOR")) ||
|
if ((t->typ == PASSTHRU_TYPE && strcmp(t->passthru, "COLOR")) ||
|
||||||
t->typ == CAL_TYPE ||
|
t->typ == CAL_TYPE ||
|
||||||
@@ -567,12 +571,18 @@ int TriggerReminder(ParsePtr p, Trigger *t, TimeTrig *tim, int jul)
|
|||||||
if (t->typ == PASSTHRU_TYPE && !strcmp(t->passthru, "COLOR")) {
|
if (t->typ == PASSTHRU_TYPE && !strcmp(t->passthru, "COLOR")) {
|
||||||
/* Strip off three tokens */
|
/* Strip off three tokens */
|
||||||
r = ParseToken(p, &buf);
|
r = ParseToken(p, &buf);
|
||||||
|
DBufPuts(&pre_buf, DBufValue(&buf));
|
||||||
|
DBufPutc(&pre_buf, ' ');
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
if (r) return r;
|
if (r) return r;
|
||||||
r = ParseToken(p, &buf);
|
r = ParseToken(p, &buf);
|
||||||
|
DBufPuts(&pre_buf, DBufValue(&buf));
|
||||||
|
DBufPutc(&pre_buf, ' ');
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
if (r) return r;
|
if (r) return r;
|
||||||
r = ParseToken(p, &buf);
|
r = ParseToken(p, &buf);
|
||||||
|
DBufPuts(&pre_buf, DBufValue(&buf));
|
||||||
|
DBufPutc(&pre_buf, ' ');
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
if (r) return r;
|
if (r) return r;
|
||||||
t->typ = MSG_TYPE;
|
t->typ = MSG_TYPE;
|
||||||
@@ -594,12 +604,14 @@ int TriggerReminder(ParsePtr p, Trigger *t, TimeTrig *tim, int jul)
|
|||||||
if ( (r=DoSubst(p, &buf, t, tim, jul, CAL_MODE)) ) return r;
|
if ( (r=DoSubst(p, &buf, t, tim, jul, CAL_MODE)) ) return r;
|
||||||
if (!DBufLen(&buf)) {
|
if (!DBufLen(&buf)) {
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
|
DBufFree(&pre_buf);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
FromJulian(jul, &y, &m, &d);
|
FromJulian(jul, &y, &m, &d);
|
||||||
sprintf(tmpBuf, "%04d%c%02d%c%02d ", y, DateSep, m+1, DateSep, d);
|
sprintf(tmpBuf, "%04d/%02d/%02d ", y, m+1, d);
|
||||||
if (DBufPuts(&calRow, tmpBuf) != OK) {
|
if (DBufPuts(&calRow, tmpBuf) != OK) {
|
||||||
DBufFree(&calRow);
|
DBufFree(&calRow);
|
||||||
|
DBufFree(&pre_buf);
|
||||||
return E_NO_MEM;
|
return E_NO_MEM;
|
||||||
}
|
}
|
||||||
/* If DoSimpleCalendar==1, output *all* simple calendar fields */
|
/* If DoSimpleCalendar==1, output *all* simple calendar fields */
|
||||||
@@ -607,6 +619,7 @@ int TriggerReminder(ParsePtr p, Trigger *t, TimeTrig *tim, int jul)
|
|||||||
/* ignore passthru field when in NextMode */
|
/* ignore passthru field when in NextMode */
|
||||||
if (DBufPuts(&calRow, "* ") != OK) {
|
if (DBufPuts(&calRow, "* ") != OK) {
|
||||||
DBufFree(&calRow);
|
DBufFree(&calRow);
|
||||||
|
DBufFree(&pre_buf);
|
||||||
return E_NO_MEM;
|
return E_NO_MEM;
|
||||||
}
|
}
|
||||||
if (t->tag[0]) {
|
if (t->tag[0]) {
|
||||||
@@ -616,6 +629,7 @@ int TriggerReminder(ParsePtr p, Trigger *t, TimeTrig *tim, int jul)
|
|||||||
}
|
}
|
||||||
if (DBufPuts(&calRow, tmpBuf) != OK) {
|
if (DBufPuts(&calRow, tmpBuf) != OK) {
|
||||||
DBufFree(&calRow);
|
DBufFree(&calRow);
|
||||||
|
DBufFree(&pre_buf);
|
||||||
return E_NO_MEM;
|
return E_NO_MEM;
|
||||||
}
|
}
|
||||||
if (tim->duration != NO_TIME) {
|
if (tim->duration != NO_TIME) {
|
||||||
@@ -625,6 +639,7 @@ int TriggerReminder(ParsePtr p, Trigger *t, TimeTrig *tim, int jul)
|
|||||||
}
|
}
|
||||||
if (DBufPuts(&calRow, tmpBuf) != OK) {
|
if (DBufPuts(&calRow, tmpBuf) != OK) {
|
||||||
DBufFree(&calRow);
|
DBufFree(&calRow);
|
||||||
|
DBufFree(&pre_buf);
|
||||||
return E_NO_MEM;
|
return E_NO_MEM;
|
||||||
}
|
}
|
||||||
if (tim->ttime != NO_TIME) {
|
if (tim->ttime != NO_TIME) {
|
||||||
@@ -634,16 +649,19 @@ int TriggerReminder(ParsePtr p, Trigger *t, TimeTrig *tim, int jul)
|
|||||||
}
|
}
|
||||||
if (DBufPuts(&calRow, tmpBuf) != OK) {
|
if (DBufPuts(&calRow, tmpBuf) != OK) {
|
||||||
DBufFree(&calRow);
|
DBufFree(&calRow);
|
||||||
|
DBufFree(&pre_buf);
|
||||||
return E_NO_MEM;
|
return E_NO_MEM;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (DBufPuts(&calRow, SimpleTime(tim->ttime)) != OK) {
|
if (DBufPuts(&calRow, SimpleTime(tim->ttime)) != OK) {
|
||||||
DBufFree(&calRow);
|
DBufFree(&calRow);
|
||||||
|
DBufFree(&pre_buf);
|
||||||
return E_NO_MEM;
|
return E_NO_MEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("%s%s\n", DBufValue(&calRow), DBufValue(&buf));
|
printf("%s%s%s\n", DBufValue(&calRow), DBufValue(&pre_buf), DBufValue(&buf));
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
|
DBufFree(&pre_buf);
|
||||||
DBufFree(&calRow);
|
DBufFree(&calRow);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
@@ -892,7 +910,7 @@ int DoMsgCommand(char *cmd, char *msg)
|
|||||||
msg = DBufValue(&buf);
|
msg = DBufValue(&buf);
|
||||||
|
|
||||||
/* Do "%s" substitution */
|
/* Do "%s" substitution */
|
||||||
l = strlen(cmd)-1;
|
l = strlen(cmd);
|
||||||
for (i=0; i<l; i++) {
|
for (i=0; i<l; i++) {
|
||||||
if (cmd[i] == '%' && cmd[i+1] == 's') {
|
if (cmd[i] == '%' && cmd[i+1] == 's') {
|
||||||
++i;
|
++i;
|
||||||
@@ -907,11 +925,6 @@ int DoMsgCommand(char *cmd, char *msg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (l >= 0 && DBufPutc(&execBuffer, cmd[l]) != OK) {
|
|
||||||
r = E_NO_MEM;
|
|
||||||
goto finished;
|
|
||||||
}
|
|
||||||
|
|
||||||
r = OK;
|
r = OK;
|
||||||
|
|
||||||
system(DBufValue(&execBuffer));
|
system(DBufValue(&execBuffer));
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ void DBufInit(DynamicBuffer *dbuf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
%FUNCTION: DBufPutc
|
%FUNCTION: DBufPutcFN
|
||||||
%ARGUMENTS:
|
%ARGUMENTS:
|
||||||
dbuf -- pointer to a dynamic buffer
|
dbuf -- pointer to a dynamic buffer
|
||||||
c -- character to append to buffer
|
c -- character to append to buffer
|
||||||
@@ -82,7 +82,7 @@ void DBufInit(DynamicBuffer *dbuf)
|
|||||||
%DESCRIPTION:
|
%DESCRIPTION:
|
||||||
Appends a character to the buffer.
|
Appends a character to the buffer.
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
int DBufPutc(DynamicBuffer *dbuf, char c)
|
int DBufPutcFN(DynamicBuffer *dbuf, char c)
|
||||||
{
|
{
|
||||||
if (dbuf->allocatedLen == dbuf->len+1) {
|
if (dbuf->allocatedLen == dbuf->len+1) {
|
||||||
if (DBufMakeRoom(dbuf, dbuf->len+1) != OK) return E_NO_MEM;
|
if (DBufMakeRoom(dbuf, dbuf->len+1) != OK) return E_NO_MEM;
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ typedef struct {
|
|||||||
} DynamicBuffer;
|
} DynamicBuffer;
|
||||||
|
|
||||||
void DBufInit(DynamicBuffer *dbuf);
|
void DBufInit(DynamicBuffer *dbuf);
|
||||||
int DBufPutc(DynamicBuffer *dbuf, char c);
|
int DBufPutcFN(DynamicBuffer *dbuf, char c);
|
||||||
int DBufPuts(DynamicBuffer *dbuf, char *str);
|
int DBufPuts(DynamicBuffer *dbuf, char *str);
|
||||||
void DBufFree(DynamicBuffer *dbuf);
|
void DBufFree(DynamicBuffer *dbuf);
|
||||||
int DBufGets(DynamicBuffer *dbuf, FILE *fp);
|
int DBufGets(DynamicBuffer *dbuf, FILE *fp);
|
||||||
@@ -32,4 +32,6 @@ int DBufGets(DynamicBuffer *dbuf, FILE *fp);
|
|||||||
#define DBufValue(bufPtr) ((bufPtr)->buffer)
|
#define DBufValue(bufPtr) ((bufPtr)->buffer)
|
||||||
#define DBufLen(bufPtr) ((bufPtr)->len)
|
#define DBufLen(bufPtr) ((bufPtr)->len)
|
||||||
|
|
||||||
|
#define DBufPutc(dbuf, c) ( (dbuf)->allocatedLen < (dbuf)->len+1 ) ? (dbuf)->buffer[(dbuf)->len++] = c, (dbuf)->buffer[(dbuf)->len] = 0, OK : DBufPutcFN((dbuf), c)
|
||||||
|
|
||||||
#endif /* DYNBUF_H */
|
#endif /* DYNBUF_H */
|
||||||
|
|||||||
47
src/funcs.c
@@ -51,6 +51,7 @@
|
|||||||
|
|
||||||
/* Function prototypes */
|
/* Function prototypes */
|
||||||
static int FCurrent (void);
|
static int FCurrent (void);
|
||||||
|
static int FNonomitted (void);
|
||||||
static int FTimepart(void);
|
static int FTimepart(void);
|
||||||
static int FDatepart(void);
|
static int FDatepart(void);
|
||||||
static int FRealCurrent(void);
|
static int FRealCurrent(void);
|
||||||
@@ -228,6 +229,7 @@ Operator Func[] = {
|
|||||||
{ "moondatetime", 1, 3, FMoondatetime },
|
{ "moondatetime", 1, 3, FMoondatetime },
|
||||||
{ "moonphase", 0, 2, FMoonphase },
|
{ "moonphase", 0, 2, FMoonphase },
|
||||||
{ "moontime", 1, 3, FMoontime },
|
{ "moontime", 1, 3, FMoontime },
|
||||||
|
{ "nonomitted", 2, NO_MAX, FNonomitted },
|
||||||
{ "now", 0, 0, FNow },
|
{ "now", 0, 0, FNow },
|
||||||
{ "ord", 1, 1, FOrd },
|
{ "ord", 1, 1, FOrd },
|
||||||
{ "ostype", 0, 0, FOstype },
|
{ "ostype", 0, 0, FOstype },
|
||||||
@@ -2044,6 +2046,7 @@ static int FFiledatetime(void)
|
|||||||
/* Canned PostScript code for shading a calendar square */
|
/* Canned PostScript code for shading a calendar square */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
|
static int psshade_warned = 0;
|
||||||
static int FPsshade(void)
|
static int FPsshade(void)
|
||||||
{
|
{
|
||||||
char psbuff[256];
|
char psbuff[256];
|
||||||
@@ -2059,6 +2062,11 @@ static int FPsshade(void)
|
|||||||
if (ARG(i).v.val > 100) return E_2HIGH;
|
if (ARG(i).v.val > 100) return E_2HIGH;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!psshade_warned) {
|
||||||
|
psshade_warned = 1;
|
||||||
|
Eprint("psshade() is deprecated; use SPECIAL SHADE instead.");
|
||||||
|
}
|
||||||
|
|
||||||
sprintf(s, "/_A LineWidth 2 div def ");
|
sprintf(s, "/_A LineWidth 2 div def ");
|
||||||
s += strlen(s);
|
s += strlen(s);
|
||||||
sprintf(s, "_A _A moveto ");
|
sprintf(s, "_A _A moveto ");
|
||||||
@@ -2080,6 +2088,8 @@ static int FPsshade(void)
|
|||||||
/* Canned PostScript code for generating moon phases */
|
/* Canned PostScript code for generating moon phases */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
|
static int psmoon_warned = 0;
|
||||||
|
|
||||||
static int FPsmoon(void)
|
static int FPsmoon(void)
|
||||||
{
|
{
|
||||||
char psbuff[512];
|
char psbuff[512];
|
||||||
@@ -2107,6 +2117,10 @@ static int FPsmoon(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!psmoon_warned) {
|
||||||
|
psmoon_warned = 1;
|
||||||
|
Eprint("psmoon() is deprecated; use SPECIAL MOON instead.");
|
||||||
|
}
|
||||||
if (size > 0) {
|
if (size > 0) {
|
||||||
sprintf(sizebuf, "%d", size);
|
sprintf(sizebuf, "%d", size);
|
||||||
} else {
|
} else {
|
||||||
@@ -2438,3 +2452,36 @@ static int FTzconvert(void)
|
|||||||
RetVal.v.val = jul * MINUTES_PER_DAY + tim;
|
RetVal.v.val = jul * MINUTES_PER_DAY + tim;
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
FNonomitted(void)
|
||||||
|
{
|
||||||
|
int d1, d2, ans, localomit, i;
|
||||||
|
|
||||||
|
Token tok;
|
||||||
|
|
||||||
|
if (!HASDATE(ARG(0)) ||
|
||||||
|
!HASDATE(ARG(1))) {
|
||||||
|
}
|
||||||
|
d1 = DATEPART(ARG(0));
|
||||||
|
d2 = DATEPART(ARG(1));
|
||||||
|
if (d2 < d1) return E_2LOW;
|
||||||
|
|
||||||
|
localomit = 0;
|
||||||
|
for (i=2; i<Nargs; i++) {
|
||||||
|
if (ARG(i).type != STR_TYPE) return E_BAD_TYPE;
|
||||||
|
FindToken(ARG(i).v.str, &tok);
|
||||||
|
if (tok.type != T_WkDay) return E_UNKNOWN_TOKEN;
|
||||||
|
localomit |= (1 << tok.val);
|
||||||
|
}
|
||||||
|
|
||||||
|
ans = 0;
|
||||||
|
while (d1 < d2) {
|
||||||
|
if (!IsOmitted(d1++, localomit)) {
|
||||||
|
ans++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
RetVal.type = INT_TYPE;
|
||||||
|
RetVal.v.val = ans;
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
|
|||||||
62
src/init.c
@@ -84,6 +84,37 @@ static void InitializeVar(char *str);
|
|||||||
|
|
||||||
static char *BadDate = "Illegal date on command line\n";
|
static char *BadDate = "Illegal date on command line\n";
|
||||||
|
|
||||||
|
static DynamicBuffer default_filename_buf;
|
||||||
|
|
||||||
|
/***************************************************************/
|
||||||
|
/* */
|
||||||
|
/* DefaultFilename */
|
||||||
|
/* */
|
||||||
|
/* If we're invoked as "rem" rather than "remind", use a */
|
||||||
|
/* default filename. Use $DOTREMINDERS or $HOME/.reminders */
|
||||||
|
/* */
|
||||||
|
/***************************************************************/
|
||||||
|
static char *DefaultFilename(void)
|
||||||
|
{
|
||||||
|
char *s;
|
||||||
|
|
||||||
|
DBufInit(&default_filename_buf);
|
||||||
|
|
||||||
|
s = getenv("DOTREMINDERS");
|
||||||
|
if (s) {
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
|
s = getenv("HOME");
|
||||||
|
if (!s) {
|
||||||
|
fprintf(stderr, "HOME environment variable not set. Unable to determine reminder file.\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
DBufPuts(&default_filename_buf, s);
|
||||||
|
DBufPuts(&default_filename_buf, "/.reminders");
|
||||||
|
return DBufValue(&default_filename_buf);
|
||||||
|
}
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* InitRemind */
|
/* InitRemind */
|
||||||
@@ -97,6 +128,8 @@ void InitRemind(int argc, char *argv[])
|
|||||||
int i;
|
int i;
|
||||||
int y, m, d, rep;
|
int y, m, d, rep;
|
||||||
Token tok;
|
Token tok;
|
||||||
|
int InvokedAsRem = 0;
|
||||||
|
char *s;
|
||||||
|
|
||||||
/* Initialize global dynamic buffers */
|
/* Initialize global dynamic buffers */
|
||||||
DBufInit(&Banner);
|
DBufInit(&Banner);
|
||||||
@@ -125,6 +158,19 @@ void InitRemind(int argc, char *argv[])
|
|||||||
JulianToday = RealToday;
|
JulianToday = RealToday;
|
||||||
FromJulian(JulianToday, &CurYear, &CurMon, &CurDay);
|
FromJulian(JulianToday, &CurYear, &CurMon, &CurDay);
|
||||||
|
|
||||||
|
/* See if we were invoked as "rem" rather than "remind" */
|
||||||
|
if (argv[0]) {
|
||||||
|
s = strrchr(argv[0], '/');
|
||||||
|
if (!s) {
|
||||||
|
s = argv[0];
|
||||||
|
} else {
|
||||||
|
s++;
|
||||||
|
}
|
||||||
|
if (!strcmp(s, "rem")) {
|
||||||
|
InvokedAsRem = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Parse the command-line options */
|
/* Parse the command-line options */
|
||||||
i = 1;
|
i = 1;
|
||||||
while (i < argc) {
|
while (i < argc) {
|
||||||
@@ -223,11 +269,11 @@ void InitRemind(int argc, char *argv[])
|
|||||||
if (*arg == '0') {
|
if (*arg == '0') {
|
||||||
PARSENUM(Daemon, arg);
|
PARSENUM(Daemon, arg);
|
||||||
if (Daemon == 0) Daemon = -1;
|
if (Daemon == 0) Daemon = -1;
|
||||||
else if (Daemon < 5) Daemon = 5;
|
else if (Daemon < 1) Daemon = 1;
|
||||||
else if (Daemon > 60) Daemon = 60;
|
else if (Daemon > 60) Daemon = 60;
|
||||||
} else {
|
} else {
|
||||||
PARSENUM(Daemon, arg);
|
PARSENUM(Daemon, arg);
|
||||||
if (Daemon<5) Daemon=5;
|
if (Daemon<1) Daemon=1;
|
||||||
else if (Daemon>60) Daemon=60;
|
else if (Daemon>60) Daemon=60;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -360,11 +406,15 @@ void InitRemind(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Get the filename. */
|
/* Get the filename. */
|
||||||
if (i >= argc) {
|
if (!InvokedAsRem) {
|
||||||
Usage();
|
if (i >= argc) {
|
||||||
exit(1);
|
Usage();
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
InitialFile = argv[i++];
|
||||||
|
} else {
|
||||||
|
InitialFile = DefaultFilename();
|
||||||
}
|
}
|
||||||
InitialFile = argv[i++];
|
|
||||||
|
|
||||||
/* Get the date, if any */
|
/* Get the date, if any */
|
||||||
if (i < argc) {
|
if (i < argc) {
|
||||||
|
|||||||
85
src/queue.c
@@ -41,6 +41,7 @@ typedef struct queuedrem {
|
|||||||
int RunDisabled;
|
int RunDisabled;
|
||||||
int ntrig;
|
int ntrig;
|
||||||
char *text;
|
char *text;
|
||||||
|
char passthru[PASSTHRU_LEN+1];
|
||||||
char sched[VAR_NAME_LEN+1];
|
char sched[VAR_NAME_LEN+1];
|
||||||
char tag[TAG_LEN+1];
|
char tag[TAG_LEN+1];
|
||||||
TimeTrig tt;
|
TimeTrig tt;
|
||||||
@@ -89,6 +90,7 @@ int QueueReminder(ParsePtr p, Trigger *trig,
|
|||||||
}
|
}
|
||||||
NumQueued++;
|
NumQueued++;
|
||||||
qelem->typ = trig->typ;
|
qelem->typ = trig->typ;
|
||||||
|
strcpy(qelem->passthru, trig->passthru);
|
||||||
qelem->tt = *tim;
|
qelem->tt = *tim;
|
||||||
qelem->next = QueueHead;
|
qelem->next = QueueHead;
|
||||||
qelem->RunDisabled = RunDisabled;
|
qelem->RunDisabled = RunDisabled;
|
||||||
@@ -179,13 +181,30 @@ void HandleQueuedReminders(void)
|
|||||||
|
|
||||||
if (Daemon > 0 && SleepTime > 60*Daemon) SleepTime = 60*Daemon;
|
if (Daemon > 0 && SleepTime > 60*Daemon) SleepTime = 60*Daemon;
|
||||||
|
|
||||||
|
/* Wake up once a minute to recalibrate sleep time in
|
||||||
|
case of laptop hibernation */
|
||||||
|
if (Daemon <= 0) {
|
||||||
|
if (SleepTime > 60) {
|
||||||
|
SleepTime = 60;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (Daemon >= 0) {
|
if (Daemon >= 0) {
|
||||||
sleep(SleepTime);
|
sleep(SleepTime);
|
||||||
} else {
|
} else {
|
||||||
DaemonWait(SleepTime);
|
DaemonWait(SleepTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Daemon> 0 && SleepTime) CheckInitialFile();
|
/* If not in daemon mode and day has rolled around,
|
||||||
|
exit -- not much we can do. */
|
||||||
|
if (!Daemon) {
|
||||||
|
int y, m, d;
|
||||||
|
if (RealToday != SystemDate(&y, &m, &d)) {
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Daemon > 0 && SleepTime) CheckInitialFile();
|
||||||
|
|
||||||
if (Daemon && !q) {
|
if (Daemon && !q) {
|
||||||
if (Daemon < 0) {
|
if (Daemon < 0) {
|
||||||
@@ -200,36 +219,45 @@ void HandleQueuedReminders(void)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Trigger the reminder */
|
/* Do NOT trigger the reminder if tt.nexttime is more than a
|
||||||
CreateParser(q->text, &p);
|
minute in the past. This can happen if the clock is
|
||||||
trig.typ = q->typ;
|
changed or a laptop awakes from hibernation.
|
||||||
RunDisabled = q->RunDisabled;
|
However, DO triger if tt.nexttime == tt.ttime so all
|
||||||
if (Daemon < 0) {
|
queued reminders are triggered at least once. */
|
||||||
printf("NOTE reminder %s ",
|
if ((SystemTime(0) - (q->tt.nexttime * 60) <= 60) ||
|
||||||
SimpleTime(q->tt.ttime));
|
(q->tt.nexttime == q->tt.ttime)) {
|
||||||
printf("%s ", SimpleTime(SystemTime(0)/60));
|
/* Trigger the reminder */
|
||||||
if (!*q->tag) {
|
CreateParser(q->text, &p);
|
||||||
printf("*");
|
trig.typ = q->typ;
|
||||||
} else {
|
strcpy(trig.passthru, q->passthru);
|
||||||
printf("%s", q->tag);
|
RunDisabled = q->RunDisabled;
|
||||||
|
if (Daemon < 0) {
|
||||||
|
printf("NOTE reminder %s ",
|
||||||
|
SimpleTime(q->tt.ttime));
|
||||||
|
printf("%s ", SimpleTime(SystemTime(0)/60));
|
||||||
|
if (!*q->tag) {
|
||||||
|
printf("*");
|
||||||
|
} else {
|
||||||
|
printf("%s", q->tag);
|
||||||
|
}
|
||||||
|
printf("\n");
|
||||||
}
|
}
|
||||||
printf("\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set up global variables so some functions like trigdate()
|
/* Set up global variables so some functions like trigdate()
|
||||||
and trigtime() work correctly */
|
and trigtime() work correctly */
|
||||||
LastTriggerDate = JulianToday;
|
LastTriggerDate = JulianToday;
|
||||||
LastTriggerTime = q->tt.ttime;
|
LastTriggerTime = q->tt.ttime;
|
||||||
LastTrigValid = 1;
|
LastTrigValid = 1;
|
||||||
(void) TriggerReminder(&p, &trig, &q->tt, JulianToday);
|
(void) TriggerReminder(&p, &trig, &q->tt, JulianToday);
|
||||||
if (Daemon < 0) {
|
if (Daemon < 0) {
|
||||||
printf("NOTE endreminder\n");
|
printf("NOTE endreminder\n");
|
||||||
|
}
|
||||||
|
fflush(stdout);
|
||||||
|
DestroyParser(&p);
|
||||||
}
|
}
|
||||||
fflush(stdout);
|
|
||||||
|
|
||||||
/* Calculate the next trigger time */
|
/* Calculate the next trigger time */
|
||||||
q->tt.nexttime = CalculateNextTime(q);
|
q->tt.nexttime = CalculateNextTime(q);
|
||||||
DestroyParser(&p);
|
|
||||||
}
|
}
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
@@ -322,8 +350,11 @@ void GotSigInt(void)
|
|||||||
q->tt.rep, q->tt.delta, q->sched);
|
q->tt.rep, q->tt.delta, q->sched);
|
||||||
if (*q->sched) printf("(%d)", q->ntrig+1);
|
if (*q->sched) printf("(%d)", q->ntrig+1);
|
||||||
printf("%s", NL);
|
printf("%s", NL);
|
||||||
printf("Text: %s %s%s%s", ((q->typ == MSG_TYPE) ? "MSG" :
|
printf("Text: %s %s%s%s%s%s", ((q->typ == MSG_TYPE) ? "MSG" :
|
||||||
((q->typ == MSF_TYPE) ? "MSF" :"RUN")),
|
((q->typ == MSF_TYPE) ? "MSF" :
|
||||||
|
((q->typ == RUN_TYPE) ? "RUN" : "SPECIAL"))),
|
||||||
|
q->passthru,
|
||||||
|
(*(q->passthru)) ? " " : "",
|
||||||
q->text,
|
q->text,
|
||||||
NL, NL);
|
NL, NL);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,8 +34,6 @@ while (isdigit(*(string))) { \
|
|||||||
string++; \
|
string++; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define UPPER(c) (islower(c) ? toupper(c) : c)
|
|
||||||
|
|
||||||
/* The big array holding all recognized (literal) tokens in reminder file.
|
/* The big array holding all recognized (literal) tokens in reminder file.
|
||||||
Keep this array sorted, or software will not work. */
|
Keep this array sorted, or software will not work. */
|
||||||
Token TokArray[] = {
|
Token TokArray[] = {
|
||||||
@@ -342,7 +340,7 @@ static int TokStrCmp(const Token *t, const char *s)
|
|||||||
register int r;
|
register int r;
|
||||||
char *tk = t->name;
|
char *tk = t->name;
|
||||||
while(*tk && *s && !(*s == ',' && *(s+1) == 0)) {
|
while(*tk && *s && !(*s == ',' && *(s+1) == 0)) {
|
||||||
r = UPPER(*tk) - UPPER(*s);
|
r = *tk - tolower(*s);
|
||||||
tk++;
|
tk++;
|
||||||
s++;
|
s++;
|
||||||
if (r) return r;
|
if (r) return r;
|
||||||
|
|||||||
@@ -350,7 +350,7 @@ int ComputeTrigger(int today, Trigger *trig, int *err)
|
|||||||
{
|
{
|
||||||
int nattempts = 0,
|
int nattempts = 0,
|
||||||
start = today,
|
start = today,
|
||||||
nextstart,
|
nextstart = 0,
|
||||||
y, m, d,
|
y, m, d,
|
||||||
result;
|
result;
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
|
||||||
#define UPPER(c) (islower(c) ? toupper(c) : c)
|
#define UPPER(c) toupper(c)
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
/* */
|
/* */
|
||||||
|
|||||||
@@ -10,4 +10,4 @@
|
|||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
|
|
||||||
#define VERSION "03.01.00"
|
#define VERSION "03.01.02"
|
||||||
|
|||||||
@@ -12,7 +12,22 @@
|
|||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
TEST_GETENV="foo bar baz" ; export TEST_GETENV
|
TEST_GETENV="foo bar baz" ; export TEST_GETENV
|
||||||
../src/remind -e -dxte ../tests/test.rem 16 feb 1991 > ../tests/test.out
|
echo "Test 1" > ../tests/test.out
|
||||||
|
echo "" >> ../tests/test.out
|
||||||
|
../src/remind -e -dxte ../tests/test.rem 16 feb 1991 >> ../tests/test.out
|
||||||
|
echo "" >> ../tests/test.out
|
||||||
|
echo "Test 2" >> ../tests/test.out
|
||||||
|
echo "" >> ../tests/test.out
|
||||||
|
../src/remind -p ../tests/test2.rem 1 aug 2007 >> ../tests/test.out
|
||||||
|
echo "" >> ../tests/test.out
|
||||||
|
echo "Test 3" >> ../tests/test.out
|
||||||
|
echo "" >> ../tests/test.out
|
||||||
|
../src/remind -s ../tests/test2.rem 1 aug 2007 >> ../tests/test.out
|
||||||
|
echo "" >> ../tests/test.out
|
||||||
|
echo "Test 4" >> ../tests/test.out
|
||||||
|
echo "" >> ../tests/test.out
|
||||||
|
../src/remind -sa ../tests/test2.rem 1 aug 2007 >> ../tests/test.out
|
||||||
|
|
||||||
cmp -s ../tests/test.out ../tests/test.cmp
|
cmp -s ../tests/test.out ../tests/test.cmp
|
||||||
if [ "$?" = "0" ]; then
|
if [ "$?" = "0" ]; then
|
||||||
echo "Remind: Acceptance test PASSED"
|
echo "Remind: Acceptance test PASSED"
|
||||||
|
|||||||
259
tests/test.cmp
@@ -1,3 +1,5 @@
|
|||||||
|
Test 1
|
||||||
|
|
||||||
# Test file for REMIND
|
# Test file for REMIND
|
||||||
#
|
#
|
||||||
# Use this file to test the date calculation routines
|
# Use this file to test the date calculation routines
|
||||||
@@ -631,7 +633,7 @@ set a057 value("a05"+"6")
|
|||||||
"a05" + "6" => "a056"
|
"a05" + "6" => "a056"
|
||||||
value("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH"
|
value("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH"
|
||||||
set a058 version()
|
set a058 version()
|
||||||
version() => "03.01.00"
|
version() => "03.01.02"
|
||||||
set a059 wkday(today())
|
set a059 wkday(today())
|
||||||
today() => 1991-02-16
|
today() => 1991-02-16
|
||||||
wkday(1991-02-16) => "Saturday"
|
wkday(1991-02-16) => "Saturday"
|
||||||
@@ -772,7 +774,7 @@ dump
|
|||||||
a048 "foo"
|
a048 "foo"
|
||||||
a067 "INT"
|
a067 "INT"
|
||||||
a039 "February"
|
a039 "February"
|
||||||
a058 "03.01.00"
|
a058 "03.01.02"
|
||||||
a077 "1992 92
|
a077 "1992 92
|
||||||
"
|
"
|
||||||
a049 21
|
a049 21
|
||||||
@@ -828,3 +830,256 @@ dump
|
|||||||
a045 "iess"
|
a045 "iess"
|
||||||
a064 1
|
a064 1
|
||||||
|
|
||||||
|
|
||||||
|
Test 2
|
||||||
|
|
||||||
|
# rem2ps begin
|
||||||
|
August 2007 31 3 0
|
||||||
|
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
|
||||||
|
July 31
|
||||||
|
September 30
|
||||||
|
2007/08/01 COLOR * * * 0 0 255 Blue Wednesday
|
||||||
|
2007/08/01 * * * * 0 NonOmit-1
|
||||||
|
2007/08/01 * * * * 0 NonOmit-2
|
||||||
|
2007/08/02 COLOR * * * 255 0 0 Red Thursday
|
||||||
|
2007/08/02 * * * * 1 NonOmit-1
|
||||||
|
2007/08/02 * * * * 1 NonOmit-2
|
||||||
|
2007/08/03 SHADE * * * 0 255 0
|
||||||
|
2007/08/03 * * * * 2 NonOmit-1
|
||||||
|
2007/08/03 * * * * 2 NonOmit-2
|
||||||
|
2007/08/04 * * * * 3 NonOmit-1
|
||||||
|
2007/08/04 * * * * 3 NonOmit-2
|
||||||
|
2007/08/05 * * * * 4 NonOmit-1
|
||||||
|
2007/08/05 * * * * 3 NonOmit-2
|
||||||
|
2007/08/06 * * * * 5 NonOmit-1
|
||||||
|
2007/08/06 * * * * 3 NonOmit-2
|
||||||
|
2007/08/07 * * * * 6 NonOmit-1
|
||||||
|
2007/08/07 * * * * 4 NonOmit-2
|
||||||
|
2007/08/08 COLOR * * * 0 0 255 Blue Wednesday
|
||||||
|
2007/08/08 * * * * 7 NonOmit-1
|
||||||
|
2007/08/08 * * * * 5 NonOmit-2
|
||||||
|
2007/08/09 COLOR * * * 255 0 0 Red Thursday
|
||||||
|
2007/08/09 * * * * 8 NonOmit-1
|
||||||
|
2007/08/09 * * * * 6 NonOmit-2
|
||||||
|
2007/08/10 SHADE * * * 0 255 0
|
||||||
|
2007/08/10 * * * * 9 NonOmit-1
|
||||||
|
2007/08/10 * * * * 7 NonOmit-2
|
||||||
|
2007/08/11 * * * * 10 NonOmit-1
|
||||||
|
2007/08/11 * * * * 8 NonOmit-2
|
||||||
|
2007/08/12 MOON * * * 0
|
||||||
|
2007/08/12 * * * * 11 NonOmit-1
|
||||||
|
2007/08/12 * * * * 8 NonOmit-2
|
||||||
|
2007/08/13 * * * * 12 NonOmit-1
|
||||||
|
2007/08/13 * * * * 8 NonOmit-2
|
||||||
|
2007/08/14 * * * * 13 NonOmit-1
|
||||||
|
2007/08/14 * * * * 9 NonOmit-2
|
||||||
|
2007/08/15 COLOR * * * 0 0 255 Blue Wednesday
|
||||||
|
2007/08/15 * * * * 13 NonOmit-1
|
||||||
|
2007/08/15 * * * * 9 NonOmit-2
|
||||||
|
2007/08/16 COLOR * * * 255 0 0 Red Thursday
|
||||||
|
2007/08/16 * * * * 14 NonOmit-1
|
||||||
|
2007/08/16 * * * * 10 NonOmit-2
|
||||||
|
2007/08/17 SHADE * * * 0 255 0
|
||||||
|
2007/08/17 * * * * 15 NonOmit-1
|
||||||
|
2007/08/17 * * * * 11 NonOmit-2
|
||||||
|
2007/08/18 * * * * 16 NonOmit-1
|
||||||
|
2007/08/18 * * * * 12 NonOmit-2
|
||||||
|
2007/08/19 * * * * 17 NonOmit-1
|
||||||
|
2007/08/19 * * * * 12 NonOmit-2
|
||||||
|
2007/08/20 COLOR * * 825 6 7 8 1:45pm Mooo!
|
||||||
|
2007/08/20 * * * * 18 NonOmit-1
|
||||||
|
2007/08/20 * * * * 12 NonOmit-2
|
||||||
|
2007/08/21 PostScript * * 115 (wookie) show
|
||||||
|
2007/08/21 * * * * 19 NonOmit-1
|
||||||
|
2007/08/21 * * * * 13 NonOmit-2
|
||||||
|
2007/08/22 COLOR * * * 0 0 255 Blue Wednesday
|
||||||
|
2007/08/22 * * * * 20 NonOmit-1
|
||||||
|
2007/08/22 * * * * 14 NonOmit-2
|
||||||
|
2007/08/22 PostScript * * * (cabbage) show
|
||||||
|
2007/08/23 blort * * 1004 snoo glup
|
||||||
|
2007/08/23 COLOR * * * 255 0 0 Red Thursday
|
||||||
|
2007/08/23 * * * * 21 NonOmit-1
|
||||||
|
2007/08/23 * * * * 15 NonOmit-2
|
||||||
|
2007/08/24 SHADE * * * 0 255 0
|
||||||
|
2007/08/24 * * * * 22 NonOmit-1
|
||||||
|
2007/08/24 * * * * 16 NonOmit-2
|
||||||
|
2007/08/24 blort * * * gulp wookie
|
||||||
|
2007/08/25 * * * * 23 NonOmit-1
|
||||||
|
2007/08/25 * * * * 17 NonOmit-2
|
||||||
|
2007/08/26 * * * * 24 NonOmit-1
|
||||||
|
2007/08/26 * * * * 17 NonOmit-2
|
||||||
|
2007/08/27 * * * * 25 NonOmit-1
|
||||||
|
2007/08/27 * * * * 17 NonOmit-2
|
||||||
|
2007/08/28 * * * * 26 NonOmit-1
|
||||||
|
2007/08/28 * * * * 18 NonOmit-2
|
||||||
|
2007/08/29 COLOR * * * 0 0 255 Blue Wednesday
|
||||||
|
2007/08/29 * * * * 27 NonOmit-1
|
||||||
|
2007/08/29 * * * * 19 NonOmit-2
|
||||||
|
2007/08/30 COLOR * * * 255 0 0 Red Thursday
|
||||||
|
2007/08/30 * * * * 28 NonOmit-1
|
||||||
|
2007/08/30 * * * * 20 NonOmit-2
|
||||||
|
2007/08/31 SHADE * * * 0 255 0
|
||||||
|
2007/08/31 * * * * 29 NonOmit-1
|
||||||
|
2007/08/31 * * * * 21 NonOmit-2
|
||||||
|
# rem2ps end
|
||||||
|
|
||||||
|
Test 3
|
||||||
|
|
||||||
|
2007/08/01 COLOR * * * 0 0 255 Blue Wednesday
|
||||||
|
2007/08/01 * * * * 0 NonOmit-1
|
||||||
|
2007/08/01 * * * * 0 NonOmit-2
|
||||||
|
2007/08/02 COLOR * * * 255 0 0 Red Thursday
|
||||||
|
2007/08/02 * * * * 1 NonOmit-1
|
||||||
|
2007/08/02 * * * * 1 NonOmit-2
|
||||||
|
2007/08/03 * * * * 2 NonOmit-1
|
||||||
|
2007/08/03 * * * * 2 NonOmit-2
|
||||||
|
2007/08/04 * * * * 3 NonOmit-1
|
||||||
|
2007/08/04 * * * * 3 NonOmit-2
|
||||||
|
2007/08/05 * * * * 4 NonOmit-1
|
||||||
|
2007/08/05 * * * * 3 NonOmit-2
|
||||||
|
2007/08/06 * * * * 5 NonOmit-1
|
||||||
|
2007/08/06 * * * * 3 NonOmit-2
|
||||||
|
2007/08/07 * * * * 6 NonOmit-1
|
||||||
|
2007/08/07 * * * * 4 NonOmit-2
|
||||||
|
2007/08/08 COLOR * * * 0 0 255 Blue Wednesday
|
||||||
|
2007/08/08 * * * * 7 NonOmit-1
|
||||||
|
2007/08/08 * * * * 5 NonOmit-2
|
||||||
|
2007/08/09 COLOR * * * 255 0 0 Red Thursday
|
||||||
|
2007/08/09 * * * * 8 NonOmit-1
|
||||||
|
2007/08/09 * * * * 6 NonOmit-2
|
||||||
|
2007/08/10 * * * * 9 NonOmit-1
|
||||||
|
2007/08/10 * * * * 7 NonOmit-2
|
||||||
|
2007/08/11 * * * * 10 NonOmit-1
|
||||||
|
2007/08/11 * * * * 8 NonOmit-2
|
||||||
|
2007/08/12 * * * * 11 NonOmit-1
|
||||||
|
2007/08/12 * * * * 8 NonOmit-2
|
||||||
|
2007/08/13 * * * * 12 NonOmit-1
|
||||||
|
2007/08/13 * * * * 8 NonOmit-2
|
||||||
|
2007/08/14 * * * * 13 NonOmit-1
|
||||||
|
2007/08/14 * * * * 9 NonOmit-2
|
||||||
|
2007/08/15 COLOR * * * 0 0 255 Blue Wednesday
|
||||||
|
2007/08/15 * * * * 13 NonOmit-1
|
||||||
|
2007/08/15 * * * * 9 NonOmit-2
|
||||||
|
2007/08/16 COLOR * * * 255 0 0 Red Thursday
|
||||||
|
2007/08/16 * * * * 14 NonOmit-1
|
||||||
|
2007/08/16 * * * * 10 NonOmit-2
|
||||||
|
2007/08/17 * * * * 15 NonOmit-1
|
||||||
|
2007/08/17 * * * * 11 NonOmit-2
|
||||||
|
2007/08/18 * * * * 16 NonOmit-1
|
||||||
|
2007/08/18 * * * * 12 NonOmit-2
|
||||||
|
2007/08/19 * * * * 17 NonOmit-1
|
||||||
|
2007/08/19 * * * * 12 NonOmit-2
|
||||||
|
2007/08/20 COLOR * * 825 6 7 8 1:45pm Mooo!
|
||||||
|
2007/08/20 * * * * 18 NonOmit-1
|
||||||
|
2007/08/20 * * * * 12 NonOmit-2
|
||||||
|
2007/08/21 * * * * 19 NonOmit-1
|
||||||
|
2007/08/21 * * * * 13 NonOmit-2
|
||||||
|
2007/08/22 COLOR * * * 0 0 255 Blue Wednesday
|
||||||
|
2007/08/22 * * * * 20 NonOmit-1
|
||||||
|
2007/08/22 * * * * 14 NonOmit-2
|
||||||
|
2007/08/23 COLOR * * * 255 0 0 Red Thursday
|
||||||
|
2007/08/23 * * * * 21 NonOmit-1
|
||||||
|
2007/08/23 * * * * 15 NonOmit-2
|
||||||
|
2007/08/24 * * * * 22 NonOmit-1
|
||||||
|
2007/08/24 * * * * 16 NonOmit-2
|
||||||
|
2007/08/25 * * * * 23 NonOmit-1
|
||||||
|
2007/08/25 * * * * 17 NonOmit-2
|
||||||
|
2007/08/26 * * * * 24 NonOmit-1
|
||||||
|
2007/08/26 * * * * 17 NonOmit-2
|
||||||
|
2007/08/27 * * * * 25 NonOmit-1
|
||||||
|
2007/08/27 * * * * 17 NonOmit-2
|
||||||
|
2007/08/28 * * * * 26 NonOmit-1
|
||||||
|
2007/08/28 * * * * 18 NonOmit-2
|
||||||
|
2007/08/29 COLOR * * * 0 0 255 Blue Wednesday
|
||||||
|
2007/08/29 * * * * 27 NonOmit-1
|
||||||
|
2007/08/29 * * * * 19 NonOmit-2
|
||||||
|
2007/08/30 COLOR * * * 255 0 0 Red Thursday
|
||||||
|
2007/08/30 * * * * 28 NonOmit-1
|
||||||
|
2007/08/30 * * * * 20 NonOmit-2
|
||||||
|
2007/08/31 * * * * 29 NonOmit-1
|
||||||
|
2007/08/31 * * * * 21 NonOmit-2
|
||||||
|
|
||||||
|
Test 4
|
||||||
|
|
||||||
|
2007/08/01 COLOR * * * 0 0 255 Blue Wednesday
|
||||||
|
2007/08/01 * * * * 0 NonOmit-1
|
||||||
|
2007/08/01 * * * * 0 NonOmit-2
|
||||||
|
2007/08/02 COLOR * * * 255 0 0 Red Thursday
|
||||||
|
2007/08/02 * * * * 1 NonOmit-1
|
||||||
|
2007/08/02 * * * * 1 NonOmit-2
|
||||||
|
2007/08/03 * * * * 2 NonOmit-1
|
||||||
|
2007/08/03 * * * * 2 NonOmit-2
|
||||||
|
2007/08/04 * * * * 3 NonOmit-1
|
||||||
|
2007/08/04 * * * * 3 NonOmit-2
|
||||||
|
2007/08/05 * * * * 4 NonOmit-1
|
||||||
|
2007/08/05 * * * * 3 NonOmit-2
|
||||||
|
2007/08/06 COLOR * * * 0 0 255 Blue Wednesday is in 2 days' time
|
||||||
|
2007/08/06 * * * * 5 NonOmit-1
|
||||||
|
2007/08/06 * * * * 3 NonOmit-2
|
||||||
|
2007/08/07 COLOR * * * 0 0 255 Blue Wednesday is tomorrow
|
||||||
|
2007/08/07 * * * * 6 NonOmit-1
|
||||||
|
2007/08/07 * * * * 4 NonOmit-2
|
||||||
|
2007/08/08 COLOR * * * 0 0 255 Blue Wednesday
|
||||||
|
2007/08/08 * * * * 7 NonOmit-1
|
||||||
|
2007/08/08 * * * * 5 NonOmit-2
|
||||||
|
2007/08/09 COLOR * * * 255 0 0 Red Thursday
|
||||||
|
2007/08/09 * * * * 8 NonOmit-1
|
||||||
|
2007/08/09 * * * * 6 NonOmit-2
|
||||||
|
2007/08/10 * * * * 9 NonOmit-1
|
||||||
|
2007/08/10 * * * * 7 NonOmit-2
|
||||||
|
2007/08/11 * * * * 10 NonOmit-1
|
||||||
|
2007/08/11 * * * * 8 NonOmit-2
|
||||||
|
2007/08/12 COLOR * * * 0 0 255 Blue Wednesday is in 3 days' time
|
||||||
|
2007/08/12 * * * * 11 NonOmit-1
|
||||||
|
2007/08/12 * * * * 8 NonOmit-2
|
||||||
|
2007/08/13 COLOR * * * 0 0 255 Blue Wednesday is in 2 days' time
|
||||||
|
2007/08/13 * * * * 12 NonOmit-1
|
||||||
|
2007/08/13 * * * * 8 NonOmit-2
|
||||||
|
2007/08/14 COLOR * * * 0 0 255 Blue Wednesday is tomorrow
|
||||||
|
2007/08/14 * * * * 13 NonOmit-1
|
||||||
|
2007/08/14 * * * * 9 NonOmit-2
|
||||||
|
2007/08/15 COLOR * * * 0 0 255 Blue Wednesday
|
||||||
|
2007/08/15 * * * * 13 NonOmit-1
|
||||||
|
2007/08/15 * * * * 9 NonOmit-2
|
||||||
|
2007/08/16 COLOR * * * 255 0 0 Red Thursday
|
||||||
|
2007/08/16 * * * * 14 NonOmit-1
|
||||||
|
2007/08/16 * * * * 10 NonOmit-2
|
||||||
|
2007/08/17 * * * * 15 NonOmit-1
|
||||||
|
2007/08/17 * * * * 11 NonOmit-2
|
||||||
|
2007/08/18 * * * * 16 NonOmit-1
|
||||||
|
2007/08/18 * * * * 12 NonOmit-2
|
||||||
|
2007/08/19 * * * * 17 NonOmit-1
|
||||||
|
2007/08/19 * * * * 12 NonOmit-2
|
||||||
|
2007/08/20 COLOR * * 825 6 7 8 1:45pm Mooo!
|
||||||
|
2007/08/20 COLOR * * * 0 0 255 Blue Wednesday is in 2 days' time
|
||||||
|
2007/08/20 * * * * 18 NonOmit-1
|
||||||
|
2007/08/20 * * * * 12 NonOmit-2
|
||||||
|
2007/08/21 COLOR * * * 0 0 255 Blue Wednesday is tomorrow
|
||||||
|
2007/08/21 * * * * 19 NonOmit-1
|
||||||
|
2007/08/21 * * * * 13 NonOmit-2
|
||||||
|
2007/08/22 COLOR * * * 0 0 255 Blue Wednesday
|
||||||
|
2007/08/22 * * * * 20 NonOmit-1
|
||||||
|
2007/08/22 * * * * 14 NonOmit-2
|
||||||
|
2007/08/23 COLOR * * * 255 0 0 Red Thursday
|
||||||
|
2007/08/23 * * * * 21 NonOmit-1
|
||||||
|
2007/08/23 * * * * 15 NonOmit-2
|
||||||
|
2007/08/24 * * * * 22 NonOmit-1
|
||||||
|
2007/08/24 * * * * 16 NonOmit-2
|
||||||
|
2007/08/25 * * * * 23 NonOmit-1
|
||||||
|
2007/08/25 * * * * 17 NonOmit-2
|
||||||
|
2007/08/26 * * * * 24 NonOmit-1
|
||||||
|
2007/08/26 * * * * 17 NonOmit-2
|
||||||
|
2007/08/27 COLOR * * * 0 0 255 Blue Wednesday is in 2 days' time
|
||||||
|
2007/08/27 * * * * 25 NonOmit-1
|
||||||
|
2007/08/27 * * * * 17 NonOmit-2
|
||||||
|
2007/08/28 COLOR * * * 0 0 255 Blue Wednesday is tomorrow
|
||||||
|
2007/08/28 * * * * 26 NonOmit-1
|
||||||
|
2007/08/28 * * * * 18 NonOmit-2
|
||||||
|
2007/08/29 COLOR * * * 0 0 255 Blue Wednesday
|
||||||
|
2007/08/29 * * * * 27 NonOmit-1
|
||||||
|
2007/08/29 * * * * 19 NonOmit-2
|
||||||
|
2007/08/30 COLOR * * * 255 0 0 Red Thursday
|
||||||
|
2007/08/30 * * * * 28 NonOmit-1
|
||||||
|
2007/08/30 * * * * 20 NonOmit-2
|
||||||
|
2007/08/31 * * * * 29 NonOmit-1
|
||||||
|
2007/08/31 * * * * 21 NonOmit-2
|
||||||
|
|||||||
830
tests/test1.cmp
@@ -1,830 +0,0 @@
|
|||||||
# Test file for REMIND
|
|
||||||
#
|
|
||||||
# Use this file to test the date calculation routines
|
|
||||||
# of the REMIND program by typing:
|
|
||||||
#
|
|
||||||
# ./test-rem # From WITHIN Remind source directory!
|
|
||||||
|
|
||||||
REM MSG Today is [hebday(today())] [hebmon(today())] [hebyear(today())]
|
|
||||||
.\test.rem(8): Trig = Saturday, 16 February, 1991
|
|
||||||
Reminders for Saturday, 16th February, 1991:
|
|
||||||
|
|
||||||
today() => 1991/02/16
|
|
||||||
hebday(1991/02/16) => 2
|
|
||||||
today() => 1991/02/16
|
|
||||||
hebmon(1991/02/16) => "Adar"
|
|
||||||
today() => 1991/02/16
|
|
||||||
hebyear(1991/02/16) => 5751
|
|
||||||
Today is 2 Adar 5751
|
|
||||||
|
|
||||||
fset _h(x, y) trigger(hebdate(x,y))
|
|
||||||
|
|
||||||
[_h(1, "Tishrey")] MSG Rosh Hashana 1
|
|
||||||
Entering UserFN _h(1, "Tishrey")
|
|
||||||
x => 1
|
|
||||||
y => "Tishrey"
|
|
||||||
hebdate(1, "Tishrey") => 1991/09/09
|
|
||||||
trigger(1991/09/09) => "9 September 1991"
|
|
||||||
Leaving UserFN _h() => "9 September 1991"
|
|
||||||
.\test.rem(11): Trig = Monday, 9 September, 1991
|
|
||||||
[_h(2, "Tishrey")] MSG Rosh Hashana 2
|
|
||||||
Entering UserFN _h(2, "Tishrey")
|
|
||||||
x => 2
|
|
||||||
y => "Tishrey"
|
|
||||||
hebdate(2, "Tishrey") => 1991/09/10
|
|
||||||
trigger(1991/09/10) => "10 September 1991"
|
|
||||||
Leaving UserFN _h() => "10 September 1991"
|
|
||||||
.\test.rem(12): Trig = Tuesday, 10 September, 1991
|
|
||||||
[_h(3, "Tishrey")] MSG Tzom Gedalia
|
|
||||||
Entering UserFN _h(3, "Tishrey")
|
|
||||||
x => 3
|
|
||||||
y => "Tishrey"
|
|
||||||
hebdate(3, "Tishrey") => 1991/09/11
|
|
||||||
trigger(1991/09/11) => "11 September 1991"
|
|
||||||
Leaving UserFN _h() => "11 September 1991"
|
|
||||||
.\test.rem(13): Trig = Wednesday, 11 September, 1991
|
|
||||||
[_h(10, "Tishrey")] MSG Yom Kippur
|
|
||||||
Entering UserFN _h(10, "Tishrey")
|
|
||||||
x => 10
|
|
||||||
y => "Tishrey"
|
|
||||||
hebdate(10, "Tishrey") => 1991/09/18
|
|
||||||
trigger(1991/09/18) => "18 September 1991"
|
|
||||||
Leaving UserFN _h() => "18 September 1991"
|
|
||||||
.\test.rem(14): Trig = Wednesday, 18 September, 1991
|
|
||||||
[_h(15, "Tishrey")] MSG Sukkot 1
|
|
||||||
Entering UserFN _h(15, "Tishrey")
|
|
||||||
x => 15
|
|
||||||
y => "Tishrey"
|
|
||||||
hebdate(15, "Tishrey") => 1991/09/23
|
|
||||||
trigger(1991/09/23) => "23 September 1991"
|
|
||||||
Leaving UserFN _h() => "23 September 1991"
|
|
||||||
.\test.rem(15): Trig = Monday, 23 September, 1991
|
|
||||||
[_h(25, "Kislev")] MSG Channuka
|
|
||||||
Entering UserFN _h(25, "Kislev")
|
|
||||||
x => 25
|
|
||||||
y => "Kislev"
|
|
||||||
hebdate(25, "Kislev") => 1991/12/02
|
|
||||||
trigger(1991/12/02) => "2 December 1991"
|
|
||||||
Leaving UserFN _h() => "2 December 1991"
|
|
||||||
.\test.rem(16): Trig = Monday, 2 December, 1991
|
|
||||||
[_h(10, "Tevet")] MSG Asara B'Tevet
|
|
||||||
Entering UserFN _h(10, "Tevet")
|
|
||||||
x => 10
|
|
||||||
y => "Tevet"
|
|
||||||
hebdate(10, "Tevet") => 1991/12/17
|
|
||||||
trigger(1991/12/17) => "17 December 1991"
|
|
||||||
Leaving UserFN _h() => "17 December 1991"
|
|
||||||
.\test.rem(17): Trig = Tuesday, 17 December, 1991
|
|
||||||
[_h(15, "Shvat")] MSG Tu B'Shvat
|
|
||||||
Entering UserFN _h(15, "Shvat")
|
|
||||||
x => 15
|
|
||||||
y => "Shvat"
|
|
||||||
hebdate(15, "Shvat") => 1992/01/20
|
|
||||||
trigger(1992/01/20) => "20 January 1992"
|
|
||||||
Leaving UserFN _h() => "20 January 1992"
|
|
||||||
.\test.rem(18): Trig = Monday, 20 January, 1992
|
|
||||||
[_h(15, "Adar A")] MSG Purim Katan
|
|
||||||
Entering UserFN _h(15, "Adar A")
|
|
||||||
x => 15
|
|
||||||
y => "Adar A"
|
|
||||||
hebdate(15, "Adar A") => 1992/02/19
|
|
||||||
trigger(1992/02/19) => "19 February 1992"
|
|
||||||
Leaving UserFN _h() => "19 February 1992"
|
|
||||||
.\test.rem(19): Trig = Wednesday, 19 February, 1992
|
|
||||||
[_h(14, "Adar")] MSG Purim
|
|
||||||
Entering UserFN _h(14, "Adar")
|
|
||||||
x => 14
|
|
||||||
y => "Adar"
|
|
||||||
hebdate(14, "Adar") => 1991/02/28
|
|
||||||
trigger(1991/02/28) => "28 February 1991"
|
|
||||||
Leaving UserFN _h() => "28 February 1991"
|
|
||||||
.\test.rem(20): Trig = Thursday, 28 February, 1991
|
|
||||||
[_h(15, "Nisan")] MSG Pesach
|
|
||||||
Entering UserFN _h(15, "Nisan")
|
|
||||||
x => 15
|
|
||||||
y => "Nisan"
|
|
||||||
hebdate(15, "Nisan") => 1991/03/30
|
|
||||||
trigger(1991/03/30) => "30 March 1991"
|
|
||||||
Leaving UserFN _h() => "30 March 1991"
|
|
||||||
.\test.rem(21): Trig = Saturday, 30 March, 1991
|
|
||||||
[_h(27, "Nisan")] MSG Yom HaShoah
|
|
||||||
Entering UserFN _h(27, "Nisan")
|
|
||||||
x => 27
|
|
||||||
y => "Nisan"
|
|
||||||
hebdate(27, "Nisan") => 1991/04/11
|
|
||||||
trigger(1991/04/11) => "11 April 1991"
|
|
||||||
Leaving UserFN _h() => "11 April 1991"
|
|
||||||
.\test.rem(22): Trig = Thursday, 11 April, 1991
|
|
||||||
[_h(4, "Iyar")] MSG Yom HaZikaron
|
|
||||||
Entering UserFN _h(4, "Iyar")
|
|
||||||
x => 4
|
|
||||||
y => "Iyar"
|
|
||||||
hebdate(4, "Iyar") => 1991/04/18
|
|
||||||
trigger(1991/04/18) => "18 April 1991"
|
|
||||||
Leaving UserFN _h() => "18 April 1991"
|
|
||||||
.\test.rem(23): Trig = Thursday, 18 April, 1991
|
|
||||||
[_h(5, "Iyar")] MSG Yom Ha'atzmaut
|
|
||||||
Entering UserFN _h(5, "Iyar")
|
|
||||||
x => 5
|
|
||||||
y => "Iyar"
|
|
||||||
hebdate(5, "Iyar") => 1991/04/19
|
|
||||||
trigger(1991/04/19) => "19 April 1991"
|
|
||||||
Leaving UserFN _h() => "19 April 1991"
|
|
||||||
.\test.rem(24): Trig = Friday, 19 April, 1991
|
|
||||||
[_h(28, "Iyar")] MSG Yom Yerushalayim
|
|
||||||
Entering UserFN _h(28, "Iyar")
|
|
||||||
x => 28
|
|
||||||
y => "Iyar"
|
|
||||||
hebdate(28, "Iyar") => 1991/05/12
|
|
||||||
trigger(1991/05/12) => "12 May 1991"
|
|
||||||
Leaving UserFN _h() => "12 May 1991"
|
|
||||||
.\test.rem(25): Trig = Sunday, 12 May, 1991
|
|
||||||
[_h(6, "Sivan")] MSG Shavuot
|
|
||||||
Entering UserFN _h(6, "Sivan")
|
|
||||||
x => 6
|
|
||||||
y => "Sivan"
|
|
||||||
hebdate(6, "Sivan") => 1991/05/19
|
|
||||||
trigger(1991/05/19) => "19 May 1991"
|
|
||||||
Leaving UserFN _h() => "19 May 1991"
|
|
||||||
.\test.rem(26): Trig = Sunday, 19 May, 1991
|
|
||||||
[_h(9, "Av")] MSG Tish'a B'Av
|
|
||||||
Entering UserFN _h(9, "Av")
|
|
||||||
x => 9
|
|
||||||
y => "Av"
|
|
||||||
hebdate(9, "Av") => 1991/07/20
|
|
||||||
trigger(1991/07/20) => "20 July 1991"
|
|
||||||
Leaving UserFN _h() => "20 July 1991"
|
|
||||||
.\test.rem(27): Trig = Saturday, 20 July, 1991
|
|
||||||
|
|
||||||
# Test some jahrzeit cases
|
|
||||||
fset _i(x,y,z,a) trigger(hebdate(x,y,z,a))
|
|
||||||
[_i(30, "Heshvan", today(), 5759)] MSG Complete-Complete
|
|
||||||
today() => 1991/02/16
|
|
||||||
Entering UserFN _i(30, "Heshvan", 1991/02/16, 5759)
|
|
||||||
x => 30
|
|
||||||
y => "Heshvan"
|
|
||||||
z => 1991/02/16
|
|
||||||
a => 5759
|
|
||||||
hebdate(30, "Heshvan", 1991/02/16, 5759) => 1991/11/07
|
|
||||||
trigger(1991/11/07) => "7 November 1991"
|
|
||||||
Leaving UserFN _i() => "7 November 1991"
|
|
||||||
.\test.rem(31): Trig = Thursday, 7 November, 1991
|
|
||||||
[_i(30, "Heshvan", today(), 5760)] MSG Complete-Defective
|
|
||||||
today() => 1991/02/16
|
|
||||||
Entering UserFN _i(30, "Heshvan", 1991/02/16, 5760)
|
|
||||||
x => 30
|
|
||||||
y => "Heshvan"
|
|
||||||
z => 1991/02/16
|
|
||||||
a => 5760
|
|
||||||
hebdate(30, "Heshvan", 1991/02/16, 5760) => 1991/11/07
|
|
||||||
trigger(1991/11/07) => "7 November 1991"
|
|
||||||
Leaving UserFN _i() => "7 November 1991"
|
|
||||||
.\test.rem(32): Trig = Thursday, 7 November, 1991
|
|
||||||
[_i(30, "Heshvan", today(), 5761)] MSG Illegal
|
|
||||||
today() => 1991/02/16
|
|
||||||
Entering UserFN _i(30, "Heshvan", 1991/02/16, 5761)
|
|
||||||
x => 30
|
|
||||||
y => "Heshvan"
|
|
||||||
z => 1991/02/16
|
|
||||||
a => 5761
|
|
||||||
hebdate(30, "Heshvan", 1991/02/16, 5761) => .\test.rem(33): 30 Heshvan 5761: Invalid Hebrew date
|
|
||||||
Invalid Hebrew date
|
|
||||||
Leaving UserFN _i() => Invalid Hebrew date
|
|
||||||
|
|
||||||
[_i(30, "Kislev", today(), 5759)] MSG Complete-Complete
|
|
||||||
today() => 1991/02/16
|
|
||||||
Entering UserFN _i(30, "Kislev", 1991/02/16, 5759)
|
|
||||||
x => 30
|
|
||||||
y => "Kislev"
|
|
||||||
z => 1991/02/16
|
|
||||||
a => 5759
|
|
||||||
hebdate(30, "Kislev", 1991/02/16, 5759) => 1991/12/07
|
|
||||||
trigger(1991/12/07) => "7 December 1991"
|
|
||||||
Leaving UserFN _i() => "7 December 1991"
|
|
||||||
.\test.rem(35): Trig = Saturday, 7 December, 1991
|
|
||||||
[_i(30, "Kislev", today(), 5760)] MSG Complete-Defective
|
|
||||||
today() => 1991/02/16
|
|
||||||
Entering UserFN _i(30, "Kislev", 1991/02/16, 5760)
|
|
||||||
x => 30
|
|
||||||
y => "Kislev"
|
|
||||||
z => 1991/02/16
|
|
||||||
a => 5760
|
|
||||||
hebdate(30, "Kislev", 1991/02/16, 5760) => 1991/12/07
|
|
||||||
trigger(1991/12/07) => "7 December 1991"
|
|
||||||
Leaving UserFN _i() => "7 December 1991"
|
|
||||||
.\test.rem(36): Trig = Saturday, 7 December, 1991
|
|
||||||
[_i(30, "Kislev", today(), 5761)] MSG Illegal
|
|
||||||
today() => 1991/02/16
|
|
||||||
Entering UserFN _i(30, "Kislev", 1991/02/16, 5761)
|
|
||||||
x => 30
|
|
||||||
y => "Kislev"
|
|
||||||
z => 1991/02/16
|
|
||||||
a => 5761
|
|
||||||
hebdate(30, "Kislev", 1991/02/16, 5761) => .\test.rem(37): 30 Kislev 5761: Invalid Hebrew date
|
|
||||||
Invalid Hebrew date
|
|
||||||
Leaving UserFN _i() => Invalid Hebrew date
|
|
||||||
|
|
||||||
[_i(30, "Adar A", today(), 5755)] MSG Leap
|
|
||||||
today() => 1991/02/16
|
|
||||||
Entering UserFN _i(30, "Adar A", 1991/02/16, 5755)
|
|
||||||
x => 30
|
|
||||||
y => "Adar A"
|
|
||||||
z => 1991/02/16
|
|
||||||
a => 5755
|
|
||||||
hebdate(30, "Adar A", 1991/02/16, 5755) => 1992/03/05
|
|
||||||
trigger(1992/03/05) => "5 March 1992"
|
|
||||||
Leaving UserFN _i() => "5 March 1992"
|
|
||||||
.\test.rem(39): Trig = Thursday, 5 March, 1992
|
|
||||||
[_i(30, "Adar A", today(), 5756)] MSG Illegal
|
|
||||||
today() => 1991/02/16
|
|
||||||
Entering UserFN _i(30, "Adar A", 1991/02/16, 5756)
|
|
||||||
x => 30
|
|
||||||
y => "Adar A"
|
|
||||||
z => 1991/02/16
|
|
||||||
a => 5756
|
|
||||||
hebdate(30, "Adar A", 1991/02/16, 5756) => .\test.rem(40): No Adar A in 5756
|
|
||||||
Invalid Hebrew date
|
|
||||||
Leaving UserFN _i() => Invalid Hebrew date
|
|
||||||
[_i(29, "Adar A", today(), 5755)] MSG Leap
|
|
||||||
today() => 1991/02/16
|
|
||||||
Entering UserFN _i(29, "Adar A", 1991/02/16, 5755)
|
|
||||||
x => 29
|
|
||||||
y => "Adar A"
|
|
||||||
z => 1991/02/16
|
|
||||||
a => 5755
|
|
||||||
hebdate(29, "Adar A", 1991/02/16, 5755) => 1991/03/15
|
|
||||||
trigger(1991/03/15) => "15 March 1991"
|
|
||||||
Leaving UserFN _i() => "15 March 1991"
|
|
||||||
.\test.rem(41): Trig = Friday, 15 March, 1991
|
|
||||||
[_i(29, "Adar A", today(), 5756)] MSG Illegal
|
|
||||||
today() => 1991/02/16
|
|
||||||
Entering UserFN _i(29, "Adar A", 1991/02/16, 5756)
|
|
||||||
x => 29
|
|
||||||
y => "Adar A"
|
|
||||||
z => 1991/02/16
|
|
||||||
a => 5756
|
|
||||||
hebdate(29, "Adar A", 1991/02/16, 5756) => .\test.rem(42): No Adar A in 5756
|
|
||||||
Invalid Hebrew date
|
|
||||||
Leaving UserFN _i() => Invalid Hebrew date
|
|
||||||
|
|
||||||
# Test each possible case of the basic reminders.
|
|
||||||
|
|
||||||
REM MSG Every Day
|
|
||||||
.\test.rem(46): Trig = Saturday, 16 February, 1991
|
|
||||||
Every Day
|
|
||||||
|
|
||||||
|
|
||||||
REM 18 MSG Every 18th
|
|
||||||
.\test.rem(48): Trig = Monday, 18 February, 1991
|
|
||||||
REM 15 MSG Every 15th
|
|
||||||
.\test.rem(49): Trig = Friday, 15 March, 1991
|
|
||||||
|
|
||||||
REM Feb MSG February
|
|
||||||
.\test.rem(51): Trig = Saturday, 16 February, 1991
|
|
||||||
February
|
|
||||||
|
|
||||||
REM Jan MSG January
|
|
||||||
.\test.rem(52): Trig = Wednesday, 1 January, 1992
|
|
||||||
REM March MSG March
|
|
||||||
.\test.rem(53): Trig = Friday, 1 March, 1991
|
|
||||||
|
|
||||||
REM 13 Jan MSG 13 Jan
|
|
||||||
.\test.rem(55): Trig = Monday, 13 January, 1992
|
|
||||||
REM 15 Feb MSG 15 Feb
|
|
||||||
.\test.rem(56): Trig = Saturday, 15 February, 1992
|
|
||||||
REM 28 Feb MSG 28 Feb
|
|
||||||
.\test.rem(57): Trig = Thursday, 28 February, 1991
|
|
||||||
REM 29 Feb MSG 29 Feb
|
|
||||||
.\test.rem(58): Trig = Saturday, 29 February, 1992
|
|
||||||
REM 5 Mar MSG 5 Mar
|
|
||||||
.\test.rem(59): Trig = Tuesday, 5 March, 1991
|
|
||||||
|
|
||||||
REM 1990 MSG 1990
|
|
||||||
.\test.rem(61): Expired
|
|
||||||
REM 1991 MSG 1991
|
|
||||||
.\test.rem(62): Trig = Saturday, 16 February, 1991
|
|
||||||
1991
|
|
||||||
|
|
||||||
REM 1992 MSG 1991
|
|
||||||
.\test.rem(63): Trig = Wednesday, 1 January, 1992
|
|
||||||
|
|
||||||
REM 1 1990 MSG 1 1990
|
|
||||||
.\test.rem(65): Expired
|
|
||||||
REM 29 1991 MSG 29 1991
|
|
||||||
.\test.rem(66): Trig = Friday, 29 March, 1991
|
|
||||||
REM 29 1992 MSG 29 1992
|
|
||||||
.\test.rem(67): Trig = Wednesday, 29 January, 1992
|
|
||||||
REM 16 1991 MSG 16 1991
|
|
||||||
.\test.rem(68): Trig = Saturday, 16 February, 1991
|
|
||||||
16 1991
|
|
||||||
|
|
||||||
|
|
||||||
REM Jan 1990 MSG Jan 1990
|
|
||||||
.\test.rem(70): Expired
|
|
||||||
REM Feb 1991 MSG Feb 1991
|
|
||||||
.\test.rem(71): Trig = Saturday, 16 February, 1991
|
|
||||||
Feb 1991
|
|
||||||
|
|
||||||
REM Dec 1991 MSG Dec 1991
|
|
||||||
.\test.rem(72): Trig = Sunday, 1 December, 1991
|
|
||||||
REM May 1992 MSG May 1992
|
|
||||||
.\test.rem(73): Trig = Friday, 1 May, 1992
|
|
||||||
|
|
||||||
REM 1 Jan 1991 MSG 1 Jan 1991
|
|
||||||
.\test.rem(75): Expired
|
|
||||||
REM 16 Feb 1991 MSG 16 Feb 1991
|
|
||||||
.\test.rem(76): Trig = Saturday, 16 February, 1991
|
|
||||||
16 Feb 1991
|
|
||||||
|
|
||||||
REM 29 Dec 1992 MSG 29 Dec 1992
|
|
||||||
.\test.rem(77): Trig = Tuesday, 29 December, 1992
|
|
||||||
|
|
||||||
REM Sun MSG Sun
|
|
||||||
.\test.rem(79): Trig = Sunday, 17 February, 1991
|
|
||||||
REM Fri Sat Tue MSG Fri Sat Tue
|
|
||||||
.\test.rem(80): Trig = Saturday, 16 February, 1991
|
|
||||||
Fri Sat Tue
|
|
||||||
|
|
||||||
|
|
||||||
REM Sun 16 MSG Sun 16
|
|
||||||
.\test.rem(82): Trig = Sunday, 17 February, 1991
|
|
||||||
REM Mon Tue Wed Thu Fri 1 MSG Mon Tue Wed Thu Fri 1
|
|
||||||
.\test.rem(83): Trig = Friday, 1 March, 1991
|
|
||||||
|
|
||||||
REM Sun Feb MSG Sun Feb
|
|
||||||
.\test.rem(85): Trig = Sunday, 17 February, 1991
|
|
||||||
REM Mon Tue March MSG Mon Tue March
|
|
||||||
.\test.rem(86): Trig = Monday, 4 March, 1991
|
|
||||||
|
|
||||||
REM Sun 16 Feb MSG Sun 16 Feb
|
|
||||||
.\test.rem(88): Trig = Sunday, 17 February, 1991
|
|
||||||
REM Mon Tue 10 March MSG Mon Tue 10 March
|
|
||||||
.\test.rem(89): Trig = Monday, 11 March, 1991
|
|
||||||
|
|
||||||
REM Sat Sun 1991 MSG Sat Sun 1991
|
|
||||||
.\test.rem(91): Trig = Saturday, 16 February, 1991
|
|
||||||
Sat Sun 1991
|
|
||||||
|
|
||||||
REM Mon Tue 1992 MSG Mon Tue 1992
|
|
||||||
.\test.rem(92): Trig = Monday, 6 January, 1992
|
|
||||||
|
|
||||||
REM Sun 16 1991 MSG Sun 16 1991
|
|
||||||
.\test.rem(94): Trig = Sunday, 17 February, 1991
|
|
||||||
REM Mon Tue Wed Thu Fri 1 1992 MSG Mon Tue Wed Thu Fri 1 1992
|
|
||||||
.\test.rem(95): Trig = Wednesday, 1 January, 1992
|
|
||||||
|
|
||||||
REM Mon Feb 1991 MSG Mon Feb 1991
|
|
||||||
.\test.rem(97): Trig = Monday, 18 February, 1991
|
|
||||||
REM Tue Jan 1992 MSG Tue Jan 1992
|
|
||||||
.\test.rem(98): Trig = Tuesday, 7 January, 1992
|
|
||||||
|
|
||||||
REM Sun Mon 16 Feb 1991 MSG Sun Mon 16 Feb 1991
|
|
||||||
.\test.rem(100): Trig = Sunday, 17 February, 1991
|
|
||||||
REM Tue 28 Jan 1992 MSG Tue 28 Jan 1992
|
|
||||||
.\test.rem(101): Trig = Tuesday, 28 January, 1992
|
|
||||||
|
|
||||||
# Try some Backs
|
|
||||||
CLEAR-OMIT-CONTEXT
|
|
||||||
REM 1 -1 OMIT sat sun MSG 1 -1 OMIT Sat Sun
|
|
||||||
.\test.rem(105): Trig = Thursday, 28 February, 1991
|
|
||||||
REM 1 --1 OMIT sat sun MSG 1 --1 OMIT Sat Sun
|
|
||||||
.\test.rem(106): Trig = Thursday, 28 February, 1991
|
|
||||||
|
|
||||||
OMIT 28 Feb
|
|
||||||
REM 1 -1 OMIT sat sun MSG 1 -1 OMIT Sat Sun (28 Feb omitted)
|
|
||||||
.\test.rem(109): Trig = Wednesday, 27 February, 1991
|
|
||||||
REM 1 --1 OMIT sat sun MSG 1 --1 OMIT Sat Sun (28 Feb omitted)
|
|
||||||
.\test.rem(110): Trig = Thursday, 28 February, 1991
|
|
||||||
|
|
||||||
CLEAR-OMIT-CONTEXT
|
|
||||||
|
|
||||||
# Try out UNTIL
|
|
||||||
REM Wed UNTIL 21 Feb 1991 MSG Wed UNTIL 21 Feb 1991
|
|
||||||
.\test.rem(115): Trig = Wednesday, 20 February, 1991
|
|
||||||
|
|
||||||
# Try playing with the OMIT context
|
|
||||||
|
|
||||||
OMIT 28 Feb 1991
|
|
||||||
REM 1 Mar -1 MSG 1 mar -1 (28feb91 omitted)
|
|
||||||
.\test.rem(120): Trig = Wednesday, 27 February, 1991
|
|
||||||
REM 1 Mar --1 MSG 1 mar --1 (28Feb91 omitted)
|
|
||||||
.\test.rem(121): Trig = Thursday, 28 February, 1991
|
|
||||||
REM 28 Feb BEFORE MSG 28 Feb BEFORE (28Feb91 omitted)
|
|
||||||
.\test.rem(122): Trig = Wednesday, 27 February, 1991
|
|
||||||
REM 28 Feb SKIP MSG 28 Feb SKIP (28Feb91 omitted)
|
|
||||||
.\test.rem(123): Trig = Friday, 28 February, 1992
|
|
||||||
REM 28 Feb AFTER MSG 28 Feb AFTER (28Feb91 omitted)
|
|
||||||
.\test.rem(124): Trig = Friday, 1 March, 1991
|
|
||||||
|
|
||||||
PUSH-OMIT-CONTEXT
|
|
||||||
CLEAR-OMIT-CONTEXT
|
|
||||||
REM 1 Mar -1 MSG 1 mar -1
|
|
||||||
.\test.rem(128): Trig = Thursday, 28 February, 1991
|
|
||||||
REM 1 Mar --1 MSG 1 mar --1
|
|
||||||
.\test.rem(129): Trig = Thursday, 28 February, 1991
|
|
||||||
REM 28 Feb BEFORE MSG 28 Feb BEFORE
|
|
||||||
.\test.rem(130): Trig = Thursday, 28 February, 1991
|
|
||||||
REM 28 Feb SKIP MSG 28 Feb SKIP
|
|
||||||
.\test.rem(131): Trig = Thursday, 28 February, 1991
|
|
||||||
REM 28 Feb AFTER MSG 28 Feb AFTER
|
|
||||||
.\test.rem(132): Trig = Thursday, 28 February, 1991
|
|
||||||
|
|
||||||
POP-OMIT-CONTEXT
|
|
||||||
REM 1 Mar -1 MSG 1 mar -1 (28feb91 omitted)
|
|
||||||
.\test.rem(135): Trig = Wednesday, 27 February, 1991
|
|
||||||
REM 1 Mar --1 MSG 1 mar --1 (28Feb91 omitted)
|
|
||||||
.\test.rem(136): Trig = Thursday, 28 February, 1991
|
|
||||||
REM 28 Feb BEFORE MSG 28 Feb BEFORE (28Feb91 omitted)
|
|
||||||
.\test.rem(137): Trig = Wednesday, 27 February, 1991
|
|
||||||
REM 28 Feb SKIP MSG 28 Feb SKIP (28Feb91 omitted)
|
|
||||||
.\test.rem(138): Trig = Friday, 28 February, 1992
|
|
||||||
REM 28 Feb AFTER MSG 28 Feb AFTER (28Feb91 omitted)
|
|
||||||
.\test.rem(139): Trig = Friday, 1 March, 1991
|
|
||||||
|
|
||||||
|
|
||||||
REM 13 March 1991 *1 UNTIL 19 March 1991 MSG 13-19 Mar 91
|
|
||||||
.\test.rem(142): Trig = Wednesday, 13 March, 1991
|
|
||||||
|
|
||||||
# Test BACK
|
|
||||||
CLEAR-OMIT-CONTEXT
|
|
||||||
REM 18 Feb 1991 +1 MSG 18 Feb 1991 +1
|
|
||||||
.\test.rem(146): Trig = Monday, 18 February, 1991
|
|
||||||
|
|
||||||
OMIT 17 Feb 1991
|
|
||||||
REM 18 Feb 1991 +1 MSG 18 Feb 1991 +1 (17Feb91 omitted)
|
|
||||||
.\test.rem(149): Trig = Monday, 18 February, 1991
|
|
||||||
18 Feb 1991 +1 (17Feb91 omitted)
|
|
||||||
|
|
||||||
REM 18 Feb 1991 ++1 MSG 18 Feb 1991 ++1 (17Feb91 omitted)
|
|
||||||
.\test.rem(150): Trig = Monday, 18 February, 1991
|
|
||||||
|
|
||||||
CLEAR-OMIT-CONTEXT
|
|
||||||
# Test the scanfrom clause
|
|
||||||
REM Fri SATISFY 1
|
|
||||||
.\test.rem(154): Trig = Friday, 22 February, 1991
|
|
||||||
OMIT [trigger(trigdate())]
|
|
||||||
trigdate() => 1991/02/22
|
|
||||||
trigger(1991/02/22) => "22 February 1991"
|
|
||||||
REM Fri after MSG 23 Feb 1991
|
|
||||||
.\test.rem(156): Trig = Saturday, 23 February, 1991
|
|
||||||
CLEAR-OMIT-CONTEXT
|
|
||||||
REM Fri SCANFROM [trigger(today()-7)] SATISFY 1
|
|
||||||
today() => 1991/02/16
|
|
||||||
1991/02/16 - 7 => 1991/02/09
|
|
||||||
trigger(1991/02/09) => "9 February 1991"
|
|
||||||
.\test.rem(158): Trig = Friday, 15 February, 1991
|
|
||||||
OMIT [trigger(trigdate())]
|
|
||||||
trigdate() => 1991/02/15
|
|
||||||
trigger(1991/02/15) => "15 February 1991"
|
|
||||||
REM Fri after MSG 16 Feb 1991
|
|
||||||
.\test.rem(160): Trig = Saturday, 16 February, 1991
|
|
||||||
16 Feb 1991
|
|
||||||
|
|
||||||
CLEAR-OMIT-CONTEXT
|
|
||||||
set a000 abs(1)
|
|
||||||
abs(1) => 1
|
|
||||||
set a001 abs(-1)
|
|
||||||
- 1 => -1
|
|
||||||
abs(-1) => 1
|
|
||||||
set a002 asc("foo")
|
|
||||||
asc("foo") => 102
|
|
||||||
set a003 baseyr()
|
|
||||||
baseyr() => 1990
|
|
||||||
set a004 char(66,55,66,77,66)
|
|
||||||
char(66, 55, 66, 77, 66) => "B7BMB"
|
|
||||||
set a005 choose(3, "foo", "bar", "baz", "blech")
|
|
||||||
choose(3, "foo", "bar", "baz", "blech") => "baz"
|
|
||||||
set a006 coerce("string", 1)
|
|
||||||
coerce("string", 1) => "1"
|
|
||||||
set a007 coerce("string", today())
|
|
||||||
today() => 1991/02/16
|
|
||||||
coerce("string", 1991/02/16) => "1991/02/16"
|
|
||||||
set a008 coerce("string", 11:44)
|
|
||||||
coerce("string", 11:44) => "11:44"
|
|
||||||
set a009 coerce("int", "badnews")
|
|
||||||
coerce("int", "badnews") => Can't coerce
|
|
||||||
.\test.rem(171): Can't coerce
|
|
||||||
set a010 coerce("int", "12")
|
|
||||||
coerce("int", "12") => 12
|
|
||||||
set a011 coerce("int", 11:44)
|
|
||||||
coerce("int", 11:44) => 704
|
|
||||||
set a012 coerce("int", today())
|
|
||||||
today() => 1991/02/16
|
|
||||||
coerce("int", 1991/02/16) => 411
|
|
||||||
set a013 date(1992, 2, 2)
|
|
||||||
date(1992, 2, 2) => 1992/02/02
|
|
||||||
set a014 date(1993, 2, 29)
|
|
||||||
date(1993, 2, 29) => Bad date specification
|
|
||||||
.\test.rem(176): Bad date specification
|
|
||||||
set a015 day(today())
|
|
||||||
today() => 1991/02/16
|
|
||||||
day(1991/02/16) => 16
|
|
||||||
set a016 daysinmon(2, 1991)
|
|
||||||
daysinmon(2, 1991) => 28
|
|
||||||
set a017 daysinmon(2, 1992)
|
|
||||||
daysinmon(2, 1992) => 29
|
|
||||||
set a018 defined("a017")
|
|
||||||
defined("a017") => 1
|
|
||||||
set a019 defined("a019")
|
|
||||||
defined("a019") => 0
|
|
||||||
set a020 filename()
|
|
||||||
filename() => ".\test.rem"
|
|
||||||
set a021 getenv("TEST_GETENV")
|
|
||||||
getenv("TEST_GETENV") => "foo bar baz"
|
|
||||||
set a022 hour(11:22)
|
|
||||||
hour(11:22) => 11
|
|
||||||
set a023 iif(1, 1, 0)
|
|
||||||
iif(1, 1, 0) => 1
|
|
||||||
set a024 iif(0, 1, 0)
|
|
||||||
iif(0, 1, 0) => 0
|
|
||||||
set a025 index("barfoobar", "foo")
|
|
||||||
index("barfoobar", "foo") => 4
|
|
||||||
set a026 index("barfoobar", "bar", 2)
|
|
||||||
index("barfoobar", "bar", 2) => 7
|
|
||||||
set a027 isleap(today())
|
|
||||||
today() => 1991/02/16
|
|
||||||
isleap(1991/02/16) => 0
|
|
||||||
set a028 isleap(1992)
|
|
||||||
isleap(1992) => 1
|
|
||||||
omit [trigger(today())]
|
|
||||||
today() => 1991/02/16
|
|
||||||
trigger(1991/02/16) => "16 February 1991"
|
|
||||||
set a030 isomitted(today())
|
|
||||||
today() => 1991/02/16
|
|
||||||
isomitted(1991/02/16) => 1
|
|
||||||
clear
|
|
||||||
set a029 isomitted(today())
|
|
||||||
today() => 1991/02/16
|
|
||||||
isomitted(1991/02/16) => 0
|
|
||||||
set a031 lower("FOOBARBAZ")
|
|
||||||
lower("FOOBARBAZ") => "foobarbaz"
|
|
||||||
set a032 max(1, 2, 34, 1, 3)
|
|
||||||
max(1, 2, 34, 1, 3) => 34
|
|
||||||
set a033 max("foo", "bar", "baz")
|
|
||||||
max("foo", "bar", "baz") => "foo"
|
|
||||||
set a034 max(today(), today()+1, today()-1)
|
|
||||||
today() => 1991/02/16
|
|
||||||
today() => 1991/02/16
|
|
||||||
1991/02/16 + 1 => 1991/02/17
|
|
||||||
today() => 1991/02/16
|
|
||||||
1991/02/16 - 1 => 1991/02/15
|
|
||||||
max(1991/02/16, 1991/02/17, 1991/02/15) => 1991/02/17
|
|
||||||
set a035 min(1, 2, 34, 1, 3)
|
|
||||||
min(1, 2, 34, 1, 3) => 1
|
|
||||||
set a036 min("foo", "bar", "baz")
|
|
||||||
min("foo", "bar", "baz") => "bar"
|
|
||||||
set a037 min(today(), today()+1, today()-1)
|
|
||||||
today() => 1991/02/16
|
|
||||||
today() => 1991/02/16
|
|
||||||
1991/02/16 + 1 => 1991/02/17
|
|
||||||
today() => 1991/02/16
|
|
||||||
1991/02/16 - 1 => 1991/02/15
|
|
||||||
min(1991/02/16, 1991/02/17, 1991/02/15) => 1991/02/15
|
|
||||||
set a038 minute(11:33)
|
|
||||||
minute(11:33) => 33
|
|
||||||
set a039 mon(today())
|
|
||||||
today() => 1991/02/16
|
|
||||||
mon(1991/02/16) => "February"
|
|
||||||
set a040 monnum(today())
|
|
||||||
today() => 1991/02/16
|
|
||||||
monnum(1991/02/16) => 2
|
|
||||||
set a041 ord(3)
|
|
||||||
ord(3) => "3rd"
|
|
||||||
set a042 ord(4)
|
|
||||||
ord(4) => "4th"
|
|
||||||
set a043 ostype()
|
|
||||||
ostype() => "MSDOS"
|
|
||||||
set a044 plural(2)
|
|
||||||
plural(2) => "s"
|
|
||||||
set a045 plural(2, "ies")
|
|
||||||
plural(2, "ies") => "iess"
|
|
||||||
set a046 plural(2, "y", "ies")
|
|
||||||
plural(2, "y", "ies") => "ies"
|
|
||||||
set a047 sgn(-2)
|
|
||||||
- 2 => -2
|
|
||||||
sgn(-2) => -1
|
|
||||||
set a048 shell("echo foo")
|
|
||||||
shell("echo foo") => "foo"
|
|
||||||
set a049 strlen("sadjflkhsldkfhsdlfjhk")
|
|
||||||
strlen("sadjflkhsldkfhsdlfjhk") => 21
|
|
||||||
set a050 substr(a049, 2)
|
|
||||||
a049 => 21
|
|
||||||
substr(21, 2) => Type mismatch
|
|
||||||
.\test.rem(214): Type mismatch
|
|
||||||
set a051 substr(a050, 2, 6)
|
|
||||||
a050 => .\test.rem(215): Undefined variable: a050
|
|
||||||
set a052 time(1+2, 3+4)
|
|
||||||
1 + 2 => 3
|
|
||||||
3 + 4 => 7
|
|
||||||
time(3, 7) => 03:07
|
|
||||||
rem 10 jan 1992 AT 11:22 CAL
|
|
||||||
.\test.rem(217): Trig = Friday, 10 January, 1992
|
|
||||||
set a053 trigdate()
|
|
||||||
trigdate() => 1992/01/10
|
|
||||||
set a054 trigtime()
|
|
||||||
trigtime() => 11:22
|
|
||||||
set a055 trigvalid()
|
|
||||||
trigvalid() => 1
|
|
||||||
set a056 upper("sdfjhsdf ksjdfh kjsdfh ksjdfh")
|
|
||||||
upper("sdfjhsdf ksjdfh kjsdfh ksjdfh") => "SDFJHSDF KSJDFH KJSDFH KSJDFH"
|
|
||||||
set a057 value("a05"+"6")
|
|
||||||
"a05" + "6" => "a056"
|
|
||||||
value("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH"
|
|
||||||
set a058 version()
|
|
||||||
version() => "03.00.19"
|
|
||||||
set a059 wkday(today())
|
|
||||||
today() => 1991/02/16
|
|
||||||
wkday(1991/02/16) => "Saturday"
|
|
||||||
set a060 wkdaynum(today())
|
|
||||||
today() => 1991/02/16
|
|
||||||
wkdaynum(1991/02/16) => 6
|
|
||||||
set a061 year(today())
|
|
||||||
today() => 1991/02/16
|
|
||||||
year(1991/02/16) => 1991
|
|
||||||
set a062 1+2*(3+4-(5*7/2))
|
|
||||||
3 + 4 => 7
|
|
||||||
5 * 7 => 35
|
|
||||||
35 / 2 => 17
|
|
||||||
7 - 17 => -10
|
|
||||||
2 * -10 => -20
|
|
||||||
1 + -20 => -19
|
|
||||||
set a063 1>=2
|
|
||||||
1 >= 2 => 0
|
|
||||||
set a064 1<2 || 3 > 4
|
|
||||||
1 < 2 => 1
|
|
||||||
3 > 4 => 0
|
|
||||||
1 || 0 => 1
|
|
||||||
set a065 1 && 1
|
|
||||||
1 && 1 => 1
|
|
||||||
set a066 !a065
|
|
||||||
a065 => 1
|
|
||||||
! 1 => 0
|
|
||||||
set a067 typeof(2)
|
|
||||||
typeof(2) => "INT"
|
|
||||||
set a068 typeof("foo")
|
|
||||||
typeof("foo") => "STRING"
|
|
||||||
set a069 typeof(11:33)
|
|
||||||
typeof(11:33) => "TIME"
|
|
||||||
set a070 typeof(today())
|
|
||||||
today() => 1991/02/16
|
|
||||||
typeof(1991/02/16) => "DATE"
|
|
||||||
fset g(x,y) max(x,y)
|
|
||||||
fset h(x,y) min(g(x+y, x*y), g(x-y, x/y))
|
|
||||||
set a071 g(1, 2)
|
|
||||||
Entering UserFN g(1, 2)
|
|
||||||
x => 1
|
|
||||||
y => 2
|
|
||||||
max(1, 2) => 2
|
|
||||||
Leaving UserFN g() => 2
|
|
||||||
set a072 h(2, 3)
|
|
||||||
Entering UserFN h(2, 3)
|
|
||||||
x => 2
|
|
||||||
y => 3
|
|
||||||
2 + 3 => 5
|
|
||||||
x => 2
|
|
||||||
y => 3
|
|
||||||
2 * 3 => 6
|
|
||||||
Entering UserFN g(5, 6)
|
|
||||||
x => 5
|
|
||||||
y => 6
|
|
||||||
max(5, 6) => 6
|
|
||||||
Leaving UserFN g() => 6
|
|
||||||
x => 2
|
|
||||||
y => 3
|
|
||||||
2 - 3 => -1
|
|
||||||
x => 2
|
|
||||||
y => 3
|
|
||||||
2 / 3 => 0
|
|
||||||
Entering UserFN g(-1, 0)
|
|
||||||
x => -1
|
|
||||||
y => 0
|
|
||||||
max(-1, 0) => 0
|
|
||||||
Leaving UserFN g() => 0
|
|
||||||
min(6, 0) => 0
|
|
||||||
Leaving UserFN h() => 0
|
|
||||||
set a073 h("foo", 11:33)
|
|
||||||
Entering UserFN h("foo", 11:33)
|
|
||||||
x => "foo"
|
|
||||||
y => 11:33
|
|
||||||
"foo" + 11:33 => "foo11:33"
|
|
||||||
x => "foo"
|
|
||||||
y => 11:33
|
|
||||||
"foo" * 11:33 => Type mismatch
|
|
||||||
.\test.rem(240): `*': Type mismatch
|
|
||||||
Leaving UserFN h() => Type mismatch
|
|
||||||
set a074 dosubst("%a %b %c %d %e %f %g %h", '1992/5/5')
|
|
||||||
dosubst("%a %b %c %d %e %f %g %h", 1992/05/05) => "on Tuesday, 5 May, 1992 in 444 days' tim"...
|
|
||||||
msg [a074]%
|
|
||||||
.\test.rem(242): Trig = Saturday, 16 February, 1991
|
|
||||||
a074 => "on Tuesday, 5 May, 1992 in 444 days' tim"...
|
|
||||||
on Tuesday, 5 May, 1992 in 444 days' time on Tuesday 5 on 05/05/1992 on 05/05/1992 on Tuesday, 5 May on 05/05
|
|
||||||
set a075 dosubst("%i %j %k %l %m %n %o %p", '1992/5/5')
|
|
||||||
dosubst("%i %j %k %l %m %n %o %p", 1992/05/05) => "on 05/05 on Tuesday, May 5th, 1992 on Tu"...
|
|
||||||
msg [a075]%
|
|
||||||
.\test.rem(244): Trig = Saturday, 16 February, 1991
|
|
||||||
a075 => "on 05/05 on Tuesday, May 5th, 1992 on Tu"...
|
|
||||||
on 05/05 on Tuesday, May 5th, 1992 on Tuesday, May 5th on 1992/05/05 May 5 s
|
|
||||||
set a076 dosubst("%q %r %s %t %u %v %w %x", '1992/5/5')
|
|
||||||
dosubst("%q %r %s %t %u %v %w %x", 1992/05/05) => "s' 05 th 05 on Tuesday, 5th May, 1992 on"...
|
|
||||||
msg [a076]%
|
|
||||||
.\test.rem(246): Trig = Saturday, 16 February, 1991
|
|
||||||
a076 => "s' 05 th 05 on Tuesday, 5th May, 1992 on"...
|
|
||||||
s' 05 th 05 on Tuesday, 5th May, 1992 on Tuesday, 5th May Tuesday 444
|
|
||||||
set a077 dosubst("%y %z", '1992/5/5')
|
|
||||||
dosubst("%y %z", 1992/05/05) => "1992 92
|
|
||||||
"
|
|
||||||
msg [a077]%
|
|
||||||
.\test.rem(248): Trig = Saturday, 16 February, 1991
|
|
||||||
a077 => "1992 92
|
|
||||||
"
|
|
||||||
1992 92
|
|
||||||
set a078 easterdate(today())
|
|
||||||
today() => 1991/02/16
|
|
||||||
easterdate(1991/02/16) => 1991/03/31
|
|
||||||
set a079 easterdate(1992)
|
|
||||||
easterdate(1992) => 1992/04/19
|
|
||||||
set a080 easterdate(1995)
|
|
||||||
easterdate(1995) => 1995/04/16
|
|
||||||
set a081 ""
|
|
||||||
dump
|
|
||||||
Variable Value
|
|
||||||
|
|
||||||
a017 29
|
|
||||||
a036 "bar"
|
|
||||||
a055 1
|
|
||||||
a074 "on Tuesday, 5 May, 1992 in 444 days' tim"...
|
|
||||||
a008 "11:44"
|
|
||||||
a027 0
|
|
||||||
a046 "ies"
|
|
||||||
a065 1
|
|
||||||
a018 1
|
|
||||||
a037 1991/02/15
|
|
||||||
a056 "SDFJHSDF KSJDFH KJSDFH KSJDFH"
|
|
||||||
a075 "on 05/05 on Tuesday, May 5th, 1992 on Tu"...
|
|
||||||
a028 1
|
|
||||||
a047 -1
|
|
||||||
a066 0
|
|
||||||
a019 0
|
|
||||||
a038 33
|
|
||||||
a057 "SDFJHSDF KSJDFH KJSDFH KSJDFH"
|
|
||||||
a076 "s' 05 th 05 on Tuesday, 5th May, 1992 on"...
|
|
||||||
a029 0
|
|
||||||
a048 "foo"
|
|
||||||
a067 "INT"
|
|
||||||
a039 "February"
|
|
||||||
a058 "03.00.19"
|
|
||||||
a077 "1992 92
|
|
||||||
"
|
|
||||||
a049 21
|
|
||||||
a068 "STRING"
|
|
||||||
a059 "Saturday"
|
|
||||||
a078 1991/03/31
|
|
||||||
a069 "TIME"
|
|
||||||
a079 1992/04/19
|
|
||||||
a000 1
|
|
||||||
a010 12
|
|
||||||
a001 1
|
|
||||||
a020 ".\test.rem"
|
|
||||||
a011 704
|
|
||||||
a030 1
|
|
||||||
a002 102
|
|
||||||
a021 "foo bar baz"
|
|
||||||
a040 2
|
|
||||||
a012 411
|
|
||||||
a031 "foobarbaz"
|
|
||||||
a003 1990
|
|
||||||
a022 11
|
|
||||||
a041 "3rd"
|
|
||||||
a060 6
|
|
||||||
a013 1992/02/02
|
|
||||||
a032 34
|
|
||||||
a070 "DATE"
|
|
||||||
a004 "B7BMB"
|
|
||||||
a023 1
|
|
||||||
a042 "4th"
|
|
||||||
a061 1991
|
|
||||||
a080 1995/04/16
|
|
||||||
a033 "foo"
|
|
||||||
a052 03:07
|
|
||||||
a071 2
|
|
||||||
a005 "baz"
|
|
||||||
a024 0
|
|
||||||
a043 "MSDOS"
|
|
||||||
a062 -19
|
|
||||||
a081 ""
|
|
||||||
a015 16
|
|
||||||
a034 1991/02/17
|
|
||||||
a053 1992/01/10
|
|
||||||
a072 0
|
|
||||||
a006 "1"
|
|
||||||
a025 4
|
|
||||||
a044 "s"
|
|
||||||
a063 0
|
|
||||||
a016 28
|
|
||||||
a035 1
|
|
||||||
a054 11:22
|
|
||||||
a007 "1991/02/16"
|
|
||||||
a026 7
|
|
||||||
a045 "iess"
|
|
||||||
a064 1
|
|
||||||
|
|
||||||
830
tests/test2.cmp
@@ -1,830 +0,0 @@
|
|||||||
# Test file for REMIND
|
|
||||||
#
|
|
||||||
# Use this file to test the date calculation routines
|
|
||||||
# of the REMIND program by typing:
|
|
||||||
#
|
|
||||||
# ./test-rem # From WITHIN Remind source directory!
|
|
||||||
|
|
||||||
REM MSG Today is [hebday(today())] [hebmon(today())] [hebyear(today())]
|
|
||||||
.\test.rem(8): Trig = Saturday, 16 February, 1991
|
|
||||||
Reminders for Saturday, 16th February, 1991:
|
|
||||||
|
|
||||||
today() => 1991/02/16
|
|
||||||
hebday(1991/02/16) => 2
|
|
||||||
today() => 1991/02/16
|
|
||||||
hebmon(1991/02/16) => "Adar"
|
|
||||||
today() => 1991/02/16
|
|
||||||
hebyear(1991/02/16) => 5751
|
|
||||||
Today is 2 Adar 5751
|
|
||||||
|
|
||||||
fset _h(x, y) trigger(hebdate(x,y))
|
|
||||||
|
|
||||||
[_h(1, "Tishrey")] MSG Rosh Hashana 1
|
|
||||||
Entering UserFN _h(1, "Tishrey")
|
|
||||||
x => 1
|
|
||||||
y => "Tishrey"
|
|
||||||
hebdate(1, "Tishrey") => 1991/09/09
|
|
||||||
trigger(1991/09/09) => "9 September 1991"
|
|
||||||
Leaving UserFN _h() => "9 September 1991"
|
|
||||||
.\test.rem(11): Trig = Monday, 9 September, 1991
|
|
||||||
[_h(2, "Tishrey")] MSG Rosh Hashana 2
|
|
||||||
Entering UserFN _h(2, "Tishrey")
|
|
||||||
x => 2
|
|
||||||
y => "Tishrey"
|
|
||||||
hebdate(2, "Tishrey") => 1991/09/10
|
|
||||||
trigger(1991/09/10) => "10 September 1991"
|
|
||||||
Leaving UserFN _h() => "10 September 1991"
|
|
||||||
.\test.rem(12): Trig = Tuesday, 10 September, 1991
|
|
||||||
[_h(3, "Tishrey")] MSG Tzom Gedalia
|
|
||||||
Entering UserFN _h(3, "Tishrey")
|
|
||||||
x => 3
|
|
||||||
y => "Tishrey"
|
|
||||||
hebdate(3, "Tishrey") => 1991/09/11
|
|
||||||
trigger(1991/09/11) => "11 September 1991"
|
|
||||||
Leaving UserFN _h() => "11 September 1991"
|
|
||||||
.\test.rem(13): Trig = Wednesday, 11 September, 1991
|
|
||||||
[_h(10, "Tishrey")] MSG Yom Kippur
|
|
||||||
Entering UserFN _h(10, "Tishrey")
|
|
||||||
x => 10
|
|
||||||
y => "Tishrey"
|
|
||||||
hebdate(10, "Tishrey") => 1991/09/18
|
|
||||||
trigger(1991/09/18) => "18 September 1991"
|
|
||||||
Leaving UserFN _h() => "18 September 1991"
|
|
||||||
.\test.rem(14): Trig = Wednesday, 18 September, 1991
|
|
||||||
[_h(15, "Tishrey")] MSG Sukkot 1
|
|
||||||
Entering UserFN _h(15, "Tishrey")
|
|
||||||
x => 15
|
|
||||||
y => "Tishrey"
|
|
||||||
hebdate(15, "Tishrey") => 1991/09/23
|
|
||||||
trigger(1991/09/23) => "23 September 1991"
|
|
||||||
Leaving UserFN _h() => "23 September 1991"
|
|
||||||
.\test.rem(15): Trig = Monday, 23 September, 1991
|
|
||||||
[_h(25, "Kislev")] MSG Channuka
|
|
||||||
Entering UserFN _h(25, "Kislev")
|
|
||||||
x => 25
|
|
||||||
y => "Kislev"
|
|
||||||
hebdate(25, "Kislev") => 1991/12/02
|
|
||||||
trigger(1991/12/02) => "2 December 1991"
|
|
||||||
Leaving UserFN _h() => "2 December 1991"
|
|
||||||
.\test.rem(16): Trig = Monday, 2 December, 1991
|
|
||||||
[_h(10, "Tevet")] MSG Asara B'Tevet
|
|
||||||
Entering UserFN _h(10, "Tevet")
|
|
||||||
x => 10
|
|
||||||
y => "Tevet"
|
|
||||||
hebdate(10, "Tevet") => 1991/12/17
|
|
||||||
trigger(1991/12/17) => "17 December 1991"
|
|
||||||
Leaving UserFN _h() => "17 December 1991"
|
|
||||||
.\test.rem(17): Trig = Tuesday, 17 December, 1991
|
|
||||||
[_h(15, "Shvat")] MSG Tu B'Shvat
|
|
||||||
Entering UserFN _h(15, "Shvat")
|
|
||||||
x => 15
|
|
||||||
y => "Shvat"
|
|
||||||
hebdate(15, "Shvat") => 1992/01/20
|
|
||||||
trigger(1992/01/20) => "20 January 1992"
|
|
||||||
Leaving UserFN _h() => "20 January 1992"
|
|
||||||
.\test.rem(18): Trig = Monday, 20 January, 1992
|
|
||||||
[_h(15, "Adar A")] MSG Purim Katan
|
|
||||||
Entering UserFN _h(15, "Adar A")
|
|
||||||
x => 15
|
|
||||||
y => "Adar A"
|
|
||||||
hebdate(15, "Adar A") => 1992/02/19
|
|
||||||
trigger(1992/02/19) => "19 February 1992"
|
|
||||||
Leaving UserFN _h() => "19 February 1992"
|
|
||||||
.\test.rem(19): Trig = Wednesday, 19 February, 1992
|
|
||||||
[_h(14, "Adar")] MSG Purim
|
|
||||||
Entering UserFN _h(14, "Adar")
|
|
||||||
x => 14
|
|
||||||
y => "Adar"
|
|
||||||
hebdate(14, "Adar") => 1991/02/28
|
|
||||||
trigger(1991/02/28) => "28 February 1991"
|
|
||||||
Leaving UserFN _h() => "28 February 1991"
|
|
||||||
.\test.rem(20): Trig = Thursday, 28 February, 1991
|
|
||||||
[_h(15, "Nisan")] MSG Pesach
|
|
||||||
Entering UserFN _h(15, "Nisan")
|
|
||||||
x => 15
|
|
||||||
y => "Nisan"
|
|
||||||
hebdate(15, "Nisan") => 1991/03/30
|
|
||||||
trigger(1991/03/30) => "30 March 1991"
|
|
||||||
Leaving UserFN _h() => "30 March 1991"
|
|
||||||
.\test.rem(21): Trig = Saturday, 30 March, 1991
|
|
||||||
[_h(27, "Nisan")] MSG Yom HaShoah
|
|
||||||
Entering UserFN _h(27, "Nisan")
|
|
||||||
x => 27
|
|
||||||
y => "Nisan"
|
|
||||||
hebdate(27, "Nisan") => 1991/04/11
|
|
||||||
trigger(1991/04/11) => "11 April 1991"
|
|
||||||
Leaving UserFN _h() => "11 April 1991"
|
|
||||||
.\test.rem(22): Trig = Thursday, 11 April, 1991
|
|
||||||
[_h(4, "Iyar")] MSG Yom HaZikaron
|
|
||||||
Entering UserFN _h(4, "Iyar")
|
|
||||||
x => 4
|
|
||||||
y => "Iyar"
|
|
||||||
hebdate(4, "Iyar") => 1991/04/18
|
|
||||||
trigger(1991/04/18) => "18 April 1991"
|
|
||||||
Leaving UserFN _h() => "18 April 1991"
|
|
||||||
.\test.rem(23): Trig = Thursday, 18 April, 1991
|
|
||||||
[_h(5, "Iyar")] MSG Yom Ha'atzmaut
|
|
||||||
Entering UserFN _h(5, "Iyar")
|
|
||||||
x => 5
|
|
||||||
y => "Iyar"
|
|
||||||
hebdate(5, "Iyar") => 1991/04/19
|
|
||||||
trigger(1991/04/19) => "19 April 1991"
|
|
||||||
Leaving UserFN _h() => "19 April 1991"
|
|
||||||
.\test.rem(24): Trig = Friday, 19 April, 1991
|
|
||||||
[_h(28, "Iyar")] MSG Yom Yerushalayim
|
|
||||||
Entering UserFN _h(28, "Iyar")
|
|
||||||
x => 28
|
|
||||||
y => "Iyar"
|
|
||||||
hebdate(28, "Iyar") => 1991/05/12
|
|
||||||
trigger(1991/05/12) => "12 May 1991"
|
|
||||||
Leaving UserFN _h() => "12 May 1991"
|
|
||||||
.\test.rem(25): Trig = Sunday, 12 May, 1991
|
|
||||||
[_h(6, "Sivan")] MSG Shavuot
|
|
||||||
Entering UserFN _h(6, "Sivan")
|
|
||||||
x => 6
|
|
||||||
y => "Sivan"
|
|
||||||
hebdate(6, "Sivan") => 1991/05/19
|
|
||||||
trigger(1991/05/19) => "19 May 1991"
|
|
||||||
Leaving UserFN _h() => "19 May 1991"
|
|
||||||
.\test.rem(26): Trig = Sunday, 19 May, 1991
|
|
||||||
[_h(9, "Av")] MSG Tish'a B'Av
|
|
||||||
Entering UserFN _h(9, "Av")
|
|
||||||
x => 9
|
|
||||||
y => "Av"
|
|
||||||
hebdate(9, "Av") => 1991/07/20
|
|
||||||
trigger(1991/07/20) => "20 July 1991"
|
|
||||||
Leaving UserFN _h() => "20 July 1991"
|
|
||||||
.\test.rem(27): Trig = Saturday, 20 July, 1991
|
|
||||||
|
|
||||||
# Test some jahrzeit cases
|
|
||||||
fset _i(x,y,z,a) trigger(hebdate(x,y,z,a))
|
|
||||||
[_i(30, "Heshvan", today(), 5759)] MSG Complete-Complete
|
|
||||||
today() => 1991/02/16
|
|
||||||
Entering UserFN _i(30, "Heshvan", 1991/02/16, 5759)
|
|
||||||
x => 30
|
|
||||||
y => "Heshvan"
|
|
||||||
z => 1991/02/16
|
|
||||||
a => 5759
|
|
||||||
hebdate(30, "Heshvan", 1991/02/16, 5759) => 1991/11/07
|
|
||||||
trigger(1991/11/07) => "7 November 1991"
|
|
||||||
Leaving UserFN _i() => "7 November 1991"
|
|
||||||
.\test.rem(31): Trig = Thursday, 7 November, 1991
|
|
||||||
[_i(30, "Heshvan", today(), 5760)] MSG Complete-Defective
|
|
||||||
today() => 1991/02/16
|
|
||||||
Entering UserFN _i(30, "Heshvan", 1991/02/16, 5760)
|
|
||||||
x => 30
|
|
||||||
y => "Heshvan"
|
|
||||||
z => 1991/02/16
|
|
||||||
a => 5760
|
|
||||||
hebdate(30, "Heshvan", 1991/02/16, 5760) => 1991/11/07
|
|
||||||
trigger(1991/11/07) => "7 November 1991"
|
|
||||||
Leaving UserFN _i() => "7 November 1991"
|
|
||||||
.\test.rem(32): Trig = Thursday, 7 November, 1991
|
|
||||||
[_i(30, "Heshvan", today(), 5761)] MSG Illegal
|
|
||||||
today() => 1991/02/16
|
|
||||||
Entering UserFN _i(30, "Heshvan", 1991/02/16, 5761)
|
|
||||||
x => 30
|
|
||||||
y => "Heshvan"
|
|
||||||
z => 1991/02/16
|
|
||||||
a => 5761
|
|
||||||
hebdate(30, "Heshvan", 1991/02/16, 5761) => .\test.rem(33): 30 Heshvan 5761: Invalid Hebrew date
|
|
||||||
Invalid Hebrew date
|
|
||||||
Leaving UserFN _i() => Invalid Hebrew date
|
|
||||||
|
|
||||||
[_i(30, "Kislev", today(), 5759)] MSG Complete-Complete
|
|
||||||
today() => 1991/02/16
|
|
||||||
Entering UserFN _i(30, "Kislev", 1991/02/16, 5759)
|
|
||||||
x => 30
|
|
||||||
y => "Kislev"
|
|
||||||
z => 1991/02/16
|
|
||||||
a => 5759
|
|
||||||
hebdate(30, "Kislev", 1991/02/16, 5759) => 1991/12/07
|
|
||||||
trigger(1991/12/07) => "7 December 1991"
|
|
||||||
Leaving UserFN _i() => "7 December 1991"
|
|
||||||
.\test.rem(35): Trig = Saturday, 7 December, 1991
|
|
||||||
[_i(30, "Kislev", today(), 5760)] MSG Complete-Defective
|
|
||||||
today() => 1991/02/16
|
|
||||||
Entering UserFN _i(30, "Kislev", 1991/02/16, 5760)
|
|
||||||
x => 30
|
|
||||||
y => "Kislev"
|
|
||||||
z => 1991/02/16
|
|
||||||
a => 5760
|
|
||||||
hebdate(30, "Kislev", 1991/02/16, 5760) => 1991/12/07
|
|
||||||
trigger(1991/12/07) => "7 December 1991"
|
|
||||||
Leaving UserFN _i() => "7 December 1991"
|
|
||||||
.\test.rem(36): Trig = Saturday, 7 December, 1991
|
|
||||||
[_i(30, "Kislev", today(), 5761)] MSG Illegal
|
|
||||||
today() => 1991/02/16
|
|
||||||
Entering UserFN _i(30, "Kislev", 1991/02/16, 5761)
|
|
||||||
x => 30
|
|
||||||
y => "Kislev"
|
|
||||||
z => 1991/02/16
|
|
||||||
a => 5761
|
|
||||||
hebdate(30, "Kislev", 1991/02/16, 5761) => .\test.rem(37): 30 Kislev 5761: Invalid Hebrew date
|
|
||||||
Invalid Hebrew date
|
|
||||||
Leaving UserFN _i() => Invalid Hebrew date
|
|
||||||
|
|
||||||
[_i(30, "Adar A", today(), 5755)] MSG Leap
|
|
||||||
today() => 1991/02/16
|
|
||||||
Entering UserFN _i(30, "Adar A", 1991/02/16, 5755)
|
|
||||||
x => 30
|
|
||||||
y => "Adar A"
|
|
||||||
z => 1991/02/16
|
|
||||||
a => 5755
|
|
||||||
hebdate(30, "Adar A", 1991/02/16, 5755) => 1992/03/05
|
|
||||||
trigger(1992/03/05) => "5 March 1992"
|
|
||||||
Leaving UserFN _i() => "5 March 1992"
|
|
||||||
.\test.rem(39): Trig = Thursday, 5 March, 1992
|
|
||||||
[_i(30, "Adar A", today(), 5756)] MSG Illegal
|
|
||||||
today() => 1991/02/16
|
|
||||||
Entering UserFN _i(30, "Adar A", 1991/02/16, 5756)
|
|
||||||
x => 30
|
|
||||||
y => "Adar A"
|
|
||||||
z => 1991/02/16
|
|
||||||
a => 5756
|
|
||||||
hebdate(30, "Adar A", 1991/02/16, 5756) => .\test.rem(40): No Adar A in 5756
|
|
||||||
Invalid Hebrew date
|
|
||||||
Leaving UserFN _i() => Invalid Hebrew date
|
|
||||||
[_i(29, "Adar A", today(), 5755)] MSG Leap
|
|
||||||
today() => 1991/02/16
|
|
||||||
Entering UserFN _i(29, "Adar A", 1991/02/16, 5755)
|
|
||||||
x => 29
|
|
||||||
y => "Adar A"
|
|
||||||
z => 1991/02/16
|
|
||||||
a => 5755
|
|
||||||
hebdate(29, "Adar A", 1991/02/16, 5755) => 1991/03/15
|
|
||||||
trigger(1991/03/15) => "15 March 1991"
|
|
||||||
Leaving UserFN _i() => "15 March 1991"
|
|
||||||
.\test.rem(41): Trig = Friday, 15 March, 1991
|
|
||||||
[_i(29, "Adar A", today(), 5756)] MSG Illegal
|
|
||||||
today() => 1991/02/16
|
|
||||||
Entering UserFN _i(29, "Adar A", 1991/02/16, 5756)
|
|
||||||
x => 29
|
|
||||||
y => "Adar A"
|
|
||||||
z => 1991/02/16
|
|
||||||
a => 5756
|
|
||||||
hebdate(29, "Adar A", 1991/02/16, 5756) => .\test.rem(42): No Adar A in 5756
|
|
||||||
Invalid Hebrew date
|
|
||||||
Leaving UserFN _i() => Invalid Hebrew date
|
|
||||||
|
|
||||||
# Test each possible case of the basic reminders.
|
|
||||||
|
|
||||||
REM MSG Every Day
|
|
||||||
.\test.rem(46): Trig = Saturday, 16 February, 1991
|
|
||||||
Every Day
|
|
||||||
|
|
||||||
|
|
||||||
REM 18 MSG Every 18th
|
|
||||||
.\test.rem(48): Trig = Monday, 18 February, 1991
|
|
||||||
REM 15 MSG Every 15th
|
|
||||||
.\test.rem(49): Trig = Friday, 15 March, 1991
|
|
||||||
|
|
||||||
REM Feb MSG February
|
|
||||||
.\test.rem(51): Trig = Saturday, 16 February, 1991
|
|
||||||
February
|
|
||||||
|
|
||||||
REM Jan MSG January
|
|
||||||
.\test.rem(52): Trig = Wednesday, 1 January, 1992
|
|
||||||
REM March MSG March
|
|
||||||
.\test.rem(53): Trig = Friday, 1 March, 1991
|
|
||||||
|
|
||||||
REM 13 Jan MSG 13 Jan
|
|
||||||
.\test.rem(55): Trig = Monday, 13 January, 1992
|
|
||||||
REM 15 Feb MSG 15 Feb
|
|
||||||
.\test.rem(56): Trig = Saturday, 15 February, 1992
|
|
||||||
REM 28 Feb MSG 28 Feb
|
|
||||||
.\test.rem(57): Trig = Thursday, 28 February, 1991
|
|
||||||
REM 29 Feb MSG 29 Feb
|
|
||||||
.\test.rem(58): Trig = Saturday, 29 February, 1992
|
|
||||||
REM 5 Mar MSG 5 Mar
|
|
||||||
.\test.rem(59): Trig = Tuesday, 5 March, 1991
|
|
||||||
|
|
||||||
REM 1990 MSG 1990
|
|
||||||
.\test.rem(61): Expired
|
|
||||||
REM 1991 MSG 1991
|
|
||||||
.\test.rem(62): Trig = Saturday, 16 February, 1991
|
|
||||||
1991
|
|
||||||
|
|
||||||
REM 1992 MSG 1991
|
|
||||||
.\test.rem(63): Trig = Wednesday, 1 January, 1992
|
|
||||||
|
|
||||||
REM 1 1990 MSG 1 1990
|
|
||||||
.\test.rem(65): Expired
|
|
||||||
REM 29 1991 MSG 29 1991
|
|
||||||
.\test.rem(66): Trig = Friday, 29 March, 1991
|
|
||||||
REM 29 1992 MSG 29 1992
|
|
||||||
.\test.rem(67): Trig = Wednesday, 29 January, 1992
|
|
||||||
REM 16 1991 MSG 16 1991
|
|
||||||
.\test.rem(68): Trig = Saturday, 16 February, 1991
|
|
||||||
16 1991
|
|
||||||
|
|
||||||
|
|
||||||
REM Jan 1990 MSG Jan 1990
|
|
||||||
.\test.rem(70): Expired
|
|
||||||
REM Feb 1991 MSG Feb 1991
|
|
||||||
.\test.rem(71): Trig = Saturday, 16 February, 1991
|
|
||||||
Feb 1991
|
|
||||||
|
|
||||||
REM Dec 1991 MSG Dec 1991
|
|
||||||
.\test.rem(72): Trig = Sunday, 1 December, 1991
|
|
||||||
REM May 1992 MSG May 1992
|
|
||||||
.\test.rem(73): Trig = Friday, 1 May, 1992
|
|
||||||
|
|
||||||
REM 1 Jan 1991 MSG 1 Jan 1991
|
|
||||||
.\test.rem(75): Expired
|
|
||||||
REM 16 Feb 1991 MSG 16 Feb 1991
|
|
||||||
.\test.rem(76): Trig = Saturday, 16 February, 1991
|
|
||||||
16 Feb 1991
|
|
||||||
|
|
||||||
REM 29 Dec 1992 MSG 29 Dec 1992
|
|
||||||
.\test.rem(77): Trig = Tuesday, 29 December, 1992
|
|
||||||
|
|
||||||
REM Sun MSG Sun
|
|
||||||
.\test.rem(79): Trig = Sunday, 17 February, 1991
|
|
||||||
REM Fri Sat Tue MSG Fri Sat Tue
|
|
||||||
.\test.rem(80): Trig = Saturday, 16 February, 1991
|
|
||||||
Fri Sat Tue
|
|
||||||
|
|
||||||
|
|
||||||
REM Sun 16 MSG Sun 16
|
|
||||||
.\test.rem(82): Trig = Sunday, 17 February, 1991
|
|
||||||
REM Mon Tue Wed Thu Fri 1 MSG Mon Tue Wed Thu Fri 1
|
|
||||||
.\test.rem(83): Trig = Friday, 1 March, 1991
|
|
||||||
|
|
||||||
REM Sun Feb MSG Sun Feb
|
|
||||||
.\test.rem(85): Trig = Sunday, 17 February, 1991
|
|
||||||
REM Mon Tue March MSG Mon Tue March
|
|
||||||
.\test.rem(86): Trig = Monday, 4 March, 1991
|
|
||||||
|
|
||||||
REM Sun 16 Feb MSG Sun 16 Feb
|
|
||||||
.\test.rem(88): Trig = Sunday, 17 February, 1991
|
|
||||||
REM Mon Tue 10 March MSG Mon Tue 10 March
|
|
||||||
.\test.rem(89): Trig = Monday, 11 March, 1991
|
|
||||||
|
|
||||||
REM Sat Sun 1991 MSG Sat Sun 1991
|
|
||||||
.\test.rem(91): Trig = Saturday, 16 February, 1991
|
|
||||||
Sat Sun 1991
|
|
||||||
|
|
||||||
REM Mon Tue 1992 MSG Mon Tue 1992
|
|
||||||
.\test.rem(92): Trig = Monday, 6 January, 1992
|
|
||||||
|
|
||||||
REM Sun 16 1991 MSG Sun 16 1991
|
|
||||||
.\test.rem(94): Trig = Sunday, 17 February, 1991
|
|
||||||
REM Mon Tue Wed Thu Fri 1 1992 MSG Mon Tue Wed Thu Fri 1 1992
|
|
||||||
.\test.rem(95): Trig = Wednesday, 1 January, 1992
|
|
||||||
|
|
||||||
REM Mon Feb 1991 MSG Mon Feb 1991
|
|
||||||
.\test.rem(97): Trig = Monday, 18 February, 1991
|
|
||||||
REM Tue Jan 1992 MSG Tue Jan 1992
|
|
||||||
.\test.rem(98): Trig = Tuesday, 7 January, 1992
|
|
||||||
|
|
||||||
REM Sun Mon 16 Feb 1991 MSG Sun Mon 16 Feb 1991
|
|
||||||
.\test.rem(100): Trig = Sunday, 17 February, 1991
|
|
||||||
REM Tue 28 Jan 1992 MSG Tue 28 Jan 1992
|
|
||||||
.\test.rem(101): Trig = Tuesday, 28 January, 1992
|
|
||||||
|
|
||||||
# Try some Backs
|
|
||||||
CLEAR-OMIT-CONTEXT
|
|
||||||
REM 1 -1 OMIT sat sun MSG 1 -1 OMIT Sat Sun
|
|
||||||
.\test.rem(105): Trig = Thursday, 28 February, 1991
|
|
||||||
REM 1 --1 OMIT sat sun MSG 1 --1 OMIT Sat Sun
|
|
||||||
.\test.rem(106): Trig = Thursday, 28 February, 1991
|
|
||||||
|
|
||||||
OMIT 28 Feb
|
|
||||||
REM 1 -1 OMIT sat sun MSG 1 -1 OMIT Sat Sun (28 Feb omitted)
|
|
||||||
.\test.rem(109): Trig = Wednesday, 27 February, 1991
|
|
||||||
REM 1 --1 OMIT sat sun MSG 1 --1 OMIT Sat Sun (28 Feb omitted)
|
|
||||||
.\test.rem(110): Trig = Thursday, 28 February, 1991
|
|
||||||
|
|
||||||
CLEAR-OMIT-CONTEXT
|
|
||||||
|
|
||||||
# Try out UNTIL
|
|
||||||
REM Wed UNTIL 21 Feb 1991 MSG Wed UNTIL 21 Feb 1991
|
|
||||||
.\test.rem(115): Trig = Wednesday, 20 February, 1991
|
|
||||||
|
|
||||||
# Try playing with the OMIT context
|
|
||||||
|
|
||||||
OMIT 28 Feb 1991
|
|
||||||
REM 1 Mar -1 MSG 1 mar -1 (28feb91 omitted)
|
|
||||||
.\test.rem(120): Trig = Wednesday, 27 February, 1991
|
|
||||||
REM 1 Mar --1 MSG 1 mar --1 (28Feb91 omitted)
|
|
||||||
.\test.rem(121): Trig = Thursday, 28 February, 1991
|
|
||||||
REM 28 Feb BEFORE MSG 28 Feb BEFORE (28Feb91 omitted)
|
|
||||||
.\test.rem(122): Trig = Wednesday, 27 February, 1991
|
|
||||||
REM 28 Feb SKIP MSG 28 Feb SKIP (28Feb91 omitted)
|
|
||||||
.\test.rem(123): Trig = Friday, 28 February, 1992
|
|
||||||
REM 28 Feb AFTER MSG 28 Feb AFTER (28Feb91 omitted)
|
|
||||||
.\test.rem(124): Trig = Friday, 1 March, 1991
|
|
||||||
|
|
||||||
PUSH-OMIT-CONTEXT
|
|
||||||
CLEAR-OMIT-CONTEXT
|
|
||||||
REM 1 Mar -1 MSG 1 mar -1
|
|
||||||
.\test.rem(128): Trig = Thursday, 28 February, 1991
|
|
||||||
REM 1 Mar --1 MSG 1 mar --1
|
|
||||||
.\test.rem(129): Trig = Thursday, 28 February, 1991
|
|
||||||
REM 28 Feb BEFORE MSG 28 Feb BEFORE
|
|
||||||
.\test.rem(130): Trig = Thursday, 28 February, 1991
|
|
||||||
REM 28 Feb SKIP MSG 28 Feb SKIP
|
|
||||||
.\test.rem(131): Trig = Thursday, 28 February, 1991
|
|
||||||
REM 28 Feb AFTER MSG 28 Feb AFTER
|
|
||||||
.\test.rem(132): Trig = Thursday, 28 February, 1991
|
|
||||||
|
|
||||||
POP-OMIT-CONTEXT
|
|
||||||
REM 1 Mar -1 MSG 1 mar -1 (28feb91 omitted)
|
|
||||||
.\test.rem(135): Trig = Wednesday, 27 February, 1991
|
|
||||||
REM 1 Mar --1 MSG 1 mar --1 (28Feb91 omitted)
|
|
||||||
.\test.rem(136): Trig = Thursday, 28 February, 1991
|
|
||||||
REM 28 Feb BEFORE MSG 28 Feb BEFORE (28Feb91 omitted)
|
|
||||||
.\test.rem(137): Trig = Wednesday, 27 February, 1991
|
|
||||||
REM 28 Feb SKIP MSG 28 Feb SKIP (28Feb91 omitted)
|
|
||||||
.\test.rem(138): Trig = Friday, 28 February, 1992
|
|
||||||
REM 28 Feb AFTER MSG 28 Feb AFTER (28Feb91 omitted)
|
|
||||||
.\test.rem(139): Trig = Friday, 1 March, 1991
|
|
||||||
|
|
||||||
|
|
||||||
REM 13 March 1991 *1 UNTIL 19 March 1991 MSG 13-19 Mar 91
|
|
||||||
.\test.rem(142): Trig = Wednesday, 13 March, 1991
|
|
||||||
|
|
||||||
# Test BACK
|
|
||||||
CLEAR-OMIT-CONTEXT
|
|
||||||
REM 18 Feb 1991 +1 MSG 18 Feb 1991 +1
|
|
||||||
.\test.rem(146): Trig = Monday, 18 February, 1991
|
|
||||||
|
|
||||||
OMIT 17 Feb 1991
|
|
||||||
REM 18 Feb 1991 +1 MSG 18 Feb 1991 +1 (17Feb91 omitted)
|
|
||||||
.\test.rem(149): Trig = Monday, 18 February, 1991
|
|
||||||
18 Feb 1991 +1 (17Feb91 omitted)
|
|
||||||
|
|
||||||
REM 18 Feb 1991 ++1 MSG 18 Feb 1991 ++1 (17Feb91 omitted)
|
|
||||||
.\test.rem(150): Trig = Monday, 18 February, 1991
|
|
||||||
|
|
||||||
CLEAR-OMIT-CONTEXT
|
|
||||||
# Test the scanfrom clause
|
|
||||||
REM Fri SATISFY 1
|
|
||||||
.\test.rem(154): Trig = Friday, 22 February, 1991
|
|
||||||
OMIT [trigger(trigdate())]
|
|
||||||
trigdate() => 1991/02/22
|
|
||||||
trigger(1991/02/22) => "22 February 1991"
|
|
||||||
REM Fri after MSG 23 Feb 1991
|
|
||||||
.\test.rem(156): Trig = Saturday, 23 February, 1991
|
|
||||||
CLEAR-OMIT-CONTEXT
|
|
||||||
REM Fri SCANFROM [trigger(today()-7)] SATISFY 1
|
|
||||||
today() => 1991/02/16
|
|
||||||
1991/02/16 - 7 => 1991/02/09
|
|
||||||
trigger(1991/02/09) => "9 February 1991"
|
|
||||||
.\test.rem(158): Trig = Friday, 15 February, 1991
|
|
||||||
OMIT [trigger(trigdate())]
|
|
||||||
trigdate() => 1991/02/15
|
|
||||||
trigger(1991/02/15) => "15 February 1991"
|
|
||||||
REM Fri after MSG 16 Feb 1991
|
|
||||||
.\test.rem(160): Trig = Saturday, 16 February, 1991
|
|
||||||
16 Feb 1991
|
|
||||||
|
|
||||||
CLEAR-OMIT-CONTEXT
|
|
||||||
set a000 abs(1)
|
|
||||||
abs(1) => 1
|
|
||||||
set a001 abs(-1)
|
|
||||||
- 1 => -1
|
|
||||||
abs(-1) => 1
|
|
||||||
set a002 asc("foo")
|
|
||||||
asc("foo") => 102
|
|
||||||
set a003 baseyr()
|
|
||||||
baseyr() => 1990
|
|
||||||
set a004 char(66,55,66,77,66)
|
|
||||||
char(66, 55, 66, 77, 66) => "B7BMB"
|
|
||||||
set a005 choose(3, "foo", "bar", "baz", "blech")
|
|
||||||
choose(3, "foo", "bar", "baz", "blech") => "baz"
|
|
||||||
set a006 coerce("string", 1)
|
|
||||||
coerce("string", 1) => "1"
|
|
||||||
set a007 coerce("string", today())
|
|
||||||
today() => 1991/02/16
|
|
||||||
coerce("string", 1991/02/16) => "1991/02/16"
|
|
||||||
set a008 coerce("string", 11:44)
|
|
||||||
coerce("string", 11:44) => "11:44"
|
|
||||||
set a009 coerce("int", "badnews")
|
|
||||||
coerce("int", "badnews") => Can't coerce
|
|
||||||
.\test.rem(171): Can't coerce
|
|
||||||
set a010 coerce("int", "12")
|
|
||||||
coerce("int", "12") => 12
|
|
||||||
set a011 coerce("int", 11:44)
|
|
||||||
coerce("int", 11:44) => 704
|
|
||||||
set a012 coerce("int", today())
|
|
||||||
today() => 1991/02/16
|
|
||||||
coerce("int", 1991/02/16) => 411
|
|
||||||
set a013 date(1992, 2, 2)
|
|
||||||
date(1992, 2, 2) => 1992/02/02
|
|
||||||
set a014 date(1993, 2, 29)
|
|
||||||
date(1993, 2, 29) => Bad date specification
|
|
||||||
.\test.rem(176): Bad date specification
|
|
||||||
set a015 day(today())
|
|
||||||
today() => 1991/02/16
|
|
||||||
day(1991/02/16) => 16
|
|
||||||
set a016 daysinmon(2, 1991)
|
|
||||||
daysinmon(2, 1991) => 28
|
|
||||||
set a017 daysinmon(2, 1992)
|
|
||||||
daysinmon(2, 1992) => 29
|
|
||||||
set a018 defined("a017")
|
|
||||||
defined("a017") => 1
|
|
||||||
set a019 defined("a019")
|
|
||||||
defined("a019") => 0
|
|
||||||
set a020 filename()
|
|
||||||
filename() => ".\test.rem"
|
|
||||||
set a021 getenv("TEST_GETENV")
|
|
||||||
getenv("TEST_GETENV") => "foo bar baz"
|
|
||||||
set a022 hour(11:22)
|
|
||||||
hour(11:22) => 11
|
|
||||||
set a023 iif(1, 1, 0)
|
|
||||||
iif(1, 1, 0) => 1
|
|
||||||
set a024 iif(0, 1, 0)
|
|
||||||
iif(0, 1, 0) => 0
|
|
||||||
set a025 index("barfoobar", "foo")
|
|
||||||
index("barfoobar", "foo") => 4
|
|
||||||
set a026 index("barfoobar", "bar", 2)
|
|
||||||
index("barfoobar", "bar", 2) => 7
|
|
||||||
set a027 isleap(today())
|
|
||||||
today() => 1991/02/16
|
|
||||||
isleap(1991/02/16) => 0
|
|
||||||
set a028 isleap(1992)
|
|
||||||
isleap(1992) => 1
|
|
||||||
omit [trigger(today())]
|
|
||||||
today() => 1991/02/16
|
|
||||||
trigger(1991/02/16) => "16 February 1991"
|
|
||||||
set a030 isomitted(today())
|
|
||||||
today() => 1991/02/16
|
|
||||||
isomitted(1991/02/16) => 1
|
|
||||||
clear
|
|
||||||
set a029 isomitted(today())
|
|
||||||
today() => 1991/02/16
|
|
||||||
isomitted(1991/02/16) => 0
|
|
||||||
set a031 lower("FOOBARBAZ")
|
|
||||||
lower("FOOBARBAZ") => "foobarbaz"
|
|
||||||
set a032 max(1, 2, 34, 1, 3)
|
|
||||||
max(1, 2, 34, 1, 3) => 34
|
|
||||||
set a033 max("foo", "bar", "baz")
|
|
||||||
max("foo", "bar", "baz") => "foo"
|
|
||||||
set a034 max(today(), today()+1, today()-1)
|
|
||||||
today() => 1991/02/16
|
|
||||||
today() => 1991/02/16
|
|
||||||
1991/02/16 + 1 => 1991/02/17
|
|
||||||
today() => 1991/02/16
|
|
||||||
1991/02/16 - 1 => 1991/02/15
|
|
||||||
max(1991/02/16, 1991/02/17, 1991/02/15) => 1991/02/17
|
|
||||||
set a035 min(1, 2, 34, 1, 3)
|
|
||||||
min(1, 2, 34, 1, 3) => 1
|
|
||||||
set a036 min("foo", "bar", "baz")
|
|
||||||
min("foo", "bar", "baz") => "bar"
|
|
||||||
set a037 min(today(), today()+1, today()-1)
|
|
||||||
today() => 1991/02/16
|
|
||||||
today() => 1991/02/16
|
|
||||||
1991/02/16 + 1 => 1991/02/17
|
|
||||||
today() => 1991/02/16
|
|
||||||
1991/02/16 - 1 => 1991/02/15
|
|
||||||
min(1991/02/16, 1991/02/17, 1991/02/15) => 1991/02/15
|
|
||||||
set a038 minute(11:33)
|
|
||||||
minute(11:33) => 33
|
|
||||||
set a039 mon(today())
|
|
||||||
today() => 1991/02/16
|
|
||||||
mon(1991/02/16) => "February"
|
|
||||||
set a040 monnum(today())
|
|
||||||
today() => 1991/02/16
|
|
||||||
monnum(1991/02/16) => 2
|
|
||||||
set a041 ord(3)
|
|
||||||
ord(3) => "3rd"
|
|
||||||
set a042 ord(4)
|
|
||||||
ord(4) => "4th"
|
|
||||||
set a043 ostype()
|
|
||||||
ostype() => "OS/2"
|
|
||||||
set a044 plural(2)
|
|
||||||
plural(2) => "s"
|
|
||||||
set a045 plural(2, "ies")
|
|
||||||
plural(2, "ies") => "iess"
|
|
||||||
set a046 plural(2, "y", "ies")
|
|
||||||
plural(2, "y", "ies") => "ies"
|
|
||||||
set a047 sgn(-2)
|
|
||||||
- 2 => -2
|
|
||||||
sgn(-2) => -1
|
|
||||||
set a048 shell("echo foo")
|
|
||||||
shell("echo foo") => "foo"
|
|
||||||
set a049 strlen("sadjflkhsldkfhsdlfjhk")
|
|
||||||
strlen("sadjflkhsldkfhsdlfjhk") => 21
|
|
||||||
set a050 substr(a049, 2)
|
|
||||||
a049 => 21
|
|
||||||
substr(21, 2) => Type mismatch
|
|
||||||
.\test.rem(214): Type mismatch
|
|
||||||
set a051 substr(a050, 2, 6)
|
|
||||||
a050 => .\test.rem(215): Undefined variable: a050
|
|
||||||
set a052 time(1+2, 3+4)
|
|
||||||
1 + 2 => 3
|
|
||||||
3 + 4 => 7
|
|
||||||
time(3, 7) => 03:07
|
|
||||||
rem 10 jan 1992 AT 11:22 CAL
|
|
||||||
.\test.rem(217): Trig = Friday, 10 January, 1992
|
|
||||||
set a053 trigdate()
|
|
||||||
trigdate() => 1992/01/10
|
|
||||||
set a054 trigtime()
|
|
||||||
trigtime() => 11:22
|
|
||||||
set a055 trigvalid()
|
|
||||||
trigvalid() => 1
|
|
||||||
set a056 upper("sdfjhsdf ksjdfh kjsdfh ksjdfh")
|
|
||||||
upper("sdfjhsdf ksjdfh kjsdfh ksjdfh") => "SDFJHSDF KSJDFH KJSDFH KSJDFH"
|
|
||||||
set a057 value("a05"+"6")
|
|
||||||
"a05" + "6" => "a056"
|
|
||||||
value("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH"
|
|
||||||
set a058 version()
|
|
||||||
version() => "03.00.19"
|
|
||||||
set a059 wkday(today())
|
|
||||||
today() => 1991/02/16
|
|
||||||
wkday(1991/02/16) => "Saturday"
|
|
||||||
set a060 wkdaynum(today())
|
|
||||||
today() => 1991/02/16
|
|
||||||
wkdaynum(1991/02/16) => 6
|
|
||||||
set a061 year(today())
|
|
||||||
today() => 1991/02/16
|
|
||||||
year(1991/02/16) => 1991
|
|
||||||
set a062 1+2*(3+4-(5*7/2))
|
|
||||||
3 + 4 => 7
|
|
||||||
5 * 7 => 35
|
|
||||||
35 / 2 => 17
|
|
||||||
7 - 17 => -10
|
|
||||||
2 * -10 => -20
|
|
||||||
1 + -20 => -19
|
|
||||||
set a063 1>=2
|
|
||||||
1 >= 2 => 0
|
|
||||||
set a064 1<2 || 3 > 4
|
|
||||||
1 < 2 => 1
|
|
||||||
3 > 4 => 0
|
|
||||||
1 || 0 => 1
|
|
||||||
set a065 1 && 1
|
|
||||||
1 && 1 => 1
|
|
||||||
set a066 !a065
|
|
||||||
a065 => 1
|
|
||||||
! 1 => 0
|
|
||||||
set a067 typeof(2)
|
|
||||||
typeof(2) => "INT"
|
|
||||||
set a068 typeof("foo")
|
|
||||||
typeof("foo") => "STRING"
|
|
||||||
set a069 typeof(11:33)
|
|
||||||
typeof(11:33) => "TIME"
|
|
||||||
set a070 typeof(today())
|
|
||||||
today() => 1991/02/16
|
|
||||||
typeof(1991/02/16) => "DATE"
|
|
||||||
fset g(x,y) max(x,y)
|
|
||||||
fset h(x,y) min(g(x+y, x*y), g(x-y, x/y))
|
|
||||||
set a071 g(1, 2)
|
|
||||||
Entering UserFN g(1, 2)
|
|
||||||
x => 1
|
|
||||||
y => 2
|
|
||||||
max(1, 2) => 2
|
|
||||||
Leaving UserFN g() => 2
|
|
||||||
set a072 h(2, 3)
|
|
||||||
Entering UserFN h(2, 3)
|
|
||||||
x => 2
|
|
||||||
y => 3
|
|
||||||
2 + 3 => 5
|
|
||||||
x => 2
|
|
||||||
y => 3
|
|
||||||
2 * 3 => 6
|
|
||||||
Entering UserFN g(5, 6)
|
|
||||||
x => 5
|
|
||||||
y => 6
|
|
||||||
max(5, 6) => 6
|
|
||||||
Leaving UserFN g() => 6
|
|
||||||
x => 2
|
|
||||||
y => 3
|
|
||||||
2 - 3 => -1
|
|
||||||
x => 2
|
|
||||||
y => 3
|
|
||||||
2 / 3 => 0
|
|
||||||
Entering UserFN g(-1, 0)
|
|
||||||
x => -1
|
|
||||||
y => 0
|
|
||||||
max(-1, 0) => 0
|
|
||||||
Leaving UserFN g() => 0
|
|
||||||
min(6, 0) => 0
|
|
||||||
Leaving UserFN h() => 0
|
|
||||||
set a073 h("foo", 11:33)
|
|
||||||
Entering UserFN h("foo", 11:33)
|
|
||||||
x => "foo"
|
|
||||||
y => 11:33
|
|
||||||
"foo" + 11:33 => "foo11:33"
|
|
||||||
x => "foo"
|
|
||||||
y => 11:33
|
|
||||||
"foo" * 11:33 => Type mismatch
|
|
||||||
.\test.rem(240): `*': Type mismatch
|
|
||||||
Leaving UserFN h() => Type mismatch
|
|
||||||
set a074 dosubst("%a %b %c %d %e %f %g %h", '1992/5/5')
|
|
||||||
dosubst("%a %b %c %d %e %f %g %h", 1992/05/05) => "on Tuesday, 5 May, 1992 in 444 days' tim"...
|
|
||||||
msg [a074]%
|
|
||||||
.\test.rem(242): Trig = Saturday, 16 February, 1991
|
|
||||||
a074 => "on Tuesday, 5 May, 1992 in 444 days' tim"...
|
|
||||||
on Tuesday, 5 May, 1992 in 444 days' time on Tuesday 5 on 05/05/1992 on 05/05/1992 on Tuesday, 5 May on 05/05
|
|
||||||
set a075 dosubst("%i %j %k %l %m %n %o %p", '1992/5/5')
|
|
||||||
dosubst("%i %j %k %l %m %n %o %p", 1992/05/05) => "on 05/05 on Tuesday, May 5th, 1992 on Tu"...
|
|
||||||
msg [a075]%
|
|
||||||
.\test.rem(244): Trig = Saturday, 16 February, 1991
|
|
||||||
a075 => "on 05/05 on Tuesday, May 5th, 1992 on Tu"...
|
|
||||||
on 05/05 on Tuesday, May 5th, 1992 on Tuesday, May 5th on 1992/05/05 May 5 s
|
|
||||||
set a076 dosubst("%q %r %s %t %u %v %w %x", '1992/5/5')
|
|
||||||
dosubst("%q %r %s %t %u %v %w %x", 1992/05/05) => "s' 05 th 05 on Tuesday, 5th May, 1992 on"...
|
|
||||||
msg [a076]%
|
|
||||||
.\test.rem(246): Trig = Saturday, 16 February, 1991
|
|
||||||
a076 => "s' 05 th 05 on Tuesday, 5th May, 1992 on"...
|
|
||||||
s' 05 th 05 on Tuesday, 5th May, 1992 on Tuesday, 5th May Tuesday 444
|
|
||||||
set a077 dosubst("%y %z", '1992/5/5')
|
|
||||||
dosubst("%y %z", 1992/05/05) => "1992 92
|
|
||||||
"
|
|
||||||
msg [a077]%
|
|
||||||
.\test.rem(248): Trig = Saturday, 16 February, 1991
|
|
||||||
a077 => "1992 92
|
|
||||||
"
|
|
||||||
1992 92
|
|
||||||
set a078 easterdate(today())
|
|
||||||
today() => 1991/02/16
|
|
||||||
easterdate(1991/02/16) => 1991/03/31
|
|
||||||
set a079 easterdate(1992)
|
|
||||||
easterdate(1992) => 1992/04/19
|
|
||||||
set a080 easterdate(1995)
|
|
||||||
easterdate(1995) => 1995/04/16
|
|
||||||
set a081 ""
|
|
||||||
dump
|
|
||||||
Variable Value
|
|
||||||
|
|
||||||
a017 29
|
|
||||||
a036 "bar"
|
|
||||||
a055 1
|
|
||||||
a074 "on Tuesday, 5 May, 1992 in 444 days' tim"...
|
|
||||||
a008 "11:44"
|
|
||||||
a027 0
|
|
||||||
a046 "ies"
|
|
||||||
a065 1
|
|
||||||
a018 1
|
|
||||||
a037 1991/02/15
|
|
||||||
a056 "SDFJHSDF KSJDFH KJSDFH KSJDFH"
|
|
||||||
a075 "on 05/05 on Tuesday, May 5th, 1992 on Tu"...
|
|
||||||
a028 1
|
|
||||||
a047 -1
|
|
||||||
a066 0
|
|
||||||
a019 0
|
|
||||||
a038 33
|
|
||||||
a057 "SDFJHSDF KSJDFH KJSDFH KSJDFH"
|
|
||||||
a076 "s' 05 th 05 on Tuesday, 5th May, 1992 on"...
|
|
||||||
a029 0
|
|
||||||
a048 "foo"
|
|
||||||
a067 "INT"
|
|
||||||
a039 "February"
|
|
||||||
a058 "03.00.19"
|
|
||||||
a077 "1992 92
|
|
||||||
"
|
|
||||||
a049 21
|
|
||||||
a068 "STRING"
|
|
||||||
a059 "Saturday"
|
|
||||||
a078 1991/03/31
|
|
||||||
a069 "TIME"
|
|
||||||
a079 1992/04/19
|
|
||||||
a000 1
|
|
||||||
a010 12
|
|
||||||
a001 1
|
|
||||||
a020 ".\test.rem"
|
|
||||||
a011 704
|
|
||||||
a030 1
|
|
||||||
a002 102
|
|
||||||
a021 "foo bar baz"
|
|
||||||
a040 2
|
|
||||||
a012 411
|
|
||||||
a031 "foobarbaz"
|
|
||||||
a003 1990
|
|
||||||
a022 11
|
|
||||||
a041 "3rd"
|
|
||||||
a060 6
|
|
||||||
a013 1992/02/02
|
|
||||||
a032 34
|
|
||||||
a070 "DATE"
|
|
||||||
a004 "B7BMB"
|
|
||||||
a023 1
|
|
||||||
a042 "4th"
|
|
||||||
a061 1991
|
|
||||||
a080 1995/04/16
|
|
||||||
a033 "foo"
|
|
||||||
a052 03:07
|
|
||||||
a071 2
|
|
||||||
a005 "baz"
|
|
||||||
a024 0
|
|
||||||
a043 "OS/2"
|
|
||||||
a062 -19
|
|
||||||
a081 ""
|
|
||||||
a015 16
|
|
||||||
a034 1991/02/17
|
|
||||||
a053 1992/01/10
|
|
||||||
a072 0
|
|
||||||
a006 "1"
|
|
||||||
a025 4
|
|
||||||
a044 "s"
|
|
||||||
a063 0
|
|
||||||
a016 28
|
|
||||||
a035 1
|
|
||||||
a054 11:22
|
|
||||||
a007 "1991/02/16"
|
|
||||||
a026 7
|
|
||||||
a045 "iess"
|
|
||||||
a064 1
|
|
||||||
|
|
||||||
40
tests/test2.rem
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
# Make things sane
|
||||||
|
set $TimeSep ":"
|
||||||
|
set $DateSep "/"
|
||||||
|
set $LatDeg 45
|
||||||
|
set $LatMin 24
|
||||||
|
set $LatSec 0
|
||||||
|
set $Location "Ottawa"
|
||||||
|
set $LongDeg 75
|
||||||
|
set $LongMin 39
|
||||||
|
set $LongSec 0
|
||||||
|
|
||||||
|
clear-omit-context
|
||||||
|
|
||||||
|
omit 14 aug
|
||||||
|
|
||||||
|
# Test the SPECIAL COLOR escapes
|
||||||
|
REM WED +2 SPECIAL COLOR 0 0 255 %"Blue Wednesday%" is %b
|
||||||
|
REM THU SPECIAL COLOR 255 0 0 Red Thursday
|
||||||
|
|
||||||
|
# Test SPECIAL SHADE
|
||||||
|
REM FRI SPECIAL SHADE 0 255 0
|
||||||
|
|
||||||
|
# Test SPECIAL MOON
|
||||||
|
REM 12 AUG SPECIAL MOON 0
|
||||||
|
|
||||||
|
# Test nonomitted
|
||||||
|
REM MSG [nonomitted('2007-08-01', today())] NonOmit-1
|
||||||
|
REM MSG [nonomitted('2007-08-01', today(), "Sat", "Sun")] NonOmit-2
|
||||||
|
|
||||||
|
# Test SPECIAL COLOR with an AT clause
|
||||||
|
REM 20 AUG AT 13:45 SPECIAL COLOR 6 7 8 Mooo!
|
||||||
|
|
||||||
|
# Test SPECIAL PostScript with and without AT clause
|
||||||
|
REM 21 AUG AT 1:55 SPECIAL PostScript (wookie) show
|
||||||
|
REM 22 AUG SPECIAL PostScript (cabbage) show
|
||||||
|
|
||||||
|
# Test a random SPECIAL with and without AT
|
||||||
|
REM 23 AUG AT 16:44 SPECIAL blort snoo glup
|
||||||
|
REM 24 AUG SPECIAL blort gulp wookie
|
||||||
|
|
||||||
@@ -4,12 +4,12 @@
|
|||||||
# Copyright (C) 1999 by Roaring Penguin Software Inc.
|
# Copyright (C) 1999 by Roaring Penguin Software Inc.
|
||||||
|
|
||||||
# The complete name of your www host. Example: www.mycompany.com
|
# The complete name of your www host. Example: www.mycompany.com
|
||||||
WWWHOST = localhost
|
WWWHOST = magnesium.roaringpenguin.com
|
||||||
# WWWHOST = www.mycompany.com
|
# WWWHOST = www.mycompany.com
|
||||||
|
|
||||||
# The complete path to where the scripts actually live, as seen by
|
# The complete path to where the scripts actually live, as seen by
|
||||||
# the UNIX operating system.
|
# the UNIX operating system.
|
||||||
SCRIPTDIR = /home/httpd/cgi-bin
|
SCRIPTDIR = /var/www/cgi-bin
|
||||||
# SCRIPTDIR = /home/dfs/Remind/www/TEST
|
# SCRIPTDIR = /home/dfs/Remind/www/TEST
|
||||||
|
|
||||||
# Where the scripts live as seen by the web browser. If
|
# Where the scripts live as seen by the web browser. If
|
||||||
@@ -19,10 +19,10 @@ CGIDIR = /cgi-bin
|
|||||||
# The complete path to the directory containing the HTML file "calendar.html".
|
# The complete path to the directory containing the HTML file "calendar.html".
|
||||||
# This is a sample file containing links to all the scripts. This path
|
# This is a sample file containing links to all the scripts. This path
|
||||||
# should be the path as seen by the UNIX operating system
|
# should be the path as seen by the UNIX operating system
|
||||||
HTMLDIR = /home/httpd/html/remind
|
HTMLDIR = /var/www/html/remind
|
||||||
|
|
||||||
# Where you stick images, as seen by UNIX
|
# Where you stick images, as seen by UNIX
|
||||||
IMAGEDIR = /home/httpd/html/remind
|
IMAGEDIR = /var/www/html/remind
|
||||||
|
|
||||||
# Where images are, as seen by web browers
|
# Where images are, as seen by web browers
|
||||||
IMAGEBASE = /remind
|
IMAGEBASE = /remind
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 182 B After Width: | Height: | Size: 219 B |
BIN
www/fullmoon.png
|
Before Width: | Height: | Size: 186 B After Width: | Height: | Size: 220 B |
|
Before Width: | Height: | Size: 182 B After Width: | Height: | Size: 212 B |
BIN
www/newmoon.png
|
Before Width: | Height: | Size: 172 B After Width: | Height: | Size: 200 B |
@@ -171,16 +171,16 @@ sub parse_input {
|
|||||||
}
|
}
|
||||||
next if ($phase > 3);
|
next if ($phase > 3);
|
||||||
if ($phase == 0) {
|
if ($phase == 0) {
|
||||||
$text = "<P ALIGN=RIGHT><IMAGE SRC=\"$DefaultImageDir/newmoon.png\" ALT=\"New Moon\"" .
|
$text = "<IMAGE SRC=\"$DefaultImageDir/newmoon.png\" ALT=\"New Moon\"" .
|
||||||
"WIDTH=16 HEIGHT=16> <FONT SIZE=\"-2\">" . escape_html($text);
|
"WIDTH=16 HEIGHT=16> <FONT SIZE=\"-2\">" . escape_html($text);
|
||||||
} elsif ($phase == 1) {
|
} elsif ($phase == 1) {
|
||||||
$text = "<P ALIGN=RIGHT><IMAGE SRC=\"$DefaultImageDir/firstquarter.png\" ALT=\"First Quarter\"" .
|
$text = "<IMAGE SRC=\"$DefaultImageDir/firstquarter.png\" ALT=\"First Quarter\"" .
|
||||||
"WIDTH=16 HEIGHT=16> <FONT SIZE=\"-2\">" . escape_html($text);
|
"WIDTH=16 HEIGHT=16> <FONT SIZE=\"-2\">" . escape_html($text);
|
||||||
} elsif ($phase == 2) {
|
} elsif ($phase == 2) {
|
||||||
$text = "<P ALIGN=RIGHT><IMAGE SRC=\"$DefaultImageDir/fullmoon.png\" ALT=\"Full Moon\"" .
|
$text = "<IMAGE SRC=\"$DefaultImageDir/fullmoon.png\" ALT=\"Full Moon\"" .
|
||||||
"WIDTH=16 HEIGHT=16> <FONT SIZE=\"-2\">" . escape_html($text);
|
"WIDTH=16 HEIGHT=16> <FONT SIZE=\"-2\">" . escape_html($text);
|
||||||
} else {
|
} else {
|
||||||
$text = "<P ALIGN=RIGHT><IMAGE SRC=\"$DefaultImageDir/lastquarter.png\" ALT=\"Last Quarter\"" .
|
$text = "<IMAGE SRC=\"$DefaultImageDir/lastquarter.png\" ALT=\"Last Quarter\"" .
|
||||||
"WIDTH=16 HEIGHT=16> <FONT SIZE=\"-2\">" . escape_html($text);
|
"WIDTH=16 HEIGHT=16> <FONT SIZE=\"-2\">" . escape_html($text);
|
||||||
}
|
}
|
||||||
$moons[$day] = $text . "</FONT> ";
|
$moons[$day] = $text . "</FONT> ";
|
||||||
|
|||||||