Compare commits

...

23 Commits

Author SHA1 Message Date
David F. Skoll
19f03e419a Fix test.cmp for new version. 2007-08-22 20:32:49 -04:00
David F. Skoll
5a281d5999 Updated changelog. 2007-08-22 20:29:35 -04:00
David F. Skoll
d80d14f585 Better placement of moons 2007-08-22 16:34:35 -04:00
David F. Skoll
520b8511bd Make moon images transparent. 2007-08-22 16:31:04 -04:00
David F. Skoll
91627d4f22 Fix typo 2007-08-22 15:57:27 -04:00
David F. Skoll
a21147c7a5 Prune a whole bunch of obsolete files. 2007-08-22 15:54:41 -04:00
David F. Skoll
d22c1dee49 Fix README to reflect reality. 2007-08-22 15:50:58 -04:00
David F. Skoll
95b0fc7480 Update version to 03.01.01; document changes in WHATSNEW 2007-08-22 15:31:17 -04:00
David F. Skoll
b40d5d7984 Performance improvements. 2007-08-22 12:00:12 -04:00
David F. Skoll
2df93c9df3 Fixed wording of man page. 2007-08-22 11:29:35 -04:00
David F. Skoll
51cdea4b17 better definition of prev_monday 2007-08-21 22:03:31 -04:00
David F. Skoll
f229e64744 Fix typo 2007-08-21 18:58:00 -04:00
David F. Skoll
0f15955a41 Better definition of prev_monday in man page. 2007-08-21 18:54:53 -04:00
David F. Skoll
390e6c2eed Fixed typo 2007-08-21 18:49:49 -04:00
David F. Skoll
877eaccd6d Documented nonomitted() 2007-08-21 18:47:51 -04:00
David F. Skoll
6424e655a1 Allow cycle modulus to be zero. 2007-08-21 17:34:46 -04:00
David F. Skoll
176037082b Add cycle function to handle Elizabeth's school schedule. 2007-08-21 17:10:04 -04:00
David F. Skoll
a361c7e426 Note that we always use "/" in rem2ps input. 2007-08-17 09:07:32 -04:00
David F. Skoll
caba0c1695 Make "-n" mode use / (always) in dates to match Simple Calendar output. 2007-08-15 23:26:41 -04:00
David F. Skoll
71b3f9fefc Remove kall, rem from install target. 2007-08-15 23:20:57 -04:00
David F. Skoll
91f8507e51 Remove obsolete scripts. Apply some Debian-maintainer patches. 2007-08-15 23:18:48 -04:00
David F. Skoll
b68e81a126 Fix trailing "s" bug (Debian patch) 2007-08-15 23:06:21 -04:00
David F. Skoll
72658025f1 Prevent warning with fcc 2.95 2007-08-15 15:14:18 -04:00
46 changed files with 177 additions and 1170 deletions

View File

@@ -1 +0,0 @@
Remind no longer works on AmigaDOS.

View File

@@ -1 +0,0 @@
Remind no longer works with Borland C Compiler.

View File

@@ -1 +0,0 @@
Remind no longer works on MS-DOS.

View File

@@ -1 +0,0 @@
Remind no longer works on OS/2.

View File

@@ -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
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
commands, as well as U.S. and Jewish holidays.

View File

@@ -1 +0,0 @@
Remind no longer works on QDOS.

View File

@@ -1,5 +1,35 @@
CHANGES TO REMIND
* Version 3.1 Patch 1 - 23 August 2007
+ 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 - 14 August 2007
+ MAJOR ENHANCEMENTS

View File

@@ -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

View File

@@ -1,34 +0,0 @@
.TH REM 1 "15 February 1998"
.UC 4
.SH NAME
rem \- run 'remind' with a default reminder file
.SH SYNOPSIS
.B rem
[\-F \fIfilename\fR] [\fIremind_options\fR] [\fIremind_params\fR]
.SH DESCRIPTION
.B Rem
runs the \fBremind\fR program with a default reminder file of
"$HOME/.reminders". You can supply remind options on the command line,
as well as a date specification, just as with \fBremind\fR.
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
For example, typing:
.PP
.nf
rem -c 1 jan 1992
.fi
.PP
has the same effect as typing:
.PP
.nf
remind -c $HOME/.reminders 1 jan 1992
.fi
.PP
.SH AUTHOR
David F. Skoll
.SH SEE ALSO
remind, kall

