home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-12-18 | 34.0 KB | 1,122 lines |
- *** ../p0/expr.h Mon Nov 9 14:12:08 1992
- --- ./expr.h Wed Dec 16 10:51:24 1992
- ***************
- *** 5,11 ****
- /* Contains a few definitions used by expression evaluator. */
- /* */
- /* This file is part of REMIND. */
- ! /* Copyright (C) 1991 by David F. Skoll. */
- /* */
- /***************************************************************/
-
- --- 5,11 ----
- /* Contains a few definitions used by expression evaluator. */
- /* */
- /* This file is part of REMIND. */
- ! /* Copyright (C) 1992 by David F. Skoll. */
- /* */
- /***************************************************************/
-
- *** ../p0/files.c Mon Nov 9 14:12:17 1992
- --- ./files.c Wed Dec 16 10:51:33 1992
- ***************
- *** 33,39 ****
- #include <dos.h>
- #endif
-
- - #include "config.h"
- #include "types.h"
- #include "protos.h"
- #include "globals.h"
- --- 33,38 ----
- ***************
- *** 428,434 ****
- /* file. Not needed for UNIX. */
- /* */
- /***************************************************************/
- ! #ifdef __MSDOS__
- /*
- * WARNING WARNING WARNING WARNING
- * In the version of Turbo C which I have, there is a bug in the
- --- 427,433 ----
- /* file. Not needed for UNIX. */
- /* */
- /***************************************************************/
- ! #if defined(__MSDOS__) || defined(OS2)
- /*
- * WARNING WARNING WARNING WARNING
- * In the version of Turbo C which I have, there is a bug in the
- ***************
- *** 449,463 ****
- int jul;
- #endif
- {
- ! int y, m, d;
- #ifdef __TURBOC__
- struct ftime ft;
- - #endif
- FILE *f;
-
- FromJulian(jul, &y, &m, &d);
- -
- - #ifdef __TURBOC__
- ft.ft_tsec = 0;
- ft.ft_min = 0;
- ft.ft_hour = 12; /* Arbitrarily set time to noon. */
- --- 448,460 ----
- int jul;
- #endif
- {
- !
- #ifdef __TURBOC__
- + int y, m, d;
- struct ftime ft;
- FILE *f;
-
- FromJulian(jul, &y, &m, &d);
- ft.ft_tsec = 0;
- ft.ft_min = 0;
- ft.ft_hour = 12; /* Arbitrarily set time to noon. */
- ***************
- *** 464,488 ****
- ft.ft_day = (unsigned int) d;
- ft.ft_month = (unsigned int) m+1;
- ft.ft_year = (unsigned int) (y - 1980);
- - #endif
-
- ! f = fopen(fname, "r");
- !
- ! #ifdef __TURBOC__
- if (!f || setftime(fileno(f) , &ft)) {
- - #endif
-
- ! #ifdef __MSC__
- ! if (!f || _dos_setftime(fileno(f),
- ! ((y-1980)<<9) + (m+1)<<5 + d,
- ! (12<<11))) {
- #endif
- fprintf(ErrFp, "Can't reset access date of %s\n", fname);
- if (f) fclose(f);
- return -1;
- }
-
- fclose(f);
- return 0;
- }
- #endif /* __MSDOS__ */
- --- 461,485 ----
- ft.ft_day = (unsigned int) d;
- ft.ft_month = (unsigned int) m+1;
- ft.ft_year = (unsigned int) (y - 1980);
-
- ! f = fopen(fname, "r");
- if (!f || setftime(fileno(f) , &ft)) {
-
- ! #else /* Must be MSC */
- ! if (utime(fname, (struct utimbuf *) NULL)) {
- #endif
- fprintf(ErrFp, "Can't reset access date of %s\n", fname);
- +
- + #ifdef __TURBOC__
- if (f) fclose(f);
- + #endif
- return -1;
- }
-
- + #ifdef __TURBOC__
- fclose(f);
- + #endif
- +
- return 0;
- }
- #endif /* __MSDOS__ */
- *** ../p0/funcs.c Mon Nov 9 14:23:22 1992
- --- ./funcs.c Wed Dec 16 10:51:34 1992
- ***************
- *** 6,16 ****
- /* expressions. */
- /* */
- /* This file is part of REMIND. */
- ! /* Copyright (C) 1991 by David F. Skoll. */
- /* */
- /***************************************************************/
- - #include <stdio.h>
- #include "config.h"
- #ifdef HAVE_STDLIB_H
- #include <stdlib.h>
- #endif
- --- 6,16 ----
- /* expressions. */
- /* */
- /* This file is part of REMIND. */
- ! /* Copyright (C) 1992 by David F. Skoll. */
- /* */
- /***************************************************************/
- #include "config.h"
- + #include <stdio.h>
- #ifdef HAVE_STDLIB_H
- #include <stdlib.h>
- #endif
- ***************
- *** 26,32 ****
- #include <sys/file.h>
- #endif
- #endif
- - /* May have to change previous line to <sys/file.h> for some unixes */
- #ifdef __MSDOS__
- #include <io.h>
- #define R_OK 4
- --- 26,31 ----
- ***************
- *** 127,134 ****
- #define DCOPYVAL(x, y) ( (x) = (y), (y).type = ERR_TYPE )
-
- /* Convenience macros */
- ! #define UPPER(c) ( ((c) >= 'a' && (c) <= 'z') ? (c) - 'a' + 'A' : (c) )
- ! #define LOWER(c) ( ((c) >= 'A' && (c) <= 'Z') ? (c) + 'a' - 'A' : (c) )
-
- /* The array holding the built-in functions. */
- Operator Func[] = {
- --- 126,133 ----
- #define DCOPYVAL(x, y) ( (x) = (y), (y).type = ERR_TYPE )
-
- /* Convenience macros */
- ! #define UPPER(c) (islower(c) ? toupper(c) : c)
- ! #define LOWER(c) (isupper(c) ? tolower(c) : c)
-
- /* The array holding the built-in functions. */
- Operator Func[] = {
- ***************
- *** 834,840 ****
-
- /***************************************************************/
- /* */
- ! /* FOstype - the type of operating system (UNIX or MSDOS) */
- /* */
- /***************************************************************/
- #ifdef HAVE_PROTOS
- --- 833,840 ----
-
- /***************************************************************/
- /* */
- ! /* FOstype - the type of operating system */
- ! /* (UNIX, OS/2, or MSDOS) */
- /* */
- /***************************************************************/
- #ifdef HAVE_PROTOS
- ***************
- *** 846,851 ****
- --- 846,855 ----
- #ifdef UNIX
- return RetStrVal("UNIX");
- #else
- + #ifdef __MSC__
- + if (_osmode == OS2_MODE)
- + return RetStrVal("OS/2");
- + #endif
- return RetStrVal("MSDOS");
- #endif
- }
- ***************
- *** 1362,1368 ****
- PRIVATE FILE *popen(char *cmd, char *mode)
- #else
- static FILE *popen(cmd, mode)
- ! char *cmd, *mode
- #endif
- {
- char *s;
- --- 1366,1372 ----
- PRIVATE FILE *popen(char *cmd, char *mode)
- #else
- static FILE *popen(cmd, mode)
- ! char *cmd, *mode;
- #endif
- {
- char *s;
- *** ../p0/globals.h Mon Nov 9 14:12:09 1992
- --- ./globals.h Wed Dec 16 10:51:25 1992
- ***************
- *** 7,13 ****
- /* MK_GLOBALS. Also contains useful macro definitions. */
- /* */
- /* This file is part of REMIND. */
- ! /* Copyright (C) 1991 by David F. Skoll. */
- /* */
- /***************************************************************/
-
- --- 7,13 ----
- /* MK_GLOBALS. Also contains useful macro definitions. */
- /* */
- /* This file is part of REMIND. */
- ! /* Copyright (C) 1992 by David F. Skoll. */
- /* */
- /***************************************************************/
-
- ***************
- *** 40,45 ****
- --- 40,46 ----
- EXTERN INIT( int DebugFlag, 0);
- EXTERN INIT( char DoCalendar, 0);
- EXTERN INIT( char DoSimpleCalendar, 0);
- + EXTERN INIT( char PsCal, 0);
- EXTERN INIT( int CalWidth, 80);
- EXTERN INIT( int CalWeeks, 0);
- EXTERN INIT( int CalMonths, 0);
- *** ../p0/init.c Mon Nov 9 14:12:19 1992
- --- ./init.c Wed Dec 16 10:51:35 1992
- ***************
- *** 36,41 ****
- --- 36,42 ----
- * -c[n] = Produce a calendar for n months (default = 1)
- * -w[n] = Specify output device width (default = 80)
- * -s[n] = Produce calendar in "simple calendar" format
- + * -p[n] = Produce calendar in format compatible with rem2ps
- * -v = Verbose mode
- * -o = Ignore ONCE directives
- * -a = Don't issue timed reminders which will be queued
- ***************
- *** 187,192 ****
- --- 188,201 ----
- if (!CalMonths) CalMonths = 1;
- break;
-
- + case 'p':
- + case 'P':
- + DoSimpleCalendar = 1;
- + PsCal = 1;
- + PARSENUM(CalMonths, arg);
- + if (!CalMonths) CalMonths = 1;
- + break;
- +
- case 'w':
- case 'W':
- PARSENUM(CalWidth, arg);
- ***************
- *** 303,309 ****
- #endif
- {
- fprintf(ErrFp, "\nREMIND %s Copyright 1992 by David F. Skoll\n\n", VERSION);
- ! fprintf(ErrFp, "Usage: remind [options] filename [date]\n\n");
- fprintf(ErrFp, "Options:\n");
- fprintf(ErrFp, " -n Output next occurrence of reminders in simple format\n");
- fprintf(ErrFp, " -r Disable RUN directives\n");
- --- 312,318 ----
- #endif
- {
- fprintf(ErrFp, "\nREMIND %s Copyright 1992 by David F. Skoll\n\n", VERSION);
- ! fprintf(ErrFp, " Usage: remind [options] filename [date]\n");
- fprintf(ErrFp, "Options:\n");
- fprintf(ErrFp, " -n Output next occurrence of reminders in simple format\n");
- fprintf(ErrFp, " -r Disable RUN directives\n");
- ***************
- *** 311,316 ****
- --- 320,326 ----
- fprintf(ErrFp, " -c+[n] Produce a calendar for n (default 1) weeks\n");
- fprintf(ErrFp, " -w[n] Specify width (default 80) of calendar output\n");
- fprintf(ErrFp, " -s[n] Produce 'simple calendar' for n (1) months\n");
- + fprintf(ErrFp, " -p[n] Same as -s, but input compatible with rem2ps\n");
- fprintf(ErrFp, " -v Verbose mode\n");
- fprintf(ErrFp, " -o Ignore ONCE directives\n");
- fprintf(ErrFp, " -t Trigger all future reminders regardless of delta\n");
- *** ../p0/main.c Mon Nov 9 14:12:20 1992
- --- ./main.c Wed Dec 16 10:51:37 1992
- ***************
- *** 16,21 ****
- --- 16,24 ----
- #ifdef HAVE_MALLOC_H
- #include <malloc.h>
- #endif
- + #ifdef HAVE_UNISTD
- + #include <unistd.h>
- + #endif
- #include <stdio.h>
- #include <string.h>
- #ifdef HAVE_STDARG
- ***************
- *** 27,32 ****
- --- 30,38 ----
-
- #ifdef __MSDOS__
- #include <dos.h>
- + # ifdef __MSC__
- + # include <time.h>
- + # endif
- #endif
-
-
- ***************
- *** 101,108 ****
- #endif
- }
-
- ! /* If it's MS-DOS, reset the file access date */
- ! #ifdef __MSDOS__
- if (RealToday == JulianToday) SetAccessDate(InitialFile, RealToday);
- #endif
-
- --- 107,114 ----
- #endif
- }
-
- ! /* If it's MS-DOS or OS2, reset the file access date */
- ! #if defined(__MSDOS__) || defined(OS2)
- if (RealToday == JulianToday) SetAccessDate(InitialFile, RealToday);
- #endif
-
- ***************
- *** 569,575 ****
- (void) vfprintf(ErrFp, fmt, argptr);
- (void) fputc('\n', ErrFp);
- #ifndef HAVE_STDARG
- ! va_end(argptr)
- #endif
- return;
- }
- --- 575,581 ----
- (void) vfprintf(ErrFp, fmt, argptr);
- (void) fputc('\n', ErrFp);
- #ifndef HAVE_STDARG
- ! va_end(argptr);
- #endif
- return;
- }
- ***************
- *** 676,683 ****
- long SystemTime()
- #endif
- {
- ! #ifdef __MSDOS__
- ! #ifdef __TURBOC__
- /* Get time in Turbo C */
-
- struct time t;
- --- 682,688 ----
- long SystemTime()
- #endif
- {
- ! #if defined( __MSDOS__ ) && defined( __TURBOC__ )
- /* Get time in Turbo C */
-
- struct time t;
- ***************
- *** 685,701 ****
- gettime(&t);
- return (long) t.ti_hour * 3600L + (long) t.ti_min * 60L +
- (long) t.ti_sec;
- -
- #else
- ! /* Get time in Microsoft C */
- ! struct dostime_t tloc;
- ! _dos_gettime(&tloc);
- ! return (long) tloc.hour * 3600L + (long) tloc.minute * 60L +
- ! (long) tloc.second;
- !
- ! #endif
- ! #else
- ! /* Get time in Unix */
- time_t tloc;
- struct tm *t;
-
- --- 690,697 ----
- gettime(&t);
- return (long) t.ti_hour * 3600L + (long) t.ti_min * 60L +
- (long) t.ti_sec;
- #else
- ! /* Get time in Unix or with MSC */
- time_t tloc;
- struct tm *t;
-
- ***************
- *** 723,730 ****
- int *y;
- #endif
- {
- ! #ifdef __MSDOS__
- ! #ifdef __TURBOC__
- /* Get today's date in Turbo C */
- struct date da;
-
- --- 719,725 ----
- int *y;
- #endif
- {
- ! #if defined( __MSDOS__ ) && defined( __TURBOC__ )
- /* Get today's date in Turbo C */
- struct date da;
-
- ***************
- *** 733,751 ****
- *m = da.da_mon - 1;
- *d = da.da_day;
- #else
- ! /* Get today's date in Microsoft C */
- ! struct dosdate_t buf;
- !
- ! _dos_getdate(&buf);
- !
- ! *d = buf.day;
- ! *m = buf.month - 1;
- ! *y = buf.year;
- ! #endif
- ! #else
- ! /* Get today's date in UNIX */
- ! time_t tloc;
- ! struct tm *t;
-
- (void) time(&tloc);
- t = localtime(&tloc);
- --- 728,736 ----
- *m = da.da_mon - 1;
- *d = da.da_day;
- #else
- ! /* Get today's date in UNIX or with MSC */
- ! time_t tloc;
- ! struct tm *t;
-
- (void) time(&tloc);
- t = localtime(&tloc);
- *** ../p0/makefile.msc Mon Nov 9 14:12:34 1992
- --- ./makefile.msc Wed Dec 16 10:51:53 1992
- ***************
- *** 55,57 ****
- --- 55,64 ----
-
- 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,,,
- +
- *** ../p0/makefile.tc Mon Nov 9 14:12:33 1992
- --- ./makefile.tc Wed Dec 16 10:51:51 1992
- ***************
- *** 1,6 ****
- # Makefile for REMIND for Turbo C for MSDOS
-
- ! VERSION= 03.00.00
-
- HDRS= config.h err.h expr.h globals.h protos.h types.h version.h
-
- --- 1,6 ----
- # Makefile for REMIND for Turbo C for MSDOS
-
- ! VERSION= 03.00.01
-
- HDRS= config.h err.h expr.h globals.h protos.h types.h version.h
-
- ***************
- *** 15,27 ****
-
- MANIFEST= readme.uni readme.dos copyrigh $(HDRS) $(SRCS) makefile rem rem.1 \
- remind.1 remind-a.csh remind-a.sh test.rem test-rem test.cmp makefile.tc \
- ! makefile.msc lnk.msc lnk.tc manifest.dos manifest.unx whatsnew.30 kall kall.1
-
- remind.exe: $(OBJS)
- tcc @lnk.tc
-
- .c.obj:
- tcc -A -w-pia -c -O -ms {$< }
-
- calendar.obj: calendar.c $(STDHDRS) expr.h
-
- --- 15,35 ----
-
- MANIFEST= readme.uni readme.dos copyrigh $(HDRS) $(SRCS) makefile rem rem.1 \
- remind.1 remind-a.csh remind-a.sh test.rem test-rem test.cmp makefile.tc \
- ! makefile.msc lnk.msc lnk.tc manifest.dos manifest.unx whatsnew.30 kall kall.1 \
- ! defs.rem readme.os2 makefile.os2 rem2ps.c rem2ps.h remind.def rem2ps.1
-
- + all: remind.exe rem2ps.exe
- +
- remind.exe: $(OBJS)
- tcc @lnk.tc
-
- + rem2ps.exe: rem2ps.obj
- + tcc -erem2ps.exe rem2ps.obj
- +
- .c.obj:
- tcc -A -w-pia -c -O -ms {$< }
- +
- + rem2ps.obj: rem2ps.c rem2ps.h config.h
-
- calendar.obj: calendar.c $(STDHDRS) expr.h
-
- *** ../p0/protos.h Mon Nov 9 14:12:10 1992
- --- ./protos.h Wed Dec 16 10:51:26 1992
- ***************
- *** 5,11 ****
- /* Function Prototypes. */
- /* */
- /* This file is part of REMIND. */
- ! /* Copyright (C) 1991 by David F. Skoll. */
- /* */
- /***************************************************************/
- #ifdef HAVE_PROTOS
- --- 5,11 ----
- /* Function Prototypes. */
- /* */
- /* This file is part of REMIND. */
- ! /* Copyright (C) 1992 by David F. Skoll. */
- /* */
- /***************************************************************/
- #ifdef HAVE_PROTOS
- ***************
- *** 110,112 ****
- --- 110,113 ----
- int DoPreserve ARGS ((Parser *p));
- int DoSatRemind ARGS ((Trigger *trig, TimeTrig *tim, ParsePtr p));
- int ParseNonSpaceChar ARGS ((ParsePtr p, int *err, int peek));
- + int HashVal ARGS ((const char *str));
- *** ../p0/queue.c Mon Nov 9 14:12:22 1992
- --- ./queue.c Wed Dec 16 10:51:38 1992
- ***************
- *** 8,18 ****
- /* Copyright (C) 1992 by David F. Skoll. */
- /* */
- /***************************************************************/
- #include <stdio.h>
- #include <signal.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- - #include "config.h"
- #ifdef HAVE_STDLIB_H
- #include <stdlib.h>
- #endif
- --- 8,18 ----
- /* Copyright (C) 1992 by David F. Skoll. */
- /* */
- /***************************************************************/
- + #include "config.h"
- #include <stdio.h>
- #include <signal.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- #ifdef HAVE_STDLIB_H
- #include <stdlib.h>
- #endif
- ***************
- *** 19,24 ****
- --- 19,27 ----
- #ifdef HAVE_MALLOC_H
- #include <malloc.h>
- #endif
- + #ifdef HAVE_UNISTD
- + #include <unistd.h>
- + #endif
- #include "globals.h"
- #include "err.h"
- #include "types.h"
- ***************
- *** 174,179 ****
- --- 177,183 ----
- /* Trigger the reminder */
- CreateParser(q->text, &p);
- trig.typ = q->typ;
- + RunDisabled = q->RunDisabled;
- (void) TriggerReminder(&p, &trig, &q->tt, JulianToday);
- fflush(stdout);
-
- *** ../p0/remind.1 Mon Nov 9 14:12:29 1992
- --- ./remind.1 Wed Dec 16 10:51:48 1992
- ***************
- *** 1,4 ****
- ! .TH REMIND 1 "20 October 1992"
- .UC4
- .SH NAME
- remind \- a sophisticated reminder service
- --- 1,4 ----
- ! .TH REMIND 1 "11 November 1992"
- .UC4
- .SH NAME
- remind \- a sophisticated reminder service
- ***************
- *** 38,43 ****
- --- 38,48 ----
- format" which can be used as input for more sophisticated calendar-drawing
- programs.
- .TP
- + .B \-p\fR\fIn\fR
- + The \fB\-p\fR option is very similar to the \fB\-s\fR option, except
- + that the output contains additional information for use by the
- + \fBrem2ps\fR program, which creates a PostScript calendar.
- + .TP
- .B \-v
- The \fB\-v\fR option makes the output of \fBRemind\fR slightly more verbose.
- .TP
- ***************
- *** 1149,1163 ****
- .RE
- .TP
- .B DATE constants
- ! \fBDATE\fR constants have no readable representation. They must be
- ! created with the \fBdate()\fR function, which takes the year, month
- ! and day as arguments:
- .PP
- .RS
- ! date(1992, 2, 29), date(1996, 4, 2), date(2001, 12, 17)
- .PP
- ! However, \fBDATE\fR constants are \fIprinted\fR as
- ! \fIyyyy\fR/\fImm\fR/\fIdd\fR.
- .RE
- .PP
- .B OPERATORS
- --- 1154,1170 ----
- .RE
- .TP
- .B DATE constants
- ! \fBDATE\fR constants are expressed as 'yyyy/mm/dd', and the single
- ! quotes \fImust\fR be supplied. This distinguishes date constants
- ! from division of integers. Examples:
- .PP
- .RS
- ! '1993/02/22', '1992/12/25', '1999/01/01'
- .PP
- ! Note that \fBDATE\fR constants are \fIprinted\fR as
- ! \fIyyyy\fR/\fImm\fR/\fIdd\fR without the quotes. Note also that versions
- ! of \fBRemind\fR prior to 03.00.01 did not support date constants. In those
- ! versions, you must create dates using the \fBdate()\fR function.
- .RE
- .PP
- .B OPERATORS
- ***************
- *** 1372,1377 ****
- --- 1379,1389 ----
- a \fBSTRING\fR consisting of the characters specified by the arguments.
- Note that none of the arguments can be 0, unless there is only one
- argument. As a special case, \fBchar(0)\fR returns "".
- + .PP
- + Note that because \fBRemind\fR does not support escaping of characters
- + in strings, the only way to get a double-quote in a string is to use
- + \fBchar(34)\fR. Yes, I know it's not portable - it assumes ASCII
- + coding.
- .TP
- .B choose(i_index, x_arg1 [,x_arg2...])
- \fBChoose\fR must take at least two arguments, the first of which is
- ***************
- *** 1525,1531 ****
- \fBord(2)\fR returns "2nd", and \fBord(213)\fR returns "213th".
- .TP
- .B ostype()
- ! Returns "UNIX" on UNIX systems, and "MSDOS" on MS-DOS systems.
- .TP
- .B plural(i_num [,s_str1 [,s_str2]])
- Can take from one to three arguments. If one argument is supplied, returns
- --- 1537,1545 ----
- \fBord(2)\fR returns "2nd", and \fBord(213)\fR returns "213th".
- .TP
- .B ostype()
- ! Returns "UNIX" on UNIX systems, "MSDOS" on MS-DOS systems, and "OS/2"
- ! on OS/2 systems. If you run \fBRemind\fR in an MS-DOS box under OS/2,
- ! this function returns "MSDOS".
- .TP
- .B plural(i_num [,s_str1 [,s_str2]])
- Can take from one to three arguments. If one argument is supplied, returns
- ***************
- *** 1615,1621 ****
- .TP
- .B version()
- Returns a string specifying the version of \fBRemind\fR. For version
- ! 03.00.00, returns "03.00.00". It is guaranteed that as new versions of
- \fBRemind\fR are released, the value returned by \fBversion()\fR will
- strictly increase, according to the rules for string ordering.
- .TP
- --- 1629,1635 ----
- .TP
- .B version()
- Returns a string specifying the version of \fBRemind\fR. For version
- ! 03.00.01, returns "03.00.01". It is guaranteed that as new versions of
- \fBRemind\fR are released, the value returned by \fBversion()\fR will
- strictly increase, according to the rules for string ordering.
- .TP
- ***************
- *** 2009,2024 ****
- .PP
- .SH CALENDAR MODE
- .PP
- ! If you supply the \fB\-c\fR or \fB\-s\fR command-line option, the \fBRemind\fR
- runs in "calendar mode." In this mode, \fBRemind\fR interprets the script
- repeatedly, performing one iteration through the whole file for each day
- in the calendar. Reminders which trigger are saved in internal buffers,
- and then inserted into the calendar in the appropriate places.
- .PP
- ! For example, if you have a reminder script called ".reminders", and you
- ! executed this command:
- .PP
- .nf
- remind -c .reminders jan 1993
- .fi
- .PP
- --- 2023,2049 ----
- .PP
- .SH CALENDAR MODE
- .PP
- ! If you supply the \fB\-c\fR, \fB\-s\fR or \fB\-p\fR
- ! command-line option, then \fBRemind\fR
- runs in "calendar mode." In this mode, \fBRemind\fR interprets the script
- repeatedly, performing one iteration through the whole file for each day
- in the calendar. Reminders which trigger are saved in internal buffers,
- and then inserted into the calendar in the appropriate places.
- .PP
- ! The \fB\-p\fR option is used in conjunction with the \fBrem2ps\fR
- ! program to produce a calendar in PostScript format. For example, the
- ! following command will send PostScript code to standard output:
- .PP
- .nf
- + remind -p .reminders | rem2ps
- + .fi
- + .PP
- + You can print a PostScript calendar by piping this to the \fBlpr\fR command.
- + .PP
- + If you have a reminder script called ".reminders", and you
- + execute this command:
- + .PP
- + .nf
- remind -c .reminders jan 1993
- .fi
- .PP
- ***************
- *** 2205,2210 ****
- --- 2230,2249 ----
- that the trigger date is issued only in election years, which are
- multiples of 4. The second \fBREM\fR command actually issues the
- reminder.
- + .PP
- + .B DETAILS ABOUT TRIGVALID()
- + .PP
- + The \fBtrigvalid()\fR function returns 1 if \fBRemind\fR could find a trigger
- + date for the previous \fBREM\fR or \fBIFTRIG\fR command. More specifically,
- + it returns 1 if \fBRemind\fR finds a date \fInot in the past\fR which
- + satisfies the trigger. In addition, there is one special case in which
- + \fBtrigvalid()\fR returns 1 and \fBtrigdate()\fR returns a meaningful result:
- + .PP
- + If the \fBREM\fR or \fBIFTRIG\fR command did not contain an \fBUNTIL\fR
- + clause, and contained all of the \fIday\fR, \fImonth\fR and \fIyear\fR
- + components, then \fBRemind\fR will correctly compute a trigger date, even
- + if it happens to be in the past. Note that this behaviour is not true for
- + versions of \fBRemind\fR prior to 03.00.01.
- .SH AUTHOR
- .PP
- David F. Skoll
- ***************
- *** 2212,2218 ****
- .PP
- Date calculation is a bit "brute force."
- .PP
- ! The MS-DOS version of \fBRemind\fR does not support queuing or timed
- activation of reminders.
- .PP
- \fBRemind\fR has some built-in limits on total line length,
- --- 2251,2257 ----
- .PP
- Date calculation is a bit "brute force."
- .PP
- ! The MS-DOS and OS/2 versions of \fBRemind\fR do not support queuing or timed
- activation of reminders.
- .PP
- \fBRemind\fR has some built-in limits on total line length,
- ***************
- *** 2220,2223 ****
- .PP
- .SH SEE ALSO
- .pp
- ! rem, elm, kall
- --- 2259,2262 ----
- .PP
- .SH SEE ALSO
- .pp
- ! rem, elm, kall, rem2ps
- *** ../p0/test-rem Mon Nov 9 14:12:33 1992
- --- ./test-rem Wed Dec 16 10:51:51 1992
- ***************
- *** 1,8 ****
- ! #!/bin/csh -f
- ! setenv TEST_GETENV "foo bar baz"
- ./remind -e -dxtev ./test.rem 16 feb 1991 > ./test.out
- cmp -s ./test.out ./test.cmp
- ! if ($status == 0) then
- echo "Remind: Acceptance test PASSED"
- exit 0
- else
- --- 1,8 ----
- ! #!/bin/sh
- ! TEST_GETENV="foo bar baz" ; export TEST_GETENV
- ./remind -e -dxtev ./test.rem 16 feb 1991 > ./test.out
- cmp -s ./test.out ./test.cmp
- ! if [ "$?" = "0" ]; then
- echo "Remind: Acceptance test PASSED"
- exit 0
- else
- ***************
- *** 11,14 ****
- echo "Examine the file test.out to see where it differs from the"
- echo "reference file test.cmp."
- exit 1
- ! endif
- --- 11,14 ----
- echo "Examine the file test.out to see where it differs from the"
- echo "reference file test.cmp."
- exit 1
- ! fi
- *** ../p0/test.cmp Mon Nov 9 14:12:33 1992
- --- ./test.cmp Wed Dec 16 10:51:51 1992
- ***************
- *** 349,355 ****
- "a05" + "6" => "a056"
- value("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH"
- set a058 version()
- ! version() => "03.00.00"
- set a059 wkday(today())
- today() => 1991/02/16
- wkday(1991/02/16) => "Saturday"
- --- 349,355 ----
- "a05" + "6" => "a056"
- value("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH"
- set a058 version()
- ! version() => "03.00.01"
- set a059 wkday(today())
- today() => 1991/02/16
- wkday(1991/02/16) => "Saturday"
- ***************
- *** 453,459 ****
- a048 "foo"
- a067 "INT"
- a039 "February"
- ! a058 "03.00.00"
- a049 21
- a068 "STRING"
- a059 "Saturday"
- --- 453,459 ----
- a048 "foo"
- a067 "INT"
- a039 "February"
- ! a058 "03.00.01"
- a049 21
- a068 "STRING"
- a059 "Saturday"
- *** ../p0/token.c Mon Nov 9 14:12:22 1992
- --- ./token.c Wed Dec 16 10:51:39 1992
- ***************
- *** 6,17 ****
- /* classifying the tokens parsed. */
- /* */
- /* This file is part of REMIND. */
- ! /* Copyright (C) 1991 by David F. Skoll. */
- /* */
- /***************************************************************/
- #include <stdio.h>
- #include <ctype.h>
- - #include "config.h"
- #ifdef HAVE_STDLIB_H
- #include <stdlib.h>
- #endif
- --- 6,17 ----
- /* classifying the tokens parsed. */
- /* */
- /* This file is part of REMIND. */
- ! /* Copyright (C) 1992 by David F. Skoll. */
- /* */
- /***************************************************************/
- + #include "config.h"
- #include <stdio.h>
- #include <ctype.h>
- #ifdef HAVE_STDLIB_H
- #include <stdlib.h>
- #endif
- *** ../p0/trigger.c Mon Nov 9 14:12:23 1992
- --- ./trigger.c Wed Dec 16 10:51:40 1992
- ***************
- *** 5,16 ****
- /* Routines for figuring out the trigger date of a reminder */
- /* */
- /* This file is part of REMIND. */
- ! /* Copyright (C) 1991 by David F. Skoll. */
- /* */
- /***************************************************************/
-
- - #include <stdio.h>
- #include "config.h"
- #ifdef HAVE_STDLIB_H
- #include <stdlib.h>
- #endif
- --- 5,16 ----
- /* Routines for figuring out the trigger date of a reminder */
- /* */
- /* This file is part of REMIND. */
- ! /* Copyright (C) 1992 by David F. Skoll. */
- /* */
- /***************************************************************/
-
- #include "config.h"
- + #include <stdio.h>
- #ifdef HAVE_STDLIB_H
- #include <stdlib.h>
- #endif
- ***************
- *** 439,448 ****
- --- 439,456 ----
- fprintf(ErrFp, "%s(%d): Expired\n",
- FileName, LineNo);
- }
- + if (result != -1) {
- + LastTriggerDate = result;
- + LastTrigValid = 1;
- + }
- return -1;
- }
- /* Keep scanning... unless there's no point in doing it.*/
- if (nextstart <= start) {
- + if (result != -1) {
- + LastTriggerDate = result;
- + LastTrigValid = 1;
- + }
- if (DebugFlag & DB_PRTTRIG) {
- fprintf(ErrFp, "%s(%d): Expired\n",
- FileName, LineNo);
- *** ../p0/types.h Mon Nov 9 14:12:10 1992
- --- ./types.h Wed Dec 16 10:51:26 1992
- ***************
- *** 5,11 ****
- /* Type definitions all dumped here. */
- /* */
- /* This file is part of REMIND. */
- ! /* Copyright (C) 1991 by David F. Skoll. */
- /* */
- /***************************************************************/
- /* Values */
- --- 5,11 ----
- /* Type definitions all dumped here. */
- /* */
- /* This file is part of REMIND. */
- ! /* Copyright (C) 1992 by David F. Skoll. */
- /* */
- /***************************************************************/
- /* Values */
- *** ../p0/utils.c Mon Nov 9 14:12:24 1992
- --- ./utils.c Wed Dec 16 10:51:41 1992
- ***************
- *** 5,17 ****
- /* Useful utility functions. */
- /* */
- /* This file is part of REMIND. */
- ! /* Copyright (C) 1991 by David F. Skoll. */
- /* */
- /***************************************************************/
-
- #include <string.h>
- #include <stdio.h>
- - #include "config.h"
- #ifdef HAVE_STDLIB_H
- #include <stdlib.h>
- #endif
- --- 5,17 ----
- /* Useful utility functions. */
- /* */
- /* This file is part of REMIND. */
- ! /* Copyright (C) 1992 by David F. Skoll. */
- /* */
- /***************************************************************/
-
- + #include "config.h"
- #include <string.h>
- #include <stdio.h>
- #ifdef HAVE_STDLIB_H
- #include <stdlib.h>
- #endif
- ***************
- *** 18,25 ****
- #ifdef HAVE_MALLOC_H
- #include <malloc.h>
- #endif
-
- ! #define UPPER(c) ( ((c) >= 'a' && (c) <= 'z') ? (c) - 'a' + 'A' : (c) )
-
- /***************************************************************/
- /* */
- --- 18,26 ----
- #ifdef HAVE_MALLOC_H
- #include <malloc.h>
- #endif
- + #include <ctype.h>
-
- ! #define UPPER(c) (islower(c) ? toupper(c) : c)
-
- /***************************************************************/
- /* */
- *** ../p0/var.c Mon Nov 9 14:12:25 1992
- --- ./var.c Wed Dec 16 10:51:42 1992
- ***************
- *** 6,17 ****
- /* user- and system-defined variables. */
- /* */
- /* This file is part of REMIND. */
- ! /* Copyright (C) 1991 by David F. Skoll. */
- /* */
- /***************************************************************/
-
- - #include <stdio.h>
- #include "config.h"
- #ifdef HAVE_STDLIB_H
- #include <stdlib.h>
- #endif
- --- 6,17 ----
- /* user- and system-defined variables. */
- /* */
- /* This file is part of REMIND. */
- ! /* Copyright (C) 1992 by David F. Skoll. */
- /* */
- /***************************************************************/
-
- #include "config.h"
- + #include <stdio.h>
- #ifdef HAVE_STDLIB_H
- #include <stdlib.h>
- #endif
- ***************
- *** 18,23 ****
- --- 18,24 ----
- #ifdef HAVE_MALLOC_H
- #include <malloc.h>
- #endif
- + #include <ctype.h>
- #include "types.h"
- #include "expr.h"
- #include "globals.h"
- ***************
- *** 24,30 ****
- #include "protos.h"
- #include "err.h"
-
- ! #define UPPER(c) ( ((c) >= 'a' && (c) <= 'z') ? (c) - 'a' + 'A' : (c) )
-
- /* The variable hash table */
- #define VAR_HASH_SIZE 64
- --- 25,31 ----
- #include "protos.h"
- #include "err.h"
-
- ! #define UPPER(c) (islower(c) ? toupper(c) : c)
-
- /* The variable hash table */
- #define VAR_HASH_SIZE 64
- ***************
- *** 377,383 ****
-
- /***************************************************************/
- /* */
- ! /* DoPreserve - delete a bunch of variables. */
- /* */
- /***************************************************************/
- #ifdef HAVE_PROTOS
- --- 378,384 ----
-
- /***************************************************************/
- /* */
- ! /* DoPreserve - preserve a bunch of variables. */
- /* */
- /***************************************************************/
- #ifdef HAVE_PROTOS
-