dfs@doe.carleton.ca (David F. Skoll) (11/23/90)
This is Patch 2 for Remind 2.2. It fixes a minor bug in the date calculation routine. In rare instances, a WEEKDAY-YEAR constraint allowed triggering on the first weekday of the next year. As always, up-to-date source for Remind can be obtained via ftp from alfred.ccs.carleton.ca (134.117.1.1) in /pub/remind-2.2.tar.Z -- David Skoll --------------------- CUT HERE ----------------------------- #!/bin/sh # This is Remind-2.2-patch.02, a shell archive (shar 3.32) # made 11/22/1990 16:55 UTC by dfs@data # Source directory /enterprise/navigation/dfs/work/.rem/remind-2.2 # # existing files will NOT be overwritten # # This shar contains: # length mode name # ------ ---------- ------------------------------------------ # 2051 -rw------- patch.02 # if touch 2>&1 | fgrep 'amc' > /dev/null then TOUCH=touch else TOUCH=true fi # ============= patch.02 ============== if test X"$1" != X"-c" -a -f 'patch.02'; then echo "File already exists: skipping 'patch.02'" else echo "x - extracting patch.02 (Text)" sed 's/^X//' << 'SHAR_EOF' > patch.02 && XPatch 02 - 22 November 1991 XFixes bug in nextdate.c which causes incorrect triggering for the Xcase when WEEKDAY and YEAR are constrained. X---------------------------------------------------------------------- X*** ../work-backup/init.c Thu Nov 22 11:29:49 1990 X--- init.c Thu Nov 22 11:32:42 1990 X*************** X*** 7,13 **** X #include "globals.h" X #include "protos.h" X X! #define PATCHLEVEL 1 X X static char DPMsg[] = "Debug and Purge options conflict - Purge chosen.\n"; X static char DPCMsg[] = "Calendar overrides Debug and Purge options.\n"; X--- 7,13 ---- X #include "globals.h" X #include "protos.h" X X! #define PATCHLEVEL 2 X X static char DPMsg[] = "Debug and Purge options conflict - Purge chosen.\n"; X static char DPCMsg[] = "Calendar overrides Debug and Purge options.\n"; X*** ../work-backup/nextdate.c Thu Nov 22 11:29:50 1990 X--- nextdate.c Thu Nov 22 11:31:26 1990 X*************** X*** 234,240 **** X jul = Julian(dd, mm, conyr); X while (!(wkday & (1 << (jul % 7)))) jul++; X FromJulian(jul, retday, retmon, retyr); X! return 0; X X case 13: /* Weekday, year and day specified */ X if (y > conyr+1 || (y > conyr && m>0)) return 1; X--- 234,240 ---- X jul = Julian(dd, mm, conyr); X while (!(wkday & (1 << (jul % 7)))) jul++; X FromJulian(jul, retday, retmon, retyr); X! if (*retyr == conyr) return 0; else return 1; X X case 13: /* Weekday, year and day specified */ X if (y > conyr+1 || (y > conyr && m>0)) return 1; X*************** X*** 289,295 **** X jul = Julian(1, conmon, conyr); X while (!(wkday & (1 << (jul % 7)))) jul++; X FromJulian(jul, retday, retmon, retyr); X! return 0; X } else { X jul = Julian(d, m, y); X while (!(wkday & (1 << (jul % 7)))) jul++; X--- 289,295 ---- X jul = Julian(1, conmon, conyr); X while (!(wkday & (1 << (jul % 7)))) jul++; X FromJulian(jul, retday, retmon, retyr); X! if (*retmon == conmon) return 0; else return 1; X } else { X jul = Julian(d, m, y); X while (!(wkday & (1 << (jul % 7)))) jul++; SHAR_EOF $TOUCH -am 1122115490 patch.02 && chmod 0600 patch.02 || echo "restore of patch.02 failed" set `wc -c patch.02`;Wc_c=$1 if test "$Wc_c" != "2051"; then echo original size 2051, current size $Wc_c fi fi exit 0