View File

@@ -121,10 +121,10 @@ numbers.
numbers.
.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
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.
.RE
.TP
@@ -137,7 +137,7 @@ specifying:
.RS
.PP
.nf
-ftshe Helvetica -fd Helvetica-BoldOblique
\-ftshe Helvetica \-fd Helvetica-BoldOblique
.fi
.PP
In other words, the heading, entry and small-calendar fonts are set
@@ -153,7 +153,7 @@ are equivalent to specifying:
.RS
.PP
.nf
-sthd 14 -se 8
\-sthd 14 \-se 8
.fi
.PP
In other words, the heading and day numbers are 14-point fonts, and the
@@ -179,7 +179,7 @@ for good output:
.PP
.nf
# This gives good results for putting into a binder
rem2ps -ol 72 -sh 12
rem2ps \-ol 72 \-sh 12
.fi
.SH USAGE
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:
.PP
.nf
remind -p12 /dev/null 1 jan 1994 | rem2ps | lpr -Plaser
remind \-p12 /dev/null 1 jan 1994 | rem2ps | lpr \-Plaser
.fi
.PP
That example creates a blank calendar for the entire year of 1994, and
sends it the the printer named "laser."
.PP
.nf
remind -p ~/.reminders | rem2ps -l -sd 18 > cal.ps
remind \-p ~/.reminders | rem2ps \-l \-sd 18 > cal.ps
.fi
.PP
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
.PP
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
\fIspecial\fR is a string used
for "out-of-band" communication with back-ends. If the reminder

View File

@@ -1392,7 +1392,7 @@ as being the combination of \fBDATE\fR and \fBTIME\fR parts.
The following examples illustrate constants in \fBRemind\fR expressions:
.TP
.B INT constants
12, 36, -10, 0, 1209
12, 36, \-10, 0, 1209
.TP
.B STRING constants
"Hello there", "This is a test", "\\n\\gosd\\w", ""
@@ -1568,7 +1568,7 @@ otherwise.
.PP
Operators of equal precedence are \fIalways\fR evaluated from left
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:
.PP
.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
in degrees. 0 is a new moon, 180 is a full moon, 90 is first-quarter, etc.
.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()
Returns the current system time, as a \fBTIME\fR type. This may be
the actual time, or a time supplied on the command line.
@@ -2351,13 +2415,13 @@ of \fIstr\fR.
.TP
.B sunrise([dq_date])
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
returns the \fBINT\fR 0 if the sun never sets, or 1440 if it never rises.
.TP
.B sunset([dq_date])
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
returns the \fBINT\fR 0 if the sun never rises, or 1440 if it never
sets.
@@ -3406,7 +3470,7 @@ be preceded by "(not important)".
.fi
.PP
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
produce an entry in the calendar (i.e., \fBCAL\fR- and possibly
\fBRUN\fR-type reminders as well as \fBMSG\fR-type reminders.)
@@ -3951,7 +4015,7 @@ Liviu Daia
Rafa Couto
.PP
\fBIcelandic\fR --
Björn Davíðsson
Bj\(:orn Dav\('i\[Sd]sson
.SH BUGS
.PP
There's no good reason why read-only system variables are not
@@ -3979,4 +4043,4 @@ Catalog\fR, Jewish Publication Society of America.
.PP
.SH SEE ALSO
.PP
rem, elm, kall, rem2ps, tkremind
rem2ps, tkremind

View File

@@ -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

View File

@@ -1,7 +1,4 @@
Files in this directory:
kall -- Kills a program by command name, as in "kall remind"
rem -- Starts Remind with a default file of $HOME/.reminders
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
tkremind -- Tcl/Tk graphical calendar using Remind as engine
cm2rem.tcl -- Convert Sun's "cm" calendar manager files to Remind.

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -1280,7 +1280,7 @@ proc RemindDialogToOptions { w } {
lappend ans "-global-$winstem" [eval set $winstem]
}
"Entry" {
lappend ans "-entry-$winstem" [$win get]
lappend ans "-entry-$winstem" [string map -nocase {"\n" " "} [$win get]]
}
}
}
@@ -1559,7 +1559,7 @@ proc CreateReminder {w} {
regsub -- {^-stdin-\([0-9]*\): } $err {} err
error "Error from Remind: $err"
}
append rem " MSG $body"
append rem " MSG " [string map -nocase {"\n" " "} $body]
return $rem
}

