home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-05-04 | 45.2 KB | 1,417 lines |
- Prereq: "03.00.05"
- *** ../p5rel/version.h Thu Apr 22 10:24:22 1993
- --- ./version.h Fri Apr 23 12:59:49 1993
- ***************
- *** 9,12 ****
- /* */
- /***************************************************************/
-
- ! #define VERSION "03.00.05"
- --- 9,12 ----
- /* */
- /***************************************************************/
-
- ! #define VERSION "03.00.06"
- *** ../p5rel/COPYRIGHT Thu Apr 22 10:24:02 1993
- --- ./COPYRIGHT Mon May 3 10:13:51 1993
- ***************
- *** 30,38 ****
- 1993 by David Skoll. These programs can be distributed according to
- the terms of paragraphs 3 and 4.
-
- ! 7. I will attempt to support REMIND as much as possible. However, you
- ! use it at your own risk. I am not responsible for any damages caused
- ! by the use or misuse of REMIND.
-
- 8. If you wish to contribute ideas or money to help the production of
- software like REMIND, you can reply to the address shown at the end of
- --- 30,39 ----
- 1993 by David Skoll. These programs can be distributed according to
- the terms of paragraphs 3 and 4.
-
- ! 7. I will attempt to support REMIND as much as possible. However,
- ! REMIND is supplied on an "as-is" basis with no warranty. You use it
- ! at your own risk. I am not responsible for any damages caused by the
- ! use or misuse of REMIND.
-
- 8. If you wish to contribute ideas or money to help the production of
- software like REMIND, you can reply to the address shown at the end of
- *** ../p5rel/Makefile Thu Apr 22 10:24:10 1993
- --- ./Makefile Fri Apr 23 13:00:44 1993
- ***************
- *** 46,52 ****
- # 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'.
- #-----------------------------------------------------------------------------
- ! VERSION= 03.00.05
-
- 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
- --- 46,52 ----
- # 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'.
- #-----------------------------------------------------------------------------
- ! VERSION= 03.00.06
-
- 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
- ***************
- *** 105,112 ****
- var.o: var.c $(STDHDRS) expr.h
-
- tarZ:
- ! tar cvf remind-3.0.5.tar $(MANIFEST)
- ! compress -v remind-3.0.5.tar
-
- shar:
- shar -x -n"Remind $(VERSION)" -l45 -o./Shar $(MANIFEST)
- --- 105,112 ----
- var.o: var.c $(STDHDRS) expr.h
-
- tarZ:
- ! tar cvf remind-3.0.6.tar $(MANIFEST)
- ! compress -v remind-3.0.6.tar
-
- shar:
- shar -x -n"Remind $(VERSION)" -l45 -o./Shar $(MANIFEST)
- *** ../p5rel/WHATSNEW.30 Thu Apr 22 10:24:22 1993
- --- ./WHATSNEW.30 Mon May 3 11:00:51 1993
- ***************
- *** 1,5 ****
- --- 1,28 ----
- CHANGES TO REMIND
-
- + * Version 3.0 Patch 6
- +
- + + MINOR ENHANCEMENTS
- +
- + - Added the PS- and PSFILE-type reminders - these allow you to include
- + arbitrary PostScript code in your PostScript calendars. Useful for
- + shading, drawing graphics on calendars, etc. Use with care, though!
- +
- + - Added the "-ivar=val" option to initialize variables from the command
- + line. Changed the remind-all.* shell scripts to predefine the variable
- + "remind_all".
- +
- + + BUG FIXES
- +
- + - Fixed a bug in the hebmon(), hebday() and hebyear() functions - there
- + was an off-by-one error. Sorry!
- +
- + - Fixed a bug in the hebdate() function which resulted in infinite loops
- + for dates after about 2075
- +
- + - Fixed a bug in the -u option which sometimes caused a core dump
- + (embarrassed grin!) The fix is due to Tina Hoeltig. Thanks, Tina!
- +
- * Version 3.0 Patch 5
-
- + MAJOR ENHANCEMENTS:
- *** ../p5rel/calendar.c Thu Apr 22 10:24:00 1993
- --- ./calendar.c Mon May 3 12:01:29 1993
- ***************
- *** 33,38 ****
- --- 33,39 ----
-
- /* Global variables */
- static CalEntry *CalColumn[7];
- + static CalEntry *CalPs[7];
-
- static int ColSpaces;
-
- ***************
- *** 614,619 ****
- --- 615,621 ----
- int r;
- int jul;
- CalEntry *CurCol = CalColumn[col];
- + CalEntry *CurPs = CalPs[col];
- CalEntry *e;
- char *s;
-
- ***************
- *** 626,635 ****
- --- 628,642 ----
- #endif
- if (trig.typ == NO_TYPE) return E_EOLN;
- if (trig.typ == SAT_TYPE) return DoSatRemind(&trig, &tim, p);
- +
- /* Calculate the trigger date */
- jul = ComputeTrigger(trig.scanfrom, &trig, &r);
- if (r) return r;
- + if (!PsCal && (trig.typ == PS_TYPE || trig.typ == PSF_TYPE)) return OK;
-
- + /* Remove any "at" times from PS or PSFILE reminders */
- + if (trig.typ == PS_TYPE || trig.typ == PSF_TYPE) tim.ttime = NO_TIME;
- +
- /* If trigger date == today, add it to the current entry */
- if (jul == JulianToday) {
- s = SubstBuffer;
- ***************
- *** 646,656 ****
- free(e);
- return E_NO_MEM;
- }
- ! e->pos = e->text;
- ! e->time = tim.ttime;
- ! e->next = CurCol;
- ! CalColumn[col] = e;
- ! SortColByTime(col);
- }
- return OK;
- }
- --- 653,670 ----
- free(e);
- return E_NO_MEM;
- }
- ! if (trig.typ == PS_TYPE || trig.typ == PSF_TYPE) {
- ! e->pos = (trig.typ == PS_TYPE) ? "P" : "F";
- ! e->time = NO_TIME;
- ! e->next = CurPs;
- ! CalPs[col] = e;
- ! } else {
- ! e->pos = e->text;
- ! e->time = tim.ttime;
- ! e->next = CurCol;
- ! CalColumn[col] = e;
- ! SortColByTime(col);
- ! }
- }
- return OK;
- }
- ***************
- *** 669,679 ****
- int col, jul;
- #endif
- {
- ! CalEntry *e = CalColumn[col];
- CalEntry *n;
- int y, m, d;
-
- FromJulian(jul, &y, &m, &d);
- while(e) {
- printf("%04d%c%02d%c%02d ", y, DATESEP, m+1, DATESEP, d);
- printf("%s\n", e->text);
- --- 683,707 ----
- int col, jul;
- #endif
- {
- ! CalEntry *e = CalPs[col];
- CalEntry *n;
- int y, m, d;
-
- + /* Do all the PostScript entries first, if any */
- FromJulian(jul, &y, &m, &d);
- + while(e) {
- + printf("%c%c%c%c%c%02d%c%02d ", *(e->pos), *(e->pos),
- + *(e->pos), *(e->pos), DATESEP,
- + m+1, DATESEP, d);
- + printf("%s\n", e->text);
- + free(e->text);
- + n = e->next;
- + free(e);
- + e = n;
- + }
- + CalPs[col] = NULL;
- +
- + e = CalColumn[col];
- while(e) {
- printf("%04d%c%02d%c%02d ", y, DATESEP, m+1, DATESEP, d);
- printf("%s\n", e->text);
- *** ../p5rel/defs.rem Thu Apr 22 10:24:03 1993
- --- ./defs.rem Mon May 3 10:29:12 1993
- ***************
- *** 13,18 ****
- --- 13,19 ----
- # Use your text editor to search for: #
- # "#USHOLS" for U.S. holidays #
- # "#JHOLS" for Jewish holidays #
- + # "#PSSTUFF" for nifty PostScript examples #
- # #
- # This file is part of REMIND. #
- # Copyright (C) 1992, 1993 by David F. Skoll #
- ***************
- *** 24,31 ****
- ################################################
- # Ensure required version of remind is used... #
- ################################################
- ! IF version() < "03.00.05"
- ! ERRMSG This file requires at least version 03.00.05 of Remind.%
- ERRMSG This version is version [version()].
- EXIT
- ENDIF
- --- 25,32 ----
- ################################################
- # Ensure required version of remind is used... #
- ################################################
- ! IF version() < "03.00.06"
- ! ERRMSG This file requires at least version 03.00.06 of Remind.%
- ERRMSG This version is version [version()].
- EXIT
- ENDIF
- ***************
- *** 442,444 ****
- --- 443,476 ----
- ENDIF
- CAL [ORD(odays)] of Omer
- ENDIF
- +
- + #PSSTUFF
- + ##########################################################################
- + # #
- + # This portion of the file contains some cute examples of the new #
- + # PS-type reminders. You need a PostScript printer or viewer to #
- + # appreciate these. To use them, pipe the output of remind -p into the #
- + # rem2ps program. #
- + # #
- + ##########################################################################
- +
- + # Convenient to stick all the PostScript code in a string var - makes
- + # reminders easier to understand. The variable "shade" will contain
- + # PostScript code to shade in a particular box on the calendar.
- + SET shade \
- + "/_A LineWidth 2 div def \
- + _A _A moveto \
- + BoxWidth _A sub _A lineto \
- + BoxWidth _A sub BoxHeight _A sub lineto \
- + _A BoxHeight _A sub lineto \
- + closepath 0.95 setgray fill 0.0 setgray"
- +
- + # The following reminder will shade the Saturday and Sunday calendar
- + # entries.
- + REM Sat Sun PS [shade]
- +
- + # The following will fill in the Hebrew dates on the calendar. For this
- + # example, I recommend that you use the "-sd 10" option for rem2ps.
- + REM PS Border BoxHeight Border sub DaySize sub moveto \
- + /DayFont findfont DaySize scalefont setfont \
- + ([hebday(today())] [hebmon(today())]) show
- *** ../p5rel/dorem.c Thu Apr 22 10:24:03 1993
- --- ./dorem.c Fri Apr 30 13:16:27 1993
- ***************
- *** 466,472 ****
- int r, y, m, d;
-
- if (t->typ == RUN_TYPE && RunDisabled) return E_RUN_DISABLED;
- ! if (t->typ == CAL_TYPE) return OK;
-
- /* If it's a MSG-type reminder, and no -k option was used, issue the banner. */
- if (t->typ == MSG_TYPE && !NumTriggered && !NextMode && !MsgCommand) {
- --- 466,473 ----
- int r, y, m, d;
-
- if (t->typ == RUN_TYPE && RunDisabled) return E_RUN_DISABLED;
- ! if (t->typ == CAL_TYPE || t->typ == PS_TYPE || t->typ == PSF_TYPE)
- ! return OK;
-
- /* If it's a MSG-type reminder, and no -k option was used, issue the banner. */
- if (t->typ == MSG_TYPE && !NumTriggered && !NextMode && !MsgCommand) {
- *** ../p5rel/hbcal.c Thu Apr 22 10:24:38 1993
- --- ./hbcal.c Mon May 3 11:34:29 1993
- ***************
- *** 237,243 ****
- ylen = DaysInHebYear(y);
- monlen = DaysInHebMonths(ylen);
- m = 0;
- ! while((jul > monlen[m]) || !monlen[m]) {
- jul -= monlen[m];
- m++;
- }
- --- 237,243 ----
- ylen = DaysInHebYear(y);
- monlen = DaysInHebMonths(ylen);
- m = 0;
- ! while((jul >= monlen[m]) || !monlen[m]) {
- jul -= monlen[m];
- m++;
- }
- ***************
- *** 424,431 ****
- int julstart, hm, hd, jahr, *ans;
- #endif
- {
- ! int r, yout, mout, dout, jul;
-
- JulToHeb(julstart, &yout, &mout, &dout);
-
- r = 1;
- --- 424,435 ----
- int julstart, hm, hd, jahr, *ans;
- #endif
- {
- ! int r, yout, mout, dout, jul=1;
-
- + /* I initialize jul above to stop gcc from complaining about
- + possible use of uninitialized variable. You can take it
- + out if the small inefficiency really bothers you. */
- +
- JulToHeb(julstart, &yout, &mout, &dout);
-
- r = 1;
- ***************
- *** 437,442 ****
- --- 441,447 ----
- continue;
- }
- jul = HebToJul(yout, mout, dout);
- + if (jul < 0) return E_DATE_OVER;
- if (jul >= julstart) break;
- else {
- yout++;
- *** ../p5rel/init.c Thu Apr 22 10:24:09 1993
- --- ./init.c Thu Apr 29 15:08:41 1993
- ***************
- *** 63,68 ****
- --- 63,69 ----
- * -xn = Max. number of iterations for SATISFY
- * -uname = Run as user 'name' - only valid when run by root.
- * -kcmd = Run 'cmd' for MSG-type reminders instead of printing to stdout
- + * -iVAR=EXPR = Initialize and preserve VAR.
- *
- **************************************************************/
-
- ***************
- *** 79,84 ****
- --- 80,87 ----
- PRIVATE void ChgUser ARGS((char *uname));
- #endif
-
- + PRIVATE void InitializeVar ARGS ((char *str));
- +
- static char *BadDate = "Illegal date on command line\n";
-
- /***************************************************************/
- ***************
- *** 123,128 ****
- --- 126,137 ----
-
- while (*arg) {
- switch(*arg++) {
- + case 'i':
- + case 'I':
- + InitializeVar(arg);
- + while(*arg) arg++;
- + break;
- +
- case 'n':
- case 'N':
- NextMode = 1;
- ***************
- *** 393,398 ****
- --- 402,408 ----
- fprintf(ErrFp, " -x[n] Iteration limit for SATISFY clause (def=150)\n");
- fprintf(ErrFp, " -kcmd Run 'cmd' for MSG-type reminders\n");
- fprintf(ErrFp, " -g[d[d]] Sort reminders by date and time before issuing\n");
- + fprintf(ErrFp, "-ivar=val Initialize var to val and preserve var\n");
- exit(1);
- }
-
- ***************
- *** 456,462 ****
- sprintf(home, "HOME=%s", pwent->pw_dir);
- putenv(home);
-
- ! shell = malloc(strlen(pwent->pw_dir) + 7);
- if (!shell) {
- fprintf(ErrFp, NoEnvMem);
- exit(1);
- --- 466,472 ----
- sprintf(home, "HOME=%s", pwent->pw_dir);
- putenv(home);
-
- ! shell = malloc(strlen(pwent->pw_shell) + 7);
- if (!shell) {
- fprintf(ErrFp, NoEnvMem);
- exit(1);
- ***************
- *** 483,485 ****
- --- 493,550 ----
- }
- #endif /* UNIX && WANT_U_OPTION */
-
- + /***************************************************************/
- + /* */
- + /* InitializeVar */
- + /* */
- + /* Initialize and preserve a variable */
- + /* */
- + /***************************************************************/
- + #ifdef HAVE_PROTOS
- + PRIVATE void InitializeVar(char *str)
- + #else
- + static void InitializeVar(str)
- + char *str;
- + #endif
- + {
- + char *varname, *expr;
- + static char Err[] = "Remind: -i option: %s\n";
- +
- + Value val;
- +
- + int r;
- +
- + /* Scan for an '=' sign */
- + varname = str;
- + while (*str && *str != '=') str++;
- + if (!*str) {
- + fprintf(ErrFp, Err, "Missing '=' sign");
- + return;
- + }
- + *str = 0;
- + if (!*varname) {
- + fprintf(ErrFp, Err, "Missing varname");
- + return;
- + }
- + expr = str+1;
- + if (!*expr) {
- + fprintf(ErrFp, Err, "Missing expr");
- + return;
- + }
- +
- + r=EvalExpr(&expr, &val);
- + if (r) {
- + fprintf(ErrFp, Err, ErrMsg[r]);
- + return;
- + }
- +
- + r=SetVar(varname, &val);
- + if (r) {
- + fprintf(ErrFp, Err, ErrMsg[r]);
- + return;
- + }
- + r=PreserveVar(varname);
- + if (r) fprintf(ErrFp, Err, ErrMsg[r]);
- + return;
- + }
- +
- *** ../p5rel/makefile.os2 Thu Apr 22 10:24:11 1993
- --- ./makefile.os2 Fri Apr 23 13:00:11 1993
- ***************
- *** 25,31 ****
- # 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'.
- #-----------------------------------------------------------------------------
- ! VERSION= 03.00.05
-
- HDRS= config.h err.h expr.h globals.h protos.h types.h version.h \
- lang.h english.h german.h dutch.h finish.h
- --- 25,31 ----
- # 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'.
- #-----------------------------------------------------------------------------
- ! VERSION= 03.00.06
-
- HDRS= config.h err.h expr.h globals.h protos.h types.h version.h \
- lang.h english.h german.h dutch.h finish.h
- *** ../p5rel/makefile.tc Thu Apr 22 10:24:11 1993
- --- ./makefile.tc Fri Apr 23 13:00:07 1993
- ***************
- *** 1,6 ****
- # Makefile for REMIND for Turbo C for MSDOS
-
- ! VERSION= 03.00.05
-
- 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
- --- 1,6 ----
- # Makefile for REMIND for Turbo C for MSDOS
-
- ! VERSION= 03.00.06
-
- 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
- *** ../p5rel/queue.c Thu Apr 22 10:24:12 1993
- --- ./queue.c Thu Apr 29 16:29:18 1993
- ***************
- *** 270,282 ****
- printf("Contents of AT queue:%s", NL);
-
- while (q) {
- ! printf("Trigger: %02d%c%02d Activate: %02d%c%02d Rep: %d Delta: %d%s",
- ! q->tt.ttime / 60, TIMESEP, q->tt.ttime % 60,
- ! q->tt.nexttime / 60, TIMESEP, q->tt.nexttime % 60,
- ! q->tt.rep, q->tt.delta, NL);
- ! printf("Text: %s %s%s%s", ((q->typ == MSG_TYPE) ? "MSG" : "RUN"),
- ! q->text,
- ! NL, NL);
- q = q->next;
- }
- printf(NL);
- --- 270,284 ----
- printf("Contents of AT queue:%s", NL);
-
- while (q) {
- ! if (q->tt.nexttime != NO_TIME) {
- ! printf("Trigger: %02d%c%02d Activate: %02d%c%02d Rep: %d Delta: %d%s",
- ! q->tt.ttime / 60, TIMESEP, q->tt.ttime % 60,
- ! q->tt.nexttime / 60, TIMESEP, q->tt.nexttime % 60,
- ! q->tt.rep, q->tt.delta, NL);
- ! printf("Text: %s %s%s%s", ((q->typ == MSG_TYPE) ? "MSG" : "RUN"),
- ! q->text,
- ! NL, NL);
- ! }
- q = q->next;
- }
- printf(NL);
- *** ../p5rel/rem2ps.1 Thu Apr 22 10:24:28 1993
- --- ./rem2ps.1 Mon May 3 15:27:50 1993
- ***************
- *** 10,15 ****
- --- 10,21 ----
- draws a calendar) to the standard output.
- .SH OPTIONS
- .TP
- + .B \-p file
- + Include the contents of \fIfile\fR in the PostScript prologue. This
- + allows you to define procedures, variables etc. which can be used
- + by the \fBPS\fR and \fBPSFILE\fR reminders. You should not
- + include any document structuring comments in your prologue.
- + .TP
- .B \-l
- Produce the calendar in landscape mode rather than the default
- portrait mode.
- ***************
- *** 147,152 ****
- --- 153,269 ----
- entries from the reminder file "~/.reminders." The calendar is produced
- in landscape mode, with a font size of 18 for the day numbers. The result
- is put in the PostScript file "cal.ps."
- + .PP
- + .SH VARIABLES AVAILABLE TO USER-SUPPLIED POSTSCRIPT CODE
- + .PP
- + The following variables are available to \fBPS\fR and
- + \fBPSFILE\fR-type reminders. (This material is duplicated
- + in the \fBRemind\fR manual page.)
- + .TP
- + LineWidth
- + The width of the black grid lines making up the calendar.
- + .TP
- + Border
- + The border between the center of the grid lines and the space used to print
- + calendar entries. This border is normally blank space.
- + .TP
- + BoxWidth and BoxHeight
- + The width and height of the calendar box, from center-to-center of the
- + black gridlines.
- + .TP
- + InBoxHeight
- + The height from the center of the bottom black gridline to the top
- + of the regular calendar entry area. The space from here to the top
- + of the box is used only to draw the day number.
- + .TP
- + /DayFont, /EntryFont, /SmallFont and /HeadFont
- + The fonts used to draw the day numbers, the calendar entries, the small
- + calendars, and the month and day headings, respectively.
- + .TP
- + DaySize, EntrySize and HeadSize
- + The sizes of the above fonts. (The size of the small calendar font
- + is \fInot\fR defined here.) For example, if you wanted to print
- + the Hebrew date next to the regular day number in the calendar, use:
- + .PP
- + .nf
- + REM PS Border BoxHeight Border sub DaySize sub moveto \\
- + /DayFont findfont DaySize scalefont setfont \\
- + ([hebday(today())] [hebmon(today())]) show
- + .fi
- + .PP
- + .RS
- + Note how /DayFont and DaySize are used.
- + .RE
- + .PP
- + Note that if you supply PostScript code, it is possible to produce invalid
- + PostScript files. Always test your PostScript thoroughly with a PostScript
- + viewer before sending it to the printer. You should not use any document
- + structuring comments in your PostScript code.
- + .PP
- + In addition, prior to drawing a calendar page, \fBRem2ps\fR emits
- + the following PostScript code:
- + .PP
- + .nf
- + save (mon) (yr) PreCal restore
- + .fi
- + .PP
- + where \fImon\fR and \fIyr\fR are the month and year of the calendar
- + page. The default \fBPreCal\fR procedure simply pops
- + the arguments and does nothing. However, you can define a \fBPreCal\fR
- + function in your prologue file to do whatever you want - it can draw a
- + background for the entire calendar, for instance.
- + .PP
- + In the context of the \fBPreCal\fR procedure, the following conditions
- + hold:
- + .TP
- + o
- + The PostScript origin is at the bottom left-hand corner of the page, and
- + PostScript units of 1/72" are in effect.
- + .TP
- + o
- + The variables MinX, MinY, MaxX and MaxY define the bounding box within
- + which the calendar will be drawn.
- + .TP
- + o
- + The font and font-size variables, as well as Border and LineWidth described
- + previously, are valid.
- + .PP
- + For an example, create a file called "myprolog" whose contents are:
- + .PP
- + .nf
- + /PreCal {
- + /yr exch def
- + /mon exch def
- + /xsiz1 MaxX MinX sub def
- + /ysiz1 MaxY MinY sub def
- + /xsiz xsiz1 MinX sub MinX sub def
- + /ysiz ysiz1 MinY sub MinY sub def
- + xsiz
- + ysiz
- + lt
- + {/len xsiz 1.41 mul def
- + MinX MinX add ysiz1 xsiz1 sub 2 div MinY add MinY add moveto}
- + {/len ysiz 1.41 mul def
- + xsiz1 ysiz1 sub 2 div MinX add MinX add MinY MinY add moveto}
- + ifelse
- + /Helvetica-Bold findfont 1 scalefont setfont
- + mon stringwidth pop
- + ( ) stringwidth pop add
- + yr stringwidth pop add
- + len exch div /len exch def
- + /Helvetica-Bold findfont len scalefont setfont
- + 0.95 setgray
- + 45 rotate
- + mon show
- + ( ) show
- + yr show
- + } bind def
- + .fi
- + .PP
- + Use that file with the \fBRem2ps\fR \fB\-p\fR option to create calendars
- + with the year and month in large grey letters in the background of the
- + calendar.
- + .PP
- .SH AUTHOR
- David F. Skoll
- .SH BUGS
- *** ../p5rel/rem2ps.c Thu Apr 22 10:24:26 1993
- --- ./rem2ps.c Mon May 3 10:37:57 1993
- ***************
- *** 68,74 ****
-
- #define NUMPAGES (sizeof(Pages)/sizeof(Pages[0]))
-
- ! CalEntry *CurEntries;
- PageType *CurPage;
- char PortraitMode;
- char NoSmallCal;
- --- 68,75 ----
-
- #define NUMPAGES (sizeof(Pages)/sizeof(Pages[0]))
-
- ! CalEntry *CurEntries = NULL;
- ! CalEntry *PsEntries[32];
- PageType *CurPage;
- char PortraitMode;
- char NoSmallCal;
- ***************
- *** 87,92 ****
- --- 88,95 ----
- char *EntrySize="8";
- char *BorderSize = "6";
-
- + char *UserProlog = NULL;
- +
- int validfile = 0;
-
- int CurDay;
- ***************
- *** 99,104 ****
- --- 102,108 ----
- void Init ARGS ((int argc, char *argv[]));
- void Usage ARGS ((char *s));
- void DoPsCal ARGS ((void));
- + int DoQueuedPs ARGS ((void));
- void DoSmallCal ARGS((char *m, int days, int first, int col));
- void WriteProlog ARGS ((void));
- void WriteCalEntry ARGS ((void));
- ***************
- *** 160,165 ****
- --- 164,170 ----
- int sfirst;
- int i;
- int smallcol;
- + int is_ps;
- CalEntry *c, *d;
-
- printf("%%%%Page: %d %d\n", validfile, validfile);
- ***************
- *** 175,180 ****
- --- 180,186 ----
-
- /* Emit PostScript to do the heading */
- if (!PortraitMode) printf("XSIZE 0 translate 90 rotate\n");
- + printf("/SAVESTATE save def (%s) (%s) PreCal SAVESTATE restore\n", month, year);
- printf("(%s %s) doheading\n", month, year);
-
- /* Calculate the minimum box size */
- ***************
- *** 215,234 ****
- fprintf(stderr, "malloc failed - aborting.\n");
- exit(1);
- }
- c->next = NULL;
- ! c->entry = malloc(strlen(LineBuffer+10) + 1);
- if (!c->entry) {
- fprintf(stderr, "malloc failed - aborting.\n");
- exit(1);
- }
- ! strcpy(c->entry, LineBuffer+10);
-
- /* Put on linked list */
- ! if (!CurEntries) CurEntries = c;
- ! else {
- ! d = CurEntries;
- ! while(d->next) d = d->next;
- ! d->next = c;
- }
- }
- for(; CurDay<=days; CurDay++) {
- --- 221,248 ----
- fprintf(stderr, "malloc failed - aborting.\n");
- exit(1);
- }
- + is_ps = (*LineBuffer == 'F' || *LineBuffer == 'P');
- c->next = NULL;
- ! c->entry = malloc(strlen(LineBuffer+10) + 1 + is_ps);
- if (!c->entry) {
- fprintf(stderr, "malloc failed - aborting.\n");
- exit(1);
- }
- ! strcpy(c->entry+is_ps, LineBuffer+10);
-
- + if (is_ps) {
- + /* Save the 'P' or 'F' flag */
- + *(c->entry) = *LineBuffer;
- + c->next = PsEntries[DayNum];
- + PsEntries[DayNum] = c;
- + } else {
- /* Put on linked list */
- ! if (!CurEntries) CurEntries = c;
- ! else {
- ! d = CurEntries;
- ! while(d->next) d = d->next;
- ! d->next = c;
- ! }
- }
- }
- for(; CurDay<=days; CurDay++) {
- ***************
- *** 281,286 ****
- --- 295,303 ----
- int x = CurPage->xsize;
- int y = CurPage->ysize;
- char *isostuff;
- + FILE *fp;
- + int nread;
- + char buffer[LINELEN];
-
- if (!PortraitMode) {
- i = x; x = y; y = i;
- ***************
- *** 325,330 ****
- --- 342,348 ----
- printf("/MaxX %d def\n", x-RightMarg);
- printf("/MaxY %d def\n", y-TopMarg);
- printf("/Border %s def\n", BorderSize);
- + printf("/LineWidth %s def\n", LineWidth);
- printf("%s setlinewidth\n", LineWidth);
-
- /* Check if smallfont is fixed pitch */
- ***************
- *** 335,343 ****
- printf("{/SmallString (WW ) def}\n");
- printf("{/SmallString (WW) def}\nifelse\n");
- }
- printf("%%%%EndProlog\n");
- - /* Set the minimum box size */
-
- }
-
- /***************************************************************/
- --- 353,377 ----
- printf("{/SmallString (WW ) def}\n");
- printf("{/SmallString (WW) def}\nifelse\n");
- }
- +
- + /* Do the user-supplied prolog file, if any */
- + if (UserProlog) {
- + fp = fopen(UserProlog, "r");
- + if (!fp) {
- + fprintf(stderr, "Could not open prologue file '%s'\n", UserProlog);
- + } else {
- + while(1) {
- + nread = fread(buffer, sizeof(char), LINELEN, fp);
- + if (!nread) break;
- + fwrite(buffer, sizeof(char), nread, stdout);
- + }
- + fclose(fp);
- + }
- + }
- +
- printf("%%%%EndProlog\n");
-
- +
- }
-
- /***************************************************************/
- ***************
- *** 353,360 ****
- --- 387,396 ----
- {
- CalEntry *c = CurEntries;
- CalEntry *d;
- + int begin, end, i, HadQPS;
-
- /* Move to appropriate location */
- + printf("/CAL%d {\n", CurDay);
- printf("Border ytop %d xincr mul MinX add xincr\n", WkDayNum);
-
- /* Set up the text array */
- ***************
- *** 378,386 ****
-
- /* Update ymin */
- printf("/y exch def y ymin lt {/ymin y def} if\n");
-
- ! /* If WkDayNum is a Sunday, move to next row. */
- if (WkDayNum == 6 || CurDay == MaxDay) {
- printf("/y ytop MinBoxSize sub def y ymin lt {/ymin y def} if\n");
-
- /* Draw the line at the bottom of the row */
- --- 414,440 ----
-
- /* Update ymin */
- printf("/y exch def y ymin lt {/ymin y def} if\n");
- + printf("} def\n");
-
- ! /* If WkDayNum is a Sunday, move to next row. Also handle the queued
- ! PS and PSFILE reminders */
- if (WkDayNum == 6 || CurDay == MaxDay) {
- + HadQPS = 0;
- + begin = CurDay - WkDayNum;
- + if (begin < 1) begin = 1;
- + end = CurDay;
- + for (i=begin; i<=end; i++) {
- + if (PsEntries[i]) {
- + HadQPS = 1;
- + break;
- + }
- + }
- + /* Avoid problems with blotching if PS printer has roundoff errors */
- + if (HadQPS) printf("1 setgray\n");
- + for (i=begin; i<=end; i++) {
- + printf("CAL%d\n", i);
- + }
- + if (HadQPS) printf("0 setgray\n");
- printf("/y ytop MinBoxSize sub def y ymin lt {/ymin y def} if\n");
-
- /* Draw the line at the bottom of the row */
- ***************
- *** 389,394 ****
- --- 443,462 ----
- /* Update ytop */
- printf("/ylast ytop def\n");
- printf("/ytop ymin def\n");
- +
- + (void) DoQueuedPs();
- +
- + /* Re-do the calendar stuff if there was any included PS code */
- + if (HadQPS) {
- + printf("/ytop ylast def\n");
- + for (i=begin; i<=end; i++) {
- + printf("CAL%d\n", i);
- + }
- + printf("/y ytop MinBoxSize sub def y ymin lt {/ymin y def} if\n");
- + printf("MinX ymin MaxX ymin L\n");
- + printf("/ylast ytop def\n");
- + printf("/ytop ymin def\n");
- + }
- }
- }
-
- ***************
- *** 454,459 ****
- --- 522,529 ----
- BotMarg = 36;
- UseISO = 0;
-
- + for(j=0; j<32; j++) PsEntries[i] = NULL;
- +
- CurPage = DefaultPage; /* Letter size by default */
-
- while (i < argc) {
- ***************
- *** 463,468 ****
- --- 533,543 ----
- if (*s++ != '-') Usage("Options must begin with '-'");
-
- switch(*s++) {
- + case 'p':
- + if (i == argc) Usage("Prologue filename must be supplied");
- + UserProlog = argv[i++];
- + break;
- +
- case 's':
- if (i == argc) Usage("Size must be supplied");
- t = argv[i++];
- ***************
- *** 564,580 ****
- fprintf(stderr, "Rem2PS: Produce a PostScript calendar from output of Remind.\n\n");
- fprintf(stderr, "Usage: rem2ps [options]\n\n");
- fprintf(stderr, "Options:\n\n");
- ! fprintf(stderr, "-l Do calendar in landscape mode.\n");
- fprintf(stderr, "-c Do NOT generate small calendars for previous\n");
- ! fprintf(stderr, " and next month.\n");
- fprintf(stderr, "-i Use ISO 8859-1 encoding in PostScript output\n");
- fprintf(stderr, "-m media Set page size (eg, Letter, Legal, A4.) Case sensitive!\n");
- fprintf(stderr, " (Default page size is %s)\n", DefaultPage[0].name);
- ! fprintf(stderr, "-f[shed] font Set font for small cal, hdr, cal entries and/or day numbers.\n");
- ! fprintf(stderr, "-s[hed] size Set size for header, calendar entries and/or day numbers.\n");
- ! fprintf(stderr, "-b size Set border size for calendar entries.\n");
- ! fprintf(stderr, "-t size Set line thickness.\n");
- ! fprintf(stderr, "-o[lrtb] marg Specify left, right, top and bottom margins.\n");
- exit(1);
- }
-
- --- 639,656 ----
- fprintf(stderr, "Rem2PS: Produce a PostScript calendar from output of Remind.\n\n");
- fprintf(stderr, "Usage: rem2ps [options]\n\n");
- fprintf(stderr, "Options:\n\n");
- ! fprintf(stderr, "-p file Include user-supplied PostScript code in prologue\n");
- ! fprintf(stderr, "-l Do calendar in landscape mode\n");
- fprintf(stderr, "-c Do NOT generate small calendars for previous\n");
- ! fprintf(stderr, " and next month\n");
- fprintf(stderr, "-i Use ISO 8859-1 encoding in PostScript output\n");
- fprintf(stderr, "-m media Set page size (eg, Letter, Legal, A4.) Case sensitive!\n");
- fprintf(stderr, " (Default page size is %s)\n", DefaultPage[0].name);
- ! fprintf(stderr, "-f[shed] font Set font for small cal, hdr, cal entries and/or day numbers\n");
- ! fprintf(stderr, "-s[hed] size Set size for header, calendar entries and/or day numbers\n");
- ! fprintf(stderr, "-b size Set border size for calendar entries\n");
- ! fprintf(stderr, "-t size Set line thickness\n");
- ! fprintf(stderr, "-o[lrtb] marg Specify left, right, top and bottom margins\n");
- exit(1);
- }
-
- ***************
- *** 632,634 ****
- --- 708,782 ----
- printf("grestore\n");
- }
-
- + /***************************************************************/
- + /* */
- + /* DoQueuedPs - do the queued PS and PSFILE reminders. */
- + /* */
- + /***************************************************************/
- + #ifdef HAVE_PROTOS
- + PUBLIC int DoQueuedPs(void)
- + #else
- + int DoQueuedPs()
- + #endif
- + {
- + int i;
- + int HadPS = 0;
- + int wd;
- + int begin, end;
- + int nread;
- + CalEntry *e, *n;
- + FILE *fp;
- + int fnoff;
- + char buffer[LINELEN];
- +
- + begin = CurDay - WkDayNum;
- + wd = 0;
- + while (begin < 1) begin++, wd++;
- + end = CurDay;
- + for (i=begin; i<=end; i++, wd++) {
- + e = PsEntries[i];
- +
- + if (e) {
- + HadPS = 1;
- + printf("/SAVESTATE save def\n");
- +
- + /* Translate coordinates to bottom of calendar box */
- + printf("%d xincr mul MinX add ytop translate\n", wd);
- +
- + /* Set up convenient variables */
- + printf("/BoxWidth xincr def\n/BoxHeight ylast ytop sub def\n");
- + printf("/InBoxHeight BoxHeight border sub DaySize sub DaySize sub 2 add EntrySize add def \n");
- + }
- +
- + while (e) {
- +
- + /* Now do the user's PostScript code */
- + fnoff = 1;
- + while (isspace(*(e->entry+fnoff))) fnoff++;
- + if (*(e->entry) == 'P') {
- + printf("%s\n", e->entry+fnoff);
- + } else {
- + fp = fopen(e->entry+fnoff, "r");
- + if (!fp) {
- + fprintf(stderr, "Could not open PostScript file '%s'\n", e->entry+1);
- + } else {
- + while(1) {
- + nread = fread(buffer, sizeof(char), LINELEN, fp);
- + if (!nread) break;
- + fwrite(buffer, sizeof(char), nread, stdout);
- + }
- + fclose(fp);
- + }
- + }
- +
- + /* Free the entry */
- + free(e->entry);
- + n = e->next;
- + free(e);
- + e = n;
- + }
- + if (PsEntries[i]) printf("\n SAVESTATE restore\n");
- + PsEntries[i] = NULL;
- + }
- + return HadPS;
- + }
- *** ../p5rel/rem2ps.h Thu Apr 22 10:24:26 1993
- --- ./rem2ps.h Mon May 3 10:36:51 1993
- ***************
- *** 11,16 ****
- --- 11,18 ----
-
- char *PSProlog1[] =
- {
- + "% This file was produced by Remind and Rem2PS, written by",
- + "% David F. Skoll.",
- "/ISOLatin1Encoding where { pop save true }{ false } ifelse",
- " /ISOLatin1Encoding [ StandardEncoding 0 45 getinterval aload pop /minus",
- " StandardEncoding 46 98 getinterval aload pop /dotlessi /grave /acute",
- ***************
- *** 200,204 ****
- --- 202,208 ----
- " forall",
- "} bind def",
- "2 setlinecap",
- + "% Define a default PreCal procedure",
- + "/PreCal { pop pop } bind def",
- NULL
- };
- *** ../p5rel/remind-all.csh Thu Apr 22 10:24:14 1993
- --- ./remind-all.csh Tue Apr 27 11:00:15 1993
- ***************
- *** 31,40 ****
- # 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 ~$i/.reminders < /dev/null > $REMFILE
- if (! -z $REMFILE) then
- # echo "Sending mail to $i" DEBUGGING PURPOSES ONLY
-
- --- 31,39 ----
- # 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
-
- *** ../p5rel/remind-all.sh Thu Apr 22 10:24:14 1993
- --- ./remind-all.sh Tue Apr 27 10:59:25 1993
- ***************
- *** 36,42 ****
-
- # echo "$i has a .reminders file." DEBUGGING PURPOSES ONLY
-
- ! $REMIND -u$i -h -r -q $HOME/.reminders < /dev/null > $REMFILE
- if [ -s $REMFILE ]; then
- # echo "Sending mail to $i" DEBUGGING PURPOSES ONLY
- $MAIL -s "Reminders" $i < $REMFILE
- --- 36,42 ----
-
- # 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
- *** ../p5rel/remind.1 Thu Apr 22 10:24:17 1993
- --- ./remind.1 Mon May 3 15:28:18 1993
- ***************
- *** 175,180 ****
- --- 175,185 ----
- and user name, respectively, of the specified user. LOGNAME is also
- set to the specified user name. This option is meant for
- use in shell scripts which mail reminders to all users.
- + .TP
- + \fB\-i\fR\fIvar\fR\fB=\fR\fIexpr\fR
- + Sets the value of the specified \fIvar\fR to \fIexpr\fR, and \fBpreserves\fR
- + \fIvar\fR. \fIExpr\fR can be any valid \fBRemind\fR expression. See the
- + section "Initializing Variables on the Command Line" for more details.
- .PP
- If you supply a \fIdate\fR on the command line, it must consist of
- \fIday month year\fR, where \fIday\fR is the day of the month,
- ***************
- *** 233,245 ****
- [\fBAT\fR \fItime\fR [\fItdelta\fR] [\fItrepeat\fR]]
- [\fBUNTIL\fR \fIexpiry_date\fR]
- [\fBSCANFROM\fR \fIscan_date\fR]
- ! \fBMSG\fR | \fBRUN\fR | \fBCAL\fR | \fBSATISFY\fR
- .I body
- .RE
- .PP
- The parts of the \fBREM\fR command can be specified in any order, except
- that the \fIbody\fR must come immediately after the \fBMSG\fR,
- ! \fBRUN\fR, \fBCAL\fR or \fBSATISFY\fR keyword.
- .PP
- The \fBREM\fR token is optional, providing that the remainder
- of the command cannot be mistaken for another \fBRemind\fR command
- --- 238,250 ----
- [\fBAT\fR \fItime\fR [\fItdelta\fR] [\fItrepeat\fR]]
- [\fBUNTIL\fR \fIexpiry_date\fR]
- [\fBSCANFROM\fR \fIscan_date\fR]
- ! \fBMSG\fR | \fBRUN\fR | \fBCAL\fR | \fBSATISFY\fR | \fBPS\fR | \fBPSFILE\fR
- .I body
- .RE
- .PP
- The parts of the \fBREM\fR command can be specified in any order, except
- that the \fIbody\fR must come immediately after the \fBMSG\fR,
- ! \fBRUN\fR, \fBCAL\fR, \fBPS\fR, \fBPSFILE\fR or \fBSATISFY\fR keyword.
- .PP
- The \fBREM\fR token is optional, providing that the remainder
- of the command cannot be mistaken for another \fBRemind\fR command
- ***************
- *** 247,255 ****
- before the \fBMSG\fR, \fBRUN\fR, \fBCAL\fR or \fBSATISFY\fR clause
- is called a \fItrigger\fR.
- .PP
- ! .B MSG, RUN, and CAL
- .PP
- ! The keywords \fBMSG\fR, \fBRUN\fR and \fBCAL\fR denote the \fItype\fR
- of the reminder. (\fBSATISFY\fR is more complicated and will be explained
- later.) A \fBMSG\fR-type reminder normally prints a message to the standard
- output, after passing the \fIbody\fR through a special substitution filter,
- --- 252,260 ----
- before the \fBMSG\fR, \fBRUN\fR, \fBCAL\fR or \fBSATISFY\fR clause
- is called a \fItrigger\fR.
- .PP
- ! .B MSG, RUN, CAL, PS and PSFILE
- .PP
- ! These keywords denote the \fItype\fR
- of the reminder. (\fBSATISFY\fR is more complicated and will be explained
- later.) A \fBMSG\fR-type reminder normally prints a message to the standard
- output, after passing the \fIbody\fR through a special substitution filter,
- ***************
- *** 264,269 ****
- --- 269,283 ----
- is used only to place entries in the calendar produced when \fBRemind\fR
- is run with the \fB\-c\fR, \fB\-s\fR or \fB\-p\fR options.
- .PP
- + A \fBPS\fR or \fBPSFILE\fR-type reminder is used to pass PostScript code
- + directly to the printer when producing PostScript calendars. This can
- + be used to shade certain calendar entries, include graphics in the calendar,
- + or almost any other purpose you can think of. You
- + should not use these types of reminders unless you are an expert PostScript
- + programmer. The \fBPS\fR and \fBPSFILE\fR reminders are ignored unless
- + \fBRemind\fR is run with the \fB\-p\fR option. See the section
- + "More about PostScript" for more details.
- + .PP
- .B DATE SPECIFICATIONS
- .PP
- A \fIdate_spec\fR consists of zero to four parts.
- ***************
- *** 2267,2272 ****
- --- 2281,2389 ----
- places the time of timed reminders in the calendar according to the
- \fB\-b\fR command-line option.
- .PP
- + .SH INITIALIZING VARIABLES ON THE COMMAND LINE
- + .PP
- + The \fB\-i\fR option is used to initialize variables on the \fBRemind\fR
- + command line. The format is \fB\-i\fR\fIvar\fR\fB=\fR\fIexpr\fR, where
- + \fIexpr\fR is any valid expression. Note that you may have to use quotes
- + or escapes to prevent the shell from interpreting special characters in
- + \fIexpr\fR. You can have as many \fB\-i\fR options as you want on the
- + command line, and they are processed in order. Thus, if a variable is defined
- + in one \fB\-i\fR option, it can be referred to by subsequent \fB\-i\fR
- + options.
- + .PP
- + Note that if you supply a date on the command line, it is not parsed until
- + all options have been processed. Thus, if you use \fBtoday()\fR in any
- + of the \fB\-i\fR expressions, it will return the same value as
- + \fBrealtoday()\fR and not the date supplied on the command line.
- + .PP
- + Any variables defined on the command line are \fBpreserved\fR as with the
- + \fBPRESERVE\fR command.
- + .PP
- + You should not have any spaces between the \fB\-i\fR option and the equal
- + sign; otherwise, strange variable names are created which can only be accessed
- + with the \fBvalue()\fR or \fBdefined()\fR functions.
- + .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
- + .PP
- + The \fBPS\fR and \fBPSFILE\fR reminders pass PostScript code directly
- + to the printer. They differ in that the \fBPS\fR-type reminder passes
- + its body directly to the PostScript output (after processing by the
- + substitution filter) while the \fBPSFILE\fR-type's body should
- + simply consist of a filename. The \fBRem2ps\fR program will open the
- + file named in the \fBPSFILE\fR-type reminder, and include its contents in
- + the PostScript output.
- + .PP
- + The PostScript-type reminders for a particular day are included in the
- + PostScript output in the same order they were triggered in the \fBRemind\fR
- + script file. All of the PostScript code for a particular date is enclosed
- + in a \fBsave\fR-\fBrestore\fR pair. However, if several PostScript-type
- + reminders are triggered for a single day, each section of PostScript is
- + not enclosed in a \fBsave\fR-\fBrestore\fR pair - instead, the entire
- + body of included PostScript is enclosed.
- + .PP
- + PostScript-type reminders are executed by the PostScript printer before any
- + regular calendar entries. Thus, regular calendar entries will overlay
- + the PostScript-type reminders, allowing you to create shaded or graphical
- + backgrounds for particular days.
- + .PP
- + Before executing your PostScript code, the origin of the PostScript coordinate
- + system is positioned to the bottom left-hand corner of the "box" in the
- + calendar representing \fBtoday()\fR. This location is exactly in the middle
- + of the intersection of the bottom and left black lines delineating the box -
- + you may have to account for the thickness of these lines when calculating
- + positions.
- + .PP
- + Several PostScript variables are available to the PostScript code you supply.
- + All distance and size variables are in PostScript units (1/72 inch.) The
- + variables are:
- + .TP
- + LineWidth
- + The width of the black grid lines making up the calendar.
- + .TP
- + Border
- + The border between the center of the grid lines and the space used to print
- + calendar entries. This border is normally blank space.
- + .TP
- + BoxWidth and BoxHeight
- + The width and height of the calendar box, from center-to-center of the
- + black gridlines.
- + .TP
- + InBoxHeight
- + The height from the center of the bottom black gridline to the top
- + of the regular calendar entry area. The space from here to the top
- + of the box is used only to draw the day number.
- + .TP
- + /DayFont, /EntryFont, /SmallFont and /HeadFont
- + The fonts used to draw the day numbers, the calendar entries, the small
- + calendars, and the month and day headings, respectively.
- + .TP
- + DaySize, EntrySize and HeadSize
- + The sizes of the above fonts. (The size of the small calendar font
- + is \fInot\fR defined here.) For example, if you wanted to print
- + the Hebrew date next to the regular day number in the calendar, use:
- + .PP
- + .nf
- + REM PS Border BoxHeight Border sub DaySize sub moveto \\
- + /DayFont findfont DaySize scalefont setfont \\
- + ([hebday(today())] [hebmon(today())]) show
- + .fi
- + .PP
- + .RS
- + Note how /DayFont and DaySize are used.
- + .RE
- + .PP
- + Note that if you supply PostScript code, it is possible to produce invalid
- + PostScript files. Always test your PostScript thoroughly with a PostScript
- + viewer before sending it to the printer. You should not use any document
- + structuring comments in your PostScript code.
- + .PP
- .SH DAEMON MODE
- .PP
- If you use the \fB\-z\fR command-line option, \fBRemind\fR runs in the
- ***************
- *** 2732,2736 ****
- substitution buffer length, number of global \fBOMIT\fRs, etc.
- .PP
- .SH SEE ALSO
- ! .pp
- rem, elm, kall, rem2ps
- --- 2849,2853 ----
- substitution buffer length, number of global \fBOMIT\fRs, etc.
- .PP
- .SH SEE ALSO
- ! .PP
- rem, elm, kall, rem2ps
- *** ../p5rel/test.cmp Thu Apr 22 10:24:19 1993
- --- ./test.cmp Fri Apr 23 12:59:58 1993
- ***************
- *** 631,637 ****
- "a05" + "6" => "a056"
- value("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH"
- set a058 version()
- ! version() => "03.00.05"
- set a059 wkday(today())
- today() => 1991/02/16
- wkday(1991/02/16) => "Saturday"
- --- 631,637 ----
- "a05" + "6" => "a056"
- value("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH"
- set a058 version()
- ! version() => "03.00.06"
- set a059 wkday(today())
- today() => 1991/02/16
- wkday(1991/02/16) => "Saturday"
- ***************
- *** 735,741 ****
- a048 "foo"
- a067 "INT"
- a039 "February"
- ! a058 "03.00.05"
- a049 21
- a068 "STRING"
- a059 "Saturday"
- --- 735,741 ----
- a048 "foo"
- a067 "INT"
- a039 "February"
- ! a058 "03.00.06"
- a049 21
- a068 "STRING"
- a059 "Saturday"
- *** ../p5rel/token.c Thu Apr 22 10:59:12 1993
- --- ./token.c Fri Apr 30 13:14:20 1993
- ***************
- *** 75,80 ****
- --- 75,82 ----
- { "once", 3, T_Once, 0 },
- { "pop-omit-context", 3, T_Pop, 0 },
- { "preserve", 8, T_Preserve, 0 },
- + { "ps", 2, T_RemType, PS_TYPE },
- + { "psfile", 6, T_RemType, PSF_TYPE },
- { "push-omit-context", 4, T_Push, 0 },
- { "rem", 3, T_Rem, 0 },
- { "run", 3, T_RemType, RUN_TYPE },
- *** ../p5rel/types.h Thu Apr 22 10:24:21 1993
- --- ./types.h Fri Apr 30 13:13:31 1993
- ***************
- *** 98,103 ****
- --- 98,105 ----
- #define RUN_TYPE 2
- #define CAL_TYPE 3
- #define SAT_TYPE 4
- + #define PS_TYPE 5
- + #define PSF_TYPE 6
-
- /* DEFINES for debugging flags */
- #define DB_PRTLINE 1
-