View File

@@ -1,7 +1,7 @@
# Makefile.in for REMIND
#
VERSION=03.01.00
VERSION=03.01.01
SHELL= /bin/sh
BETA = 1
srcdir=@srcdir@
@@ -17,11 +17,9 @@ INSTALL_PROGRAM=@INSTALL_PROGRAM@
INSTALL_DATA=@INSTALL_DATA@
PROGS= remind rem2ps
SCRIPTS= $(srcdir)/../scripts/kall $(srcdir)/../scripts/rem \
$(srcdir)/../scripts/tkremind $(srcdir)/../scripts/cm2rem.tcl
SCRIPTS= $(srcdir)/../scripts/tkremind $(srcdir)/../scripts/cm2rem.tcl
MANS= $(srcdir)/../man/kall.1 $(srcdir)/../man/rem.1 \
$(srcdir)/../man/rem2ps.1 $(srcdir)/../man/remind.1 \
MANS= $(srcdir)/../man/rem2ps.1 $(srcdir)/../man/remind.1 \
$(srcdir)/../man/tkremind.1 $(srcdir)/../man/cm2rem.1
.SUFFIXES:
@@ -44,10 +42,10 @@ test: remind
@CC@ -c @CFLAGS@ @DEFS@ $(CEXTRA) $(LANGDEF) -I. -I$(srcdir) $<
rem2ps: rem2ps.o dynbuf.o
@CC@ @LDFLAGS@ -o rem2ps rem2ps.o dynbuf.o
@CC@ @LDFLAGS@ $(LDEXTRA) -o rem2ps rem2ps.o dynbuf.o
remind: $(REMINDOBJS)
@CC@ @LDFLAGS@ -o remind $(REMINDOBJS) @LIBS@
@CC@ @LDFLAGS@ $(LDEXTRA) -o remind $(REMINDOBJS) @LIBS@
install: all
-mkdir -p $(DESTDIR)$(bindir) || true

View File

@@ -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

View File

@@ -1,7 +0,0 @@
IGNORE=154
IGNORE=161
IGNORE=100
IGNORE=85
LINKOPT SC
LINKOPT SD
LINKOPT NOICONS

View File

@@ -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);
}

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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,,,

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -1 +0,0 @@
NAME WINDOWCOMPAT NEWFILES

View File

@@ -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

View File

@@ -473,8 +473,9 @@ static int ParseScanFrom(ParsePtr s, Trigger *t, int type)
Token tok;
int r;
DynamicBuffer buf;
DBufInit(&buf);
char const *word;
DBufInit(&buf);
if (type == SCANFROM_TYPE) {
word = "SCANFROM";
} else {
@@ -597,7 +598,7 @@ int TriggerReminder(ParsePtr p, Trigger *t, TimeTrig *tim, int jul)
return OK;
}
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) {
DBufFree(&calRow);
return E_NO_MEM;
@@ -892,7 +893,7 @@ int DoMsgCommand(char *cmd, char *msg)
msg = DBufValue(&buf);
/* Do "%s" substitution */
l = strlen(cmd)-1;
l = strlen(cmd);
for (i=0; i<l; i++) {
if (cmd[i] == '%' && cmd[i+1] == 's') {
++i;
@@ -907,11 +908,6 @@ int DoMsgCommand(char *cmd, char *msg)
}
}
}
if (l >= 0 && DBufPutc(&execBuffer, cmd[l]) != OK) {
r = E_NO_MEM;
goto finished;
}
r = OK;
system(DBufValue(&execBuffer));

View File

@@ -73,7 +73,7 @@ void DBufInit(DynamicBuffer *dbuf)
}
/**********************************************************************
%FUNCTION: DBufPutc
%FUNCTION: DBufPutcFN
%ARGUMENTS:
dbuf -- pointer to a dynamic buffer
c -- character to append to buffer
@@ -82,7 +82,7 @@ void DBufInit(DynamicBuffer *dbuf)
%DESCRIPTION:
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 (DBufMakeRoom(dbuf, dbuf->len+1) != OK) return E_NO_MEM;

View File

@@ -24,7 +24,7 @@ typedef struct {
} DynamicBuffer;
void DBufInit(DynamicBuffer *dbuf);
int DBufPutc(DynamicBuffer *dbuf, char c);
int DBufPutcFN(DynamicBuffer *dbuf, char c);
int DBufPuts(DynamicBuffer *dbuf, char *str);
void DBufFree(DynamicBuffer *dbuf);
int DBufGets(DynamicBuffer *dbuf, FILE *fp);
@@ -32,4 +32,6 @@ int DBufGets(DynamicBuffer *dbuf, FILE *fp);
#define DBufValue(bufPtr) ((bufPtr)->buffer)
#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 */

View File

@@ -51,6 +51,7 @@
/* Function prototypes */
static int FCurrent (void);
static int FNonomitted (void);
static int FTimepart(void);
static int FDatepart(void);
static int FRealCurrent(void);
@@ -228,6 +229,7 @@ Operator Func[] = {
{ "moondatetime", 1, 3, FMoondatetime },
{ "moonphase", 0, 2, FMoonphase },
{ "moontime", 1, 3, FMoontime },
{ "nonomitted", 2, NO_MAX, FNonomitted },
{ "now", 0, 0, FNow },
{ "ord", 1, 1, FOrd },
{ "ostype", 0, 0, FOstype },
@@ -2438,3 +2440,36 @@ static int FTzconvert(void)
RetVal.v.val = jul * MINUTES_PER_DAY + tim;
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;
}

View File

@@ -34,8 +34,6 @@ while (isdigit(*(string))) { \
string++; \
}
#define UPPER(c) (islower(c) ? toupper(c) : c)
/* The big array holding all recognized (literal) tokens in reminder file.
Keep this array sorted, or software will not work. */
Token TokArray[] = {
@@ -342,7 +340,7 @@ static int TokStrCmp(const Token *t, const char *s)
register int r;
char *tk = t->name;
while(*tk && *s && !(*s == ',' && *(s+1) == 0)) {
r = UPPER(*tk) - UPPER(*s);
r = *tk - tolower(*s);
tk++;
s++;
if (r) return r;

View File

@@ -21,7 +21,7 @@
#include "globals.h"
#include "protos.h"
#define UPPER(c) (islower(c) ? toupper(c) : c)
#define UPPER(c) toupper(c)
/***************************************************************/
/* */

View File

@@ -10,4 +10,4 @@
/* */
/***************************************************************/
#define VERSION "03.01.00"
#define VERSION "03.01.01"

View File

@@ -631,7 +631,7 @@ set a057 value("a05"+"6")
"a05" + "6" => "a056"
value("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH"
set a058 version()
version() => "03.01.00"
version() => "03.01.01"
set a059 wkday(today())
today() => 1991-02-16
wkday(1991-02-16) => "Saturday"
@@ -772,7 +772,7 @@ dump
a048 "foo"
a067 "INT"
a039 "February"
a058 "03.01.00"
a058 "03.01.01"
a077 "1992 92
"
a049 21

View File

@@ -4,12 +4,12 @@
# Copyright (C) 1999 by Roaring Penguin Software Inc.
# The complete name of your www host. Example: www.mycompany.com
WWWHOST = localhost
WWWHOST = magnesium.roaringpenguin.com
# WWWHOST = www.mycompany.com
# The complete path to where the scripts actually live, as seen by
# the UNIX operating system.
SCRIPTDIR = /home/httpd/cgi-bin
SCRIPTDIR = /var/www/cgi-bin
# SCRIPTDIR = /home/dfs/Remind/www/TEST
# 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".
# This is a sample file containing links to all the scripts. This path
# 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
IMAGEDIR = /home/httpd/html/remind
IMAGEDIR = /var/www/html/remind
# Where images are, as seen by web browers
IMAGEBASE = /remind

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 B

After

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 B

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 B

After

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 B

After

Width:  |  Height:  |  Size: 200 B

View File

@@ -171,16 +171,16 @@ sub parse_input {
}
next if ($phase > 3);
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);
} 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);
} 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);
} 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);
}
$moons[$day] = $text . "</FONT> ";