home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume37 / remind / patch05a < prev    next >
Encoding:
Text File  |  1993-04-27  |  57.9 KB  |  1,736 lines

  1. Newsgroups: comp.sources.misc
  2. From: <dfs@doe.carleton.ca> (David F. Skoll)
  3. Subject: v37i028:  remind - A replacement for calendar, Patch05a/3
  4. Message-ID: <csm-v37i028=remind.215009@sparky.IMD.Sterling.COM>
  5. X-Md4-Signature: e0a19834a933a0508eaf4233180f0b1b
  6. Date: Wed, 28 Apr 1993 02:50:49 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: <dfs@doe.carleton.ca> (David F. Skoll)
  10. Posting-number: Volume 37, Issue 28
  11. Archive-name: remind/patch05a
  12. Environment: UNIX, MS-DOS, OS/2
  13. Patch-To: remind: Volume 33, Issue 58-69
  14.  
  15. This is patch 5 for version 3.0 of Remind.
  16.  
  17. Remind is a sophisticated calendar/alarm program, which runs under
  18. MS-DOS, UNIX and OS/2.
  19.  
  20. >From the WHATSNEW file:
  21.  
  22. * Version 3.0 Patch 5
  23.  
  24. + MAJOR ENHANCEMENTS:
  25.  
  26. - Added support for the Hebrew calendar - can now specify Jewish holidays
  27.   easily.  Thanks to Amos Shapir for explaining the Hebrew calendar, and
  28.   to Danny Sadinoff, from whose HEBCAL program I got some inspiration.
  29.   Also thanks to David W. Tamkin and Frank Yellin for explaining the rules
  30.   for jahrzeits.
  31.  
  32. + MINOR ENHANCEMENTS:
  33.  
  34. - Allowed the default page size used by Rem2PS to be selected in config.h
  35.  
  36. - Edited the defs.rem file to contain Jewish holidays.  Cleaned up some
  37.   of the examples and improved the layout - thanks to George M. Sipe.
  38.  
  39. - Modified the IIF function to be more general
  40.  
  41. - Updated finnish.h to support the ISO 8859-1 character set, courtesy
  42.   of Mikko Silvonen.
  43.  
  44. - Changed the date conversion routines to greatly speed up conversion from
  45.   Julian to yyyy/mm/dd form.
  46.  
  47. + BUG FIXES:
  48.  
  49. - Fixed a bug in which Remind complained incorrectly about a missing quote
  50.   in the command SET foo ""
  51.  
  52. - Fixed bugs in dosubst.c which caused the %o, %1 and %@ substitutions
  53.   to be incorrect
  54.  
  55. - Fixed a bug in the man page - thanks to Ed Oskiewicz.
  56.  
  57.  
  58. Availability:
  59.  
  60. You can get Remind via ftp from ftp.doe.carleton.ca (134.117.9.35)
  61. in the directory "pub/remind-3.0".
  62.  
  63. The files are:
  64.  
  65. man-ps.tar.Z        Man pages in PostScript
  66. man-txt.tar.Z        Man pages in formatted ASCII
  67. msdos-exe.tar.Z        MS-DOS executables (remind.exe and rem2ps.exe)
  68. patch01.tar.Z        Patch: 03.00.00 to 03.00.01
  69. patch02.tar.Z        Patch: 03.00.01 to 03.00.02
  70. patch03.tar.Z        Patch: 03.00.02 to 03.00.03
  71. patch04.tar.Z        Patch: 03.00.03 to 03.00.04
  72. patch05.tar.Z        Patch: 03.00.04 to 03.00.05
  73. remind-3.0.5.tar.Z    Entire 03.00.05 source distribution.
  74.  
  75. --
  76. David F. Skoll
  77. --------------------
  78. #! /bin/sh
  79. # This is a shell archive.  Remove anything before this line, then feed it
  80. # into a shell via "sh file" or similar.  To overwrite existing files,
  81. # type "sh file -c".
  82. # Contents:  patch.05.B
  83. # Wrapped by kent@sparky on Tue Apr 27 21:38:30 1993
  84. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
  85. echo If this archive is complete, you will see the following message:
  86. echo '          "shar: End of archive 1 (of 3)."'
  87. if test -f 'patch.05.B' -a "${1}" != "-c" ; then 
  88.   echo shar: Will not clobber existing file \"'patch.05.B'\"
  89. else
  90.   echo shar: Extracting \"'patch.05.B'\" \(53816 characters\)
  91.   sed "s/^X//" >'patch.05.B' <<'END_OF_FILE'
  92. X*** ../p4rel/lnk.msc    Thu Mar  4 10:44:28 1993
  93. X--- ./lnk.msc    Thu Apr 22 10:24:09 1993
  94. X***************
  95. X*** 5,10 ****
  96. X--- 5,11 ----
  97. X  files.obj +
  98. X  funcs.obj +
  99. X  globals.obj +
  100. X+ hbcal.obj +
  101. X  init.obj +
  102. X  main.obj +
  103. X  omit.obj +
  104. X*** ../p4rel/lnk.tc    Thu Mar  4 10:44:16 1993
  105. X--- ./lnk.tc    Thu Apr 22 10:24:09 1993
  106. X***************
  107. X*** 6,11 ****
  108. X--- 6,12 ----
  109. X  files.obj
  110. X  funcs.obj
  111. X  globals.obj
  112. X+ hbcal.obj
  113. X  init.obj
  114. X  main.obj
  115. X  omit.obj
  116. X*** ../p4rel/main.c    Mon Mar  1 17:34:01 1993
  117. X--- ./main.c    Thu Apr 22 10:24:10 1993
  118. X***************
  119. X*** 262,280 ****
  120. X  int day, month, year;
  121. X  #endif
  122. X  {
  123. X!    register int jul, iy;
  124. X  
  125. X!    if (year < BASE) return -1;
  126. X  
  127. X!    if (JulFirst == -1 || year < FirstYear) {
  128. X!       jul = 0;
  129. X!       for (iy = BASE; iy < year; iy++) jul += DaysInYear(iy);
  130. X!    } else {
  131. X!       jul = JulFirst;
  132. X!       for (iy = FirstYear; iy < year; iy++) jul += DaysInYear(iy);
  133. X!    }
  134. X! 
  135. X!    return jul + MonthIndex[IsLeapYear(year)][month] + day - 1;
  136. X  }
  137. X  
  138. X  /***************************************************************/
  139. X--- 262,275 ----
  140. X  int day, month, year;
  141. X  #endif
  142. X  {
  143. X!    int y1 = BASE-1, y2 = year-1;
  144. X  
  145. X!    int y4 = (y2 / 4) - (y1 / 4);  /* Correct for leap years */
  146. X!    int y100 = (y2 / 100) - (y1 / 100); /* Don't count multiples of 100... */
  147. X!    int y400 = (y2 / 400) - (y1 / 400); /* ... but do count multiples of 400 */
  148. X  
  149. X!    return 365 * (year-BASE) + y4 - y100 + y400 +
  150. X!           MonthIndex[IsLeapYear(year)][month] + day - 1;
  151. X  }
  152. X  
  153. X  /***************************************************************/
  154. X***************
  155. X*** 292,319 ****
  156. X  int *y, *m, *d;
  157. X  #endif
  158. X  {
  159. X!    register int t;
  160. X  
  161. X!    if (jul >= JulFirst && JulFirst != -1) {
  162. X!       *y = FirstYear;
  163. X!       jul -= JulFirst;
  164. X!    } else *y = BASE;
  165. X  
  166. X!    *m = 0;
  167. X! 
  168. X!    t = DaysInYear(*y);
  169. X!    while (jul >= t) {
  170. X!       jul -= t;
  171. X!       (*y)++;
  172. X!       t = DaysInYear(*y);
  173. X     }
  174. X! 
  175. X!    t = DaysInMonth(*m, *y);
  176. X     while (jul >= t) {
  177. X        jul -= t;
  178. X!       (*m)++;
  179. X!       t = DaysInMonth(*m, *y);
  180. X     }
  181. X     *d = jul + 1;
  182. X     return;
  183. X  }
  184. X--- 287,318 ----
  185. X  int *y, *m, *d;
  186. X  #endif
  187. X  {
  188. X!    int try_yr = (jul / 365) + BASE;
  189. X!    int try_mon = 0;
  190. X!    int t;
  191. X  
  192. X!    /* Inline code for speed... */
  193. X!    int y1 = BASE-1, y2 = try_yr-1;
  194. X!    int y4 = (y2 / 4) - (y1 / 4);  /* Correct for leap years */
  195. X!    int y100 = (y2 / 100) - (y1 / 100); /* Don't count multiples of 100... */
  196. X!    int y400 = (y2 / 400) - (y1 / 400); /* ... but do count multiples of 400 */
  197. X  
  198. X!    int try_jul= 365 * (try_yr-BASE) + y4 - y100 + y400;
  199. X!    
  200. X!    while (try_jul > jul) {
  201. X!       try_yr--;
  202. X!       try_jul -= DaysInYear(try_yr);
  203. X     }
  204. X!    jul -= try_jul;
  205. X!    
  206. X!    t = DaysInMonth(try_mon, try_yr);
  207. X     while (jul >= t) {
  208. X        jul -= t;
  209. X!       try_mon++;
  210. X!       t = DaysInMonth(try_mon, try_yr);
  211. X     }
  212. X+    *y = try_yr;
  213. X+    *m = try_mon;
  214. X     *d = jul + 1;
  215. X     return;
  216. X  }
  217. X*** ../p4rel/makefile.msc    Thu Mar  4 10:46:02 1993
  218. X--- ./makefile.msc    Thu Apr 22 10:58:29 1993
  219. X***************
  220. X*** 2,8 ****
  221. X  
  222. X  OBJS= calendar.obj dorem.obj dosubst.obj expr.obj files.obj funcs.obj \
  223. X  globals.obj init.obj main.obj omit.obj token.obj trigger.obj userfns.obj \
  224. X! utils.obj var.obj sort.obj
  225. X  
  226. X  DEFINES= /D__MSDOS__ /D__MSC__
  227. X  
  228. X--- 2,8 ----
  229. X  
  230. X  OBJS= calendar.obj dorem.obj dosubst.obj expr.obj files.obj funcs.obj \
  231. X  globals.obj init.obj main.obj omit.obj token.obj trigger.obj userfns.obj \
  232. X! utils.obj var.obj sort.obj hbcal.obj
  233. X  
  234. X  DEFINES= /D__MSDOS__ /D__MSC__
  235. X  
  236. X***************
  237. X*** 19,24 ****
  238. X--- 19,27 ----
  239. X  
  240. X  expr.obj: expr.c
  241. X      cl /c $(DEFINES) $(MODEL) /Foexpr.obj expr.c
  242. X+ 
  243. X+ hbcal.obj: hbcal.c
  244. X+     cl /c $(DEFINES) $(MODEL) /Fohbcal.obj hbcal.c
  245. X  
  246. X  sort.obj: sort.c
  247. X      cl /c $(DEFINES) $(MODEL) /Fosort.obj sort.c
  248. X*** ../p4rel/makefile.os2    Mon Mar  1 16:55:19 1993
  249. X--- ./makefile.os2    Thu Apr 22 10:24:11 1993
  250. X***************
  251. X*** 25,31 ****
  252. X  # YOU SHOULDN'T EDIT ANYTHING BELOW HERE.  You may want to change some things
  253. X  # in config.h; then, you should be able to type 'make'.
  254. X  #-----------------------------------------------------------------------------
  255. X! VERSION= 03.00.04
  256. X  
  257. X  HDRS= config.h err.h expr.h globals.h protos.h types.h version.h \
  258. X  lang.h english.h german.h dutch.h finish.h
  259. X--- 25,31 ----
  260. X  # YOU SHOULDN'T EDIT ANYTHING BELOW HERE.  You may want to change some things
  261. X  # in config.h; then, you should be able to type 'make'.
  262. X  #-----------------------------------------------------------------------------
  263. X! VERSION= 03.00.05
  264. X  
  265. X  HDRS= config.h err.h expr.h globals.h protos.h types.h version.h \
  266. X  lang.h english.h german.h dutch.h finish.h
  267. X***************
  268. X*** 33,39 ****
  269. X  STDHDRS= config.h types.h protos.h globals.h err.h lang.h
  270. X  
  271. X  SRCS= calendar.c dorem.c dosubst.c expr.c files.c funcs.c globals.c init.c \
  272. X! main.c omit.c sort.c token.c trigger.c userfns.c utils.c var.c
  273. X  
  274. X  MANIFEST= README.UNIX README.DOS COPYRIGHT $(HDRS) $(SRCS) Makefile rem rem.1 \
  275. X  remind.1 remind-all.csh remind-all.sh test.rem test-rem test.cmp makefile.tc \
  276. X--- 33,39 ----
  277. X  STDHDRS= config.h types.h protos.h globals.h err.h lang.h
  278. X  
  279. X  SRCS= calendar.c dorem.c dosubst.c expr.c files.c funcs.c globals.c init.c \
  280. X! main.c omit.c sort.c token.c trigger.c userfns.c utils.c var.c hbcal.c
  281. X  
  282. X  MANIFEST= README.UNIX README.DOS COPYRIGHT $(HDRS) $(SRCS) Makefile rem rem.1 \
  283. X  remind.1 remind-all.csh remind-all.sh test.rem test-rem test.cmp makefile.tc \
  284. X*** ../p4rel/makefile.tc    Mon Mar  1 16:55:05 1993
  285. X--- ./makefile.tc    Thu Apr 22 10:24:11 1993
  286. X***************
  287. X*** 1,6 ****
  288. X  # Makefile for REMIND for Turbo C for MSDOS
  289. X  
  290. X! VERSION= 03.00.04
  291. X  
  292. X  HDRS= config.h err.h expr.h globals.h protos.h types.h version.h \
  293. X  lang.h english.h german.h dutch.h finnish.h
  294. X--- 1,6 ----
  295. X  # Makefile for REMIND for Turbo C for MSDOS
  296. X  
  297. X! VERSION= 03.00.05
  298. X  
  299. X  HDRS= config.h err.h expr.h globals.h protos.h types.h version.h \
  300. X  lang.h english.h german.h dutch.h finnish.h
  301. X***************
  302. X*** 8,18 ****
  303. X  STDHDRS= config.h types.h protos.h globals.h err.h lang.h
  304. X  
  305. X  SRCS= calendar.c dorem.c dosubst.c expr.c files.c funcs.c globals.c init.c \
  306. X! main.c omit.c sort.c token.c trigger.c userfns.c utils.c var.c
  307. X  
  308. X  OBJS=calendar.obj dorem.obj dosubst.obj expr.obj files.obj funcs.obj \
  309. X  globals.obj init.obj main.obj omit.obj sort.obj token.obj trigger.obj \
  310. X! utils.obj userfns.obj var.obj
  311. X  
  312. X  MANIFEST= readme.uni readme.dos copyrigh $(HDRS) $(SRCS) makefile rem rem.1 \
  313. X  remind.1 remind-a.csh remind-a.sh test.rem test-rem test.cmp makefile.tc \
  314. X--- 8,18 ----
  315. X  STDHDRS= config.h types.h protos.h globals.h err.h lang.h
  316. X  
  317. X  SRCS= calendar.c dorem.c dosubst.c expr.c files.c funcs.c globals.c init.c \
  318. X! main.c omit.c sort.c token.c trigger.c userfns.c utils.c var.c hbcal.c
  319. X  
  320. X  OBJS=calendar.obj dorem.obj dosubst.obj expr.obj files.obj funcs.obj \
  321. X  globals.obj init.obj main.obj omit.obj sort.obj token.obj trigger.obj \
  322. X! utils.obj userfns.obj var.obj hbcal.obj
  323. X  
  324. X  MANIFEST= readme.uni readme.dos copyrigh $(HDRS) $(SRCS) makefile rem rem.1 \
  325. X  remind.1 remind-a.csh remind-a.sh test.rem test-rem test.cmp makefile.tc \
  326. X*** ../p4rel/protos.h    Tue Mar  2 16:20:16 1993
  327. X--- ./protos.h    Thu Apr 22 10:24:12 1993
  328. X***************
  329. X*** 97,103 ****
  330. X  int StrMatch ARGS ((const char *s1, const char *s2, int n));
  331. X  int StrinCmp ARGS ((const char *s1, const char *s2, int n));
  332. X  char *StrDup ARGS ((const char *s));
  333. X! int StrCmpi ARGS ((char *s1, char *s2));
  334. X  Var *FindVar ARGS ((const char *str, int create));
  335. X  int DeleteVar ARGS ((const char *str));
  336. X  int SetVar ARGS ((const char *str, Value *val));
  337. X--- 97,103 ----
  338. X  int StrMatch ARGS ((const char *s1, const char *s2, int n));
  339. X  int StrinCmp ARGS ((const char *s1, const char *s2, int n));
  340. X  char *StrDup ARGS ((const char *s));
  341. X! int StrCmpi ARGS ((const char *s1, const char *s2));
  342. X  Var *FindVar ARGS ((const char *str, int create));
  343. X  int DeleteVar ARGS ((const char *str));
  344. X  int SetVar ARGS ((const char *str, Value *val));
  345. X***************
  346. X*** 117,119 ****
  347. X--- 117,130 ----
  348. X  int InsertIntoSortBuffer ARGS ((int jul, int tim, char *body, int typ));
  349. X  void IssueSortedReminders ARGS ((void));    
  350. X  int UserFuncExists ARGS ((char *fn));
  351. X+ void JulToHeb ARGS((int jul, int *hy, int *hm, int *hd));
  352. X+ int HebNameToNum ARGS((const char *mname));
  353. X+ char *HebMonthName ARGS((int m, int y));
  354. X+ int RoshHashana ARGS((int i));
  355. X+ long DaysToHebYear ARGS((int y));
  356. X+ int DaysInHebYear ARGS((int y));
  357. X+ char *DaysInHebMonths ARGS((int ylen));
  358. X+ int HebToJul ARGS((int hy, int hm, int hd));
  359. X+ int GetValidHebDate ARGS((int yin, int min, int din, int *mout, int *dout, int yahr));
  360. X+ int GetNextHebrewDate ARGS((int julstart, int hm, int hd, int yahr, int *ans));
  361. X+ int ComputeJahr ARGS ((int y, int m, int d, int *ans));
  362. X*** ../p4rel/rem    Wed Dec 16 10:51:43 1992
  363. X--- ./rem    Thu Apr 22 10:24:13 1993
  364. X***************
  365. X*** 3,9 ****
  366. X  # rem - by David Skoll - 26 February 1991
  367. X  #
  368. X  # This script runs 'remind' with a default reminder file assumed.  You
  369. X! # can override the default by using "rem -f newfile ..."  (But why would
  370. X  # you use rem unless you wanted to accept the default??)
  371. X  
  372. X  # ------ You may wish to change the defaults below this line ------
  373. X--- 3,9 ----
  374. X  # rem - by David Skoll - 26 February 1991
  375. X  #
  376. X  # This script runs 'remind' with a default reminder file assumed.  You
  377. X! # can override the default by using "rem -F newfile ..."  (But why would
  378. X  # you use rem unless you wanted to accept the default??)
  379. X  
  380. X  # ------ You may wish to change the defaults below this line ------
  381. X*** ../p4rel/rem2ps.1    Mon Feb 15 18:45:11 1993
  382. X--- ./rem2ps.1    Thu Apr 22 10:24:28 1993
  383. X***************
  384. X*** 70,76 ****
  385. X  .PP
  386. X  Type "rem2ps -m help" for a list of available media.  Note that the media
  387. X  type (and all \fBRem2ps\fR options) are case-sensitive.  If you don't use
  388. X! the \fB\-m\fR option, the media defaults to Letter.
  389. X  .RE
  390. X  .TP
  391. X  \fB\-f\fR[\fBshed\fR] \fIfont\fR
  392. X--- 70,78 ----
  393. X  .PP
  394. X  Type "rem2ps -m help" for a list of available media.  Note that the media
  395. X  type (and all \fBRem2ps\fR options) are case-sensitive.  If you don't use
  396. X! the \fB\-m\fR option, the media defaults to a compiled-in default - this
  397. X! is usually Letter for North America and A4 for Europe.  The "-m help"
  398. X! option will display the compiled-in default.
  399. X  .RE
  400. X  .TP
  401. X  \fB\-f\fR[\fBshed\fR] \fIfont\fR
  402. X*** ../p4rel/rem2ps.c    Mon Mar  1 12:59:48 1993
  403. X--- ./rem2ps.c    Thu Apr 22 10:24:26 1993
  404. X***************
  405. X*** 61,66 ****
  406. X--- 61,71 ----
  407. X     {"10x14", 720, 1008}
  408. X  };
  409. X  
  410. X+ PageType DefaultPage[1] =
  411. X+ {
  412. X+    DEFAULT_PAGE
  413. X+ };
  414. X+ 
  415. X  #define NUMPAGES (sizeof(Pages)/sizeof(Pages[0]))
  416. X  
  417. X  CalEntry *CurEntries;
  418. X***************
  419. X*** 449,455 ****
  420. X     BotMarg = 36;
  421. X     UseISO = 0;
  422. X  
  423. X!    CurPage = Pages;  /* Letter size by default */
  424. X  
  425. X     while (i < argc) {
  426. X        s = argv[i];
  427. X--- 454,460 ----
  428. X     BotMarg = 36;
  429. X     UseISO = 0;
  430. X  
  431. X!    CurPage = DefaultPage;  /* Letter size by default */
  432. X  
  433. X     while (i < argc) {
  434. X        s = argv[i];
  435. X***************
  436. X*** 500,505 ****
  437. X--- 505,511 ----
  438. X                 fprintf(stderr, "\nAvailable media types:\n");
  439. X                 for (j=0; j<NUMPAGES; j++)
  440. X                fprintf(stderr, "   %s\n", Pages[j].name);
  441. X+                fprintf(stderr, "Default media type is %s\n", DefaultPage[0].name);
  442. X             exit(1);
  443. X              }
  444. X          break;
  445. X***************
  446. X*** 563,568 ****
  447. X--- 569,575 ----
  448. X     fprintf(stderr, "              and next month.\n");
  449. X     fprintf(stderr, "-i            Use ISO 8859-1 encoding in PostScript output\n");
  450. X     fprintf(stderr, "-m media      Set page size (eg, Letter, Legal, A4.)  Case sensitive!\n");
  451. X+    fprintf(stderr, "              (Default page size is %s)\n", DefaultPage[0].name);
  452. X     fprintf(stderr, "-f[shed] font Set font for small cal, hdr, cal entries and/or day numbers.\n");
  453. X     fprintf(stderr, "-s[hed] size  Set size for header, calendar entries and/or day numbers.\n");
  454. X     fprintf(stderr, "-b size       Set border size for calendar entries.\n");
  455. X*** ../p4rel/remind.1    Fri Mar  5 11:51:37 1993
  456. X--- ./remind.1    Thu Apr 22 10:24:17 1993
  457. X***************
  458. X*** 1,4 ****
  459. X! .TH REMIND 1 "22 January 1993"
  460. X  .UC 4
  461. X  .SH NAME
  462. X  remind \- a sophisticated reminder service
  463. X--- 1,4 ----
  464. X! .TH REMIND 1 "14 April 1993"
  465. X  .UC 4
  466. X  .SH NAME
  467. X  remind \- a sophisticated reminder service
  468. X***************
  469. X*** 135,141 ****
  470. X  \fBoverrides\fR the \fB\-r\fR option and the \fBRUN OFF\fR command.
  471. X  .PP
  472. X  .RS
  473. X! As an example, suppose you have an X-Windows program called xmessage, which
  474. X  pops up a window and displays its invocation arguments.  You could use:
  475. X  .PP
  476. X  .nf
  477. X--- 135,141 ----
  478. X  \fBoverrides\fR the \fB\-r\fR option and the \fBRUN OFF\fR command.
  479. X  .PP
  480. X  .RS
  481. X! As an example, suppose you have an X Window program called xmessage, which
  482. X  pops up a window and displays its invocation arguments.  You could use:
  483. X  .PP
  484. X  .nf
  485. X***************
  486. X*** 1451,1457 ****
  487. X  Tests the access permissions for the file \fIfile\fR.  \fIMode\fR can
  488. X  be a string, containing a mix of the characters "rwx" for read,
  489. X  write and execute permission testing.  Alternatively, \fImode\fR can
  490. X! be a number as described in the Unix \fBaccess\fR(2) system call.  The
  491. X  function returns 0 if the file can be accessed with the specified \fImode\fR,
  492. X  and -1 otherwise.
  493. X  .TP
  494. X--- 1451,1457 ----
  495. X  Tests the access permissions for the file \fIfile\fR.  \fIMode\fR can
  496. X  be a string, containing a mix of the characters "rwx" for read,
  497. X  write and execute permission testing.  Alternatively, \fImode\fR can
  498. X! be a number as described in the UNIX \fBaccess\fR(2) system call.  The
  499. X  function returns 0 if the file can be accessed with the specified \fImode\fR,
  500. X  and -1 otherwise.
  501. X  .TP
  502. X***************
  503. X*** 1542,1548 ****
  504. X  This function takes a \fBDATE\fR as an argument, and returns an \fBINT\fR
  505. X  which is the day-of-month component of \fIdate\fR.
  506. X  .TP
  507. X! .B daysimon(i_m, i_y)
  508. X  Returns the number of days in month \fIm\fR (1-12) of the year \fIy\fR.
  509. X  .TP
  510. X  .B defined(s_var)
  511. X--- 1542,1548 ----
  512. X  This function takes a \fBDATE\fR as an argument, and returns an \fBINT\fR
  513. X  which is the day-of-month component of \fIdate\fR.
  514. X  .TP
  515. X! .B daysinmon(i_m, i_y)
  516. X  Returns the number of days in month \fIm\fR (1-12) of the year \fIy\fR.
  517. X  .TP
  518. X  .B defined(s_var)
  519. X***************
  520. X*** 1597,1606 ****
  521. X  .B hour(t_time)
  522. X  Returns the hour component of \fItime\fR.
  523. X  .TP
  524. X! .B iif(si_test, x_argtrue, x_argfalse)
  525. X! If \fItest\fR is not zero, and not the null string "", returns
  526. X! \fIargtrue\fR.  Otherwise, returns \fIargfalse\fR.  Note that all
  527. X! arguments are \fIalways\fR evaluated.
  528. X  .TP
  529. X  .B index(s_search, s_target [,i_start)
  530. X  Returns an \fBINT\fR which is the location of \fItarget\fR in the
  531. X--- 1597,1610 ----
  532. X  .B hour(t_time)
  533. X  Returns the hour component of \fItime\fR.
  534. X  .TP
  535. X! .B iif(si_test1, x_arg1, [si_test2, x_arg2,...], x_default)
  536. X! If \fItest1\fR is not zero or the null string, returns \fIarg1\fR.
  537. X! Otherwise, if \fItest2\fR is not zero or the null string, returns
  538. X! \fIarg2\fR, and so on.  If all of the \fItest\fR arguments are false,
  539. X! returns \fIdefault\fR.  Note that all arguments are \fIalways\fR evaluated.
  540. X! This function accepts an odd number of arguments - note that prior to version
  541. X! 03.00.05 of \fBRemind\fR, it accepted 3 arguments only.  The 3-argument
  542. X! version of \fBiif()\fR is compatible with previous versions of \fBRemind\fR.
  543. X  .TP
  544. X  .B index(s_search, s_target [,i_start)
  545. X  Returns an \fBINT\fR which is the location of \fItarget\fR in the
  546. X***************
  547. X*** 1621,1626 ****
  548. X--- 1625,1642 ----
  549. X  Returns 1 if \fIdate\fR is omitted, given the current global \fBOMIT\fR
  550. X  context.  Returns 0 otherwise.
  551. X  .TP
  552. X+ .B hebdate(i_day, s_hebmon [,id_yrstart [,i_jahrflag]])
  553. X+ Support for Hebrew dates - see the section "The Hebrew Calendar"
  554. X+ .TP
  555. X+ .B hebday(d_date)
  556. X+ Support for Hebrew dates - see the section "The Hebrew Calendar"
  557. X+ .TP
  558. X+ .B hebmon(d_date)
  559. X+ Support for Hebrew dates - see the section "The Hebrew Calendar"
  560. X+ .TP
  561. X+ .Bhebyear(d_date)
  562. X+ Support for Hebrew dates - see the section "The Hebrew Calendar"
  563. X+ .TP
  564. X  .B language()
  565. X  Returns a \fBSTRING\fR naming the language supported by \fBRemind\fR.
  566. X  (See "Foreign Language Support.") By default, \fBRemind\fR is compiled
  567. X***************
  568. X*** 2342,2348 ****
  569. X  provide a default definition for SORTBANNER in a system-wide file included
  570. X  at the end of the user's file.)  Here's an example:
  571. X  .PP
  572. X! .nd
  573. X      # Create a default sortbanner function if it hasn't already
  574. X      # been defined
  575. X      if args("sortbanner") != 1
  576. X--- 2358,2364 ----
  577. X  provide a default definition for SORTBANNER in a system-wide file included
  578. X  at the end of the user's file.)  Here's an example:
  579. X  .PP
  580. X! .nf
  581. X      # Create a default sortbanner function if it hasn't already
  582. X      # been defined
  583. X      if args("sortbanner") != 1
  584. X***************
  585. X*** 2365,2370 ****
  586. X--- 2381,2552 ----
  587. X  However, for compatibility between versions of \fBRemind\fR, you should
  588. X  use only the English names in your scripts.
  589. X  .PP
  590. X+ .SH THE HEBREW CALENDAR
  591. X+ .PP
  592. X+ \fBRemind\fR has support for the Hebrew calendar, which is a luni-solar
  593. X+ calendar.  This allows you to create reminders for Jewish holidays,
  594. X+ jahrzeits (anniversaries of deaths) and smachot (joyous occasions.)
  595. X+ .PP
  596. X+ .B THE HEBREW YEAR
  597. X+ .PP
  598. X+ The Hebrew year has 12 months, alternately 30 and 29 days long.  The months
  599. X+ are: Tishrey, Heshvan, Kislev, Tevet, Shvat, Adar, Nisan, Iyar, Sivan, Tamuz,
  600. X+ Av and Elul.  In Biblical times, the year started in Nisan, but Rosh Hashana
  601. X+ (Jewish New Year) is now celebrated on the 1st and 2nd of Tishrey.
  602. X+ .PP
  603. X+ In a cycle of 19 years, there are 7 leap years, being years 3, 6, 8, 11,
  604. X+ 14, 17 and 19 of the cycle.  In a leap year, an extra month of 30 days
  605. X+ is added before Adar.  The two Adars are called Adar A and Adar B.
  606. X+ .PP
  607. X+ For certain religious reasons, the year cannot start on a Sunday, Wednesday
  608. X+ or Friday.  To adjust for this, a day is taken off Kislev or added to Heshvan.
  609. X+ Thus, a regular year can have from 353 to 355 days, and a leap year from
  610. X+ 383 to 385.
  611. X+ .PP
  612. X+ When Kislev or Heshvan is short, it is called "chaser", or lacking.  When
  613. X+ it is long, it is called "shalem", or full.
  614. X+ .PP
  615. X+ The Jewish date changes at sunset.  However, \fBRemind\fR will change the date
  616. X+ at midnight, not sunset.  So in the period between sunset and midnight,
  617. X+ Remind will be a day earlier than the true Jewish date.  This should not be
  618. X+ much of a problem in practice.
  619. X+ .PP
  620. X+ The computations for the Jewish calendar were based on the program "hdate"
  621. X+ written by Amos Shapir of the Hebrew University of Jerusalem, Israel.  He
  622. X+ also supplied the preceding explanation of the calendar.
  623. X+ .PP
  624. X+ .B HEBREW DATE FUNCTIONS
  625. X+ .TP
  626. X+ .B hebday(d_date)
  627. X+ Returns the day of the Hebrew month corresponding to the \fIdate\fR
  628. X+ parameter.  For example, 12 April 1993 corresponds to 21 Nisan 5753.
  629. X+ Thus, hebday('1993/04/12') returns 21.
  630. X+ .TP
  631. X+ .B hebmon(d_date)
  632. X+ Returns the name of the Hebrew month corresponding to \fIdate\fR.
  633. X+ For example, hebmon('1993/04/12') returns "Nisan".
  634. X+ .TP
  635. X+ .B hebyear(d_date)
  636. X+ Returns the Hebrew year corresponding to \fIdate\fR.  For example,
  637. X+ hebyear('1993/04/12') returns 5753.
  638. X+ .TP
  639. X+ .B hebdate(i_day, s_hebmon [,id_yrstart [,i_jahrflag]])
  640. X+ The \fBhebdate()\fR function is the most complex of the Hebrew support
  641. X+ functions.  It can take from 2 to 4 arguments.  It returns a \fBDATE\fR
  642. X+ corresponding to the Hebrew date.
  643. X+ .PP
  644. X+ .RS
  645. X+ The \fIday\fR parameter can range from 1 to 30, and specifies the day of
  646. X+ the Hebrew month.  The \fIhebmon\fR parameter is a string which must name
  647. X+ one of the Hebrew months specified above.  Note that the month must be spelled
  648. X+ out in full, and use the English transliteration shown previously.  You can
  649. X+ also specify "Adar A" and "Adar B."  Month names are not case-sensitive.
  650. X+ .PP
  651. X+ The \fIyrstart\fR parameter can either be a \fBDATE\fR or an \fBINT\fR.  If
  652. X+ it is a \fBDATE\fR, then the \fBhebdate()\fR scans for the first Hebrew
  653. X+ date on or after that date.  For example:
  654. X+ .PP
  655. X+ .nf
  656. X+         hebdate(15, "Nisan", '1990/01/01')
  657. X+ .fi
  658. X+ .PP
  659. X+ returns 1990/03/30, because that is the first occurrence of 15 Nisan on
  660. X+ or after 1 January 1990.
  661. X+ .PP
  662. X+ If \fIyrstart\fR is an \fBINT\fR, it is interpreted as a Hebrew year.  Thus:
  663. X+ .PP
  664. X+ .nf
  665. X+         hebdate(22, "Kislev", 5756)
  666. X+ .fi
  667. X+ .PP
  668. X+ returns 1995/12/15, because that date corresponds to 22 Kislev, 5756.  Note
  669. X+ that none of the Hebrew date functions will work with dates outside
  670. X+ \fBRemind's\fR normal range for dates.
  671. X+ .PP
  672. X+ If \fIyrstart\fR is not supplied, it defaults to \fBtoday()\fR.
  673. X+ .PP
  674. X+ The \fIjahrflag\fR modifies the behaviour of \fBhebdate()\fR as follows:
  675. X+ .PP
  676. X+ If \fIjahrflag\fR is 0 (the default),
  677. X+ then \fBhebdate()\fR keeps scanning until it
  678. X+ finds a date which exactly satisfies the other parameters.  For example:
  679. X+ .PP
  680. X+ .nf
  681. X+         hebdate(30, "Adar A", 1993/01/01)
  682. X+ .fi
  683. X+ .PP
  684. X+ returns 1995/03/02, corresponding to 30 Adar A, 5755, because that is the
  685. X+ next occurrence of 30 Adar A after 1 January, 1993.  This behaviour is
  686. X+ appropriate for Purim Katan, which only appears in leap years.
  687. X+ .PP
  688. X+ If \fIjahrflag\fR is 1, then the date is modified as follows:
  689. X+ .TP
  690. X+ o
  691. X+ 30 Heshvan is converted to 1 Kislev in years when Heshvan is chaser
  692. X+ .TP
  693. X+ o
  694. X+ 30 Kislev is converted to 1 Tevet in years when Kislev is chaser
  695. X+ .TP
  696. X+ o
  697. X+ 30 Adar A is converted to 1 Nisan in non-leapyears
  698. X+ .TP
  699. X+ o
  700. X+ Other dates in Adar A are moved to the corresponding day in Adar in
  701. X+ non-leapyears
  702. X+ .PP
  703. X+ This behaviour is appropriate for smachot (joyous occasions) and for
  704. X+ some jahrzeits - see "JAHRZEITS."
  705. X+ .PP
  706. X+ if \fIjahrflag\fR is 2, then the date is modified as follows:
  707. X+ .TP
  708. X+ o
  709. X+ 30 Kislev and 30 Heshvan are converted to 29 Kislev and 29 Heshvan,
  710. X+ respectively, if the month is chaser
  711. X+ .TP
  712. X+ o
  713. X+ 30 Adar A is converted to 30 Shvat in non-leapyears
  714. X+ .TP
  715. X+ o
  716. X+ Other dates in Adar A are moved to the corresponding day in Adar in
  717. X+ non-leapyears
  718. X+ .PP
  719. X+ if \fIjahrflag\fR is not 0, 1, or 2, it is interpreted as a Hebrew year,
  720. X+ and the behaviour is calculated as described in the next section,
  721. X+ "JAHRZEITS."
  722. X+ .RE
  723. X+ .PP
  724. X+ .B JAHRZEITS
  725. X+ .PP
  726. X+ A jahrzeit is a yearly commemoration of someone's death.  It normally takes
  727. X+ place on the anniversary of the death, but may be delayed if burial is
  728. X+ delayed - consult a rabbi.
  729. X+ .PP
  730. X+ In addition, because some months change length, it is not obvious which day
  731. X+ the anniversary of a death is.  The following rules are used:
  732. X+ .TP
  733. X+ o
  734. X+ If the death occurred on 30 Heshvan, and Heshvan in the year after the
  735. X+ death is chaser, then the jahrzeit is observed on 29 Heshvan in years
  736. X+ when Heshvan is chaser.  Otherwise, the yahrzeit is observed on 1
  737. X+ Kislev when Heshvan is chaser.
  738. X+ .TP
  739. X+ o
  740. X+ If the death occurred on 30 Kislev, and Kislev in the year after the
  741. X+ death is chaser, then the jahrzeit is observed on 29 Kislev in years
  742. X+ when Kislev is chaser.  Otherwise, the yahrzeit is observed on 1
  743. X+ Tevet when Kislev is chaser.
  744. X+ .TP
  745. X+ o
  746. X+ If the death occurred on 1-29 Adar A, it is observed on 1-29 Adar in
  747. X+ non-leapyears.
  748. X+ .TP
  749. X+ o
  750. X+ If the death occurred on 30 Adar A, it is observed on 30 Shvat in a
  751. X+ non-leapyear.
  752. X+ .PP
  753. X+ Specifying a Hebrew year for the \fIjahrflag\fR parameter causes the
  754. X+ correct behaviour to be selected for a death in that year.
  755. X+ .PP
  756. X  .SH MISCELLANEOUS
  757. X  .PP
  758. X  .B COMMAND ABBREVIATIONS
  759. X***************
  760. X*** 2507,2516 ****
  761. X  the current year will continue to be triggered until 7 days after it has
  762. X  occurred.  This allows you to safely use the AFTER keyword as shown.
  763. X  .PP
  764. X! In general, use \fBSCANFROM\fR as shown for safe moveable \fBOMITs\fR.  The
  765. X  amount you should scan back by (7 days in the example above) depends on
  766. X  the number of possible consecutive \fBOMITted\fR days which may occur, and
  767. X! on the range of the moveable holiday.  Generally, a value of 7 is safe.
  768. X  .PP
  769. X  Note that if you use one \fBREM\fR command to calculate a trigger date,
  770. X  perform date calculations (addition or subtraction, for example) and
  771. X--- 2689,2698 ----
  772. X  the current year will continue to be triggered until 7 days after it has
  773. X  occurred.  This allows you to safely use the AFTER keyword as shown.
  774. X  .PP
  775. X! In general, use \fBSCANFROM\fR as shown for safe movable \fBOMITs\fR.  The
  776. X  amount you should scan back by (7 days in the example above) depends on
  777. X  the number of possible consecutive \fBOMITted\fR days which may occur, and
  778. X! on the range of the movable holiday.  Generally, a value of 7 is safe.
  779. X  .PP
  780. X  Note that if you use one \fBREM\fR command to calculate a trigger date,
  781. X  perform date calculations (addition or subtraction, for example) and
  782. X***************
  783. X*** 2541,2547 ****
  784. X  David F. Skoll
  785. X  .SH BUGS
  786. X  .PP
  787. X! Date calculation is a bit "brute force."
  788. X  .PP
  789. X  The MS-DOS and OS/2 versions of \fBRemind\fR do not support queuing or timed
  790. X  activation of reminders.
  791. X--- 2723,2729 ----
  792. X  David F. Skoll
  793. X  .SH BUGS
  794. X  .PP
  795. X! Hebrew dates change at midnight, not sunset.
  796. X  .PP
  797. X  The MS-DOS and OS/2 versions of \fBRemind\fR do not support queuing or timed
  798. X  activation of reminders.
  799. X*** ../p4rel/test.cmp    Wed Mar  3 17:01:52 1993
  800. X--- ./test.cmp    Thu Apr 22 10:24:19 1993
  801. X***************
  802. X*** 5,223 ****
  803. X  #
  804. X  #     ./test-rem  # From WITHIN Remind source directory!
  805. X  
  806. X  # Test each possible case of the basic reminders.
  807. X  
  808. X  REM MSG Every Day
  809. X! ./test.rem(10): Trig = Saturday, 16 February, 1991
  810. X! Reminders for Saturday, 16th February, 1991:
  811. X! 
  812. X  Every Day
  813. X  
  814. X  
  815. X  REM 18 MSG Every 18th 
  816. X! ./test.rem(12): Trig = Monday, 18 February, 1991
  817. X  REM 15 MSG Every 15th
  818. X! ./test.rem(13): Trig = Friday, 15 March, 1991
  819. X  
  820. X  REM Feb MSG February
  821. X! ./test.rem(15): Trig = Saturday, 16 February, 1991
  822. X  February
  823. X  
  824. X  REM Jan MSG January
  825. X! ./test.rem(16): Trig = Wednesday, 1 January, 1992
  826. X  REM March MSG March
  827. X! ./test.rem(17): Trig = Friday, 1 March, 1991
  828. X  
  829. X  REM 13 Jan MSG 13 Jan
  830. X! ./test.rem(19): Trig = Monday, 13 January, 1992
  831. X  REM 15 Feb MSG 15 Feb
  832. X! ./test.rem(20): Trig = Saturday, 15 February, 1992
  833. X  REM 28 Feb MSG 28 Feb
  834. X! ./test.rem(21): Trig = Thursday, 28 February, 1991
  835. X  REM 29 Feb MSG 29 Feb
  836. X! ./test.rem(22): Trig = Saturday, 29 February, 1992
  837. X  REM 5 Mar MSG 5 Mar
  838. X! ./test.rem(23): Trig = Tuesday, 5 March, 1991
  839. X  
  840. X  REM 1990 MSG 1990
  841. X! ./test.rem(25): Expired
  842. X  REM 1991 MSG 1991
  843. X! ./test.rem(26): Trig = Saturday, 16 February, 1991
  844. X  1991
  845. X  
  846. X  REM 1992 MSG 1991
  847. X! ./test.rem(27): Trig = Wednesday, 1 January, 1992
  848. X  
  849. X  REM 1 1990 MSG 1 1990
  850. X! ./test.rem(29): Expired
  851. X  REM 29 1991 MSG 29 1991
  852. X! ./test.rem(30): Trig = Friday, 29 March, 1991
  853. X  REM 29 1992 MSG 29 1992
  854. X! ./test.rem(31): Trig = Wednesday, 29 January, 1992
  855. X  REM 16 1991 MSG 16 1991
  856. X! ./test.rem(32): Trig = Saturday, 16 February, 1991
  857. X  16 1991
  858. X  
  859. X  
  860. X  REM Jan 1990 MSG Jan 1990
  861. X! ./test.rem(34): Expired
  862. X  REM Feb 1991 MSG Feb 1991
  863. X! ./test.rem(35): Trig = Saturday, 16 February, 1991
  864. X  Feb 1991
  865. X  
  866. X  REM Dec 1991 MSG Dec 1991
  867. X! ./test.rem(36): Trig = Sunday, 1 December, 1991
  868. X  REM May 1992 MSG May 1992
  869. X! ./test.rem(37): Trig = Friday, 1 May, 1992
  870. X  
  871. X  REM 1 Jan 1991 MSG 1 Jan 1991
  872. X! ./test.rem(39): Expired
  873. X  REM 16 Feb 1991 MSG 16 Feb 1991
  874. X! ./test.rem(40): Trig = Saturday, 16 February, 1991
  875. X  16 Feb 1991
  876. X  
  877. X  REM 29 Dec 1992 MSG 29 Dec 1992
  878. X! ./test.rem(41): Trig = Tuesday, 29 December, 1992
  879. X  
  880. X  REM Sun MSG Sun
  881. X! ./test.rem(43): Trig = Sunday, 17 February, 1991
  882. X  REM Fri Sat Tue MSG Fri Sat Tue
  883. X! ./test.rem(44): Trig = Saturday, 16 February, 1991
  884. X  Fri Sat Tue
  885. X  
  886. X  
  887. X  REM Sun 16 MSG Sun 16
  888. X! ./test.rem(46): Trig = Sunday, 17 February, 1991
  889. X  REM Mon Tue Wed Thu Fri 1 MSG Mon Tue Wed Thu Fri 1
  890. X! ./test.rem(47): Trig = Friday, 1 March, 1991
  891. X  
  892. X  REM Sun Feb MSG Sun Feb
  893. X! ./test.rem(49): Trig = Sunday, 17 February, 1991
  894. X  REM Mon Tue March MSG Mon Tue March
  895. X! ./test.rem(50): Trig = Monday, 4 March, 1991
  896. X  
  897. X  REM Sun 16 Feb MSG Sun 16 Feb
  898. X! ./test.rem(52): Trig = Sunday, 17 February, 1991
  899. X  REM Mon Tue 10 March MSG Mon Tue 10 March
  900. X! ./test.rem(53): Trig = Monday, 11 March, 1991
  901. X  
  902. X  REM Sat Sun 1991 MSG Sat Sun 1991
  903. X! ./test.rem(55): Trig = Saturday, 16 February, 1991
  904. X  Sat Sun 1991
  905. X  
  906. X  REM Mon Tue 1992 MSG Mon Tue 1992
  907. X! ./test.rem(56): Trig = Monday, 6 January, 1992
  908. X  
  909. X  REM Sun 16 1991 MSG Sun 16 1991
  910. X! ./test.rem(58): Trig = Sunday, 17 February, 1991
  911. X  REM Mon Tue Wed Thu Fri 1 1992 MSG Mon Tue Wed Thu Fri 1 1992
  912. X! ./test.rem(59): Trig = Wednesday, 1 January, 1992
  913. X  
  914. X  REM Mon Feb 1991 MSG Mon Feb 1991
  915. X! ./test.rem(61): Trig = Monday, 18 February, 1991
  916. X  REM Tue Jan 1992 MSG Tue Jan 1992
  917. X! ./test.rem(62): Trig = Tuesday, 7 January, 1992
  918. X  
  919. X  REM Sun Mon 16 Feb 1991 MSG Sun Mon 16 Feb 1991
  920. X! ./test.rem(64): Trig = Sunday, 17 February, 1991
  921. X  REM Tue 28 Jan 1992 MSG Tue 28 Jan 1992
  922. X! ./test.rem(65): Trig = Tuesday, 28 January, 1992
  923. X  
  924. X  # Try some Backs
  925. X  CLEAR-OMIT-CONTEXT
  926. X  REM 1 -1 OMIT sat sun MSG 1 -1 OMIT Sat Sun
  927. X! ./test.rem(69): Trig = Thursday, 28 February, 1991
  928. X  REM 1 --1 OMIT sat sun MSG 1 --1 OMIT Sat Sun
  929. X! ./test.rem(70): Trig = Thursday, 28 February, 1991
  930. X  
  931. X  OMIT 28 Feb
  932. X  REM 1 -1 OMIT sat sun MSG 1 -1 OMIT Sat Sun (28 Feb omitted)
  933. X! ./test.rem(73): Trig = Wednesday, 27 February, 1991
  934. X  REM 1 --1 OMIT sat sun MSG 1 --1 OMIT Sat Sun (28 Feb omitted)
  935. X! ./test.rem(74): Trig = Thursday, 28 February, 1991
  936. X  
  937. X  CLEAR-OMIT-CONTEXT
  938. X  
  939. X  # Try out UNTIL
  940. X  REM Wed UNTIL 21 Feb 1991 MSG Wed UNTIL 21 Feb 1991
  941. X! ./test.rem(79): Trig = Wednesday, 20 February, 1991
  942. X  
  943. X  # Try playing with the OMIT context
  944. X  
  945. X  OMIT 28 Feb 1991
  946. X  REM 1 Mar -1 MSG 1 mar -1 (28feb91 omitted)
  947. X! ./test.rem(84): Trig = Wednesday, 27 February, 1991
  948. X  REM 1 Mar --1 MSG 1 mar --1 (28Feb91 omitted)
  949. X! ./test.rem(85): Trig = Thursday, 28 February, 1991
  950. X  REM 28 Feb BEFORE MSG 28 Feb BEFORE (28Feb91 omitted)
  951. X! ./test.rem(86): Trig = Wednesday, 27 February, 1991
  952. X  REM 28 Feb SKIP MSG 28 Feb SKIP (28Feb91 omitted)
  953. X! ./test.rem(87): Trig = Friday, 28 February, 1992
  954. X  REM 28 Feb AFTER MSG 28 Feb AFTER (28Feb91 omitted)
  955. X! ./test.rem(88): Trig = Friday, 1 March, 1991
  956. X  
  957. X  PUSH-OMIT-CONTEXT
  958. X  CLEAR-OMIT-CONTEXT
  959. X  REM 1 Mar -1 MSG 1 mar -1
  960. X! ./test.rem(92): Trig = Thursday, 28 February, 1991
  961. X  REM 1 Mar --1 MSG 1 mar --1
  962. X! ./test.rem(93): Trig = Thursday, 28 February, 1991
  963. X  REM 28 Feb BEFORE MSG 28 Feb BEFORE
  964. X! ./test.rem(94): Trig = Thursday, 28 February, 1991
  965. X  REM 28 Feb SKIP MSG 28 Feb SKIP 
  966. X! ./test.rem(95): Trig = Thursday, 28 February, 1991
  967. X  REM 28 Feb AFTER MSG 28 Feb AFTER
  968. X! ./test.rem(96): Trig = Thursday, 28 February, 1991
  969. X  
  970. X  POP-OMIT-CONTEXT
  971. X  REM 1 Mar -1 MSG 1 mar -1 (28feb91 omitted)
  972. X! ./test.rem(99): Trig = Wednesday, 27 February, 1991
  973. X  REM 1 Mar --1 MSG 1 mar --1 (28Feb91 omitted)
  974. X! ./test.rem(100): Trig = Thursday, 28 February, 1991
  975. X  REM 28 Feb BEFORE MSG 28 Feb BEFORE (28Feb91 omitted)
  976. X! ./test.rem(101): Trig = Wednesday, 27 February, 1991
  977. X  REM 28 Feb SKIP MSG 28 Feb SKIP (28Feb91 omitted)
  978. X! ./test.rem(102): Trig = Friday, 28 February, 1992
  979. X  REM 28 Feb AFTER MSG 28 Feb AFTER (28Feb91 omitted)
  980. X! ./test.rem(103): Trig = Friday, 1 March, 1991
  981. X  
  982. X  
  983. X  REM 13 March 1991 *1 UNTIL 19 March 1991 MSG 13-19 Mar 91
  984. X! ./test.rem(106): Trig = Wednesday, 13 March, 1991
  985. X   
  986. X  # Test BACK
  987. X  CLEAR-OMIT-CONTEXT
  988. X  REM 18 Feb 1991 +1 MSG 18 Feb 1991 +1
  989. X! ./test.rem(110): Trig = Monday, 18 February, 1991
  990. X  
  991. X  OMIT 17 Feb 1991
  992. X  REM 18 Feb 1991 +1 MSG 18 Feb 1991 +1 (17Feb91 omitted)
  993. X! ./test.rem(113): Trig = Monday, 18 February, 1991
  994. X  18 Feb 1991 +1 (17Feb91 omitted)
  995. X  
  996. X  REM 18 Feb 1991 ++1 MSG 18 Feb 1991 ++1 (17Feb91 omitted)
  997. X! ./test.rem(114): Trig = Monday, 18 February, 1991
  998. X  
  999. X  CLEAR-OMIT-CONTEXT
  1000. X  # Test the scanfrom clause
  1001. X  REM Fri SATISFY 1
  1002. X! ./test.rem(118): Trig = Friday, 22 February, 1991
  1003. X  OMIT [trigger(trigdate())]
  1004. X  trigdate() => 1991/02/22
  1005. X  trigger(1991/02/22) => "22 February 1991"
  1006. X  REM Fri after MSG 23 Feb 1991
  1007. X! ./test.rem(120): Trig = Saturday, 23 February, 1991
  1008. X  CLEAR-OMIT-CONTEXT
  1009. X  REM Fri SCANFROM [trigger(today()-7)] SATISFY 1
  1010. X  today() => 1991/02/16
  1011. X  1991/02/16 - 7 => 1991/02/09
  1012. X  trigger(1991/02/09) => "9 February 1991"
  1013. X! ./test.rem(122): Trig = Friday, 15 February, 1991
  1014. X  OMIT [trigger(trigdate())]
  1015. X  trigdate() => 1991/02/15
  1016. X  trigger(1991/02/15) => "15 February 1991"
  1017. X  REM Fri after MSG 16 Feb 1991
  1018. X! ./test.rem(124): Trig = Saturday, 16 February, 1991
  1019. X  16 Feb 1991
  1020. X  
  1021. X  CLEAR-OMIT-CONTEXT
  1022. X--- 5,483 ----
  1023. X  #
  1024. X  #     ./test-rem  # From WITHIN Remind source directory!
  1025. X  
  1026. X+ REM MSG Today is [hebday(today())] [hebmon(today())] [hebyear(today())]
  1027. X+ ./test.rem(8): Trig = Saturday, 16 February, 1991
  1028. X+ Reminders for Saturday, 16th February, 1991:
  1029. X+ 
  1030. X+ today() => 1991/02/16
  1031. X+ hebday(1991/02/16) => 2
  1032. X+ today() => 1991/02/16
  1033. X+ hebmon(1991/02/16) => "Adar"
  1034. X+ today() => 1991/02/16
  1035. X+ hebyear(1991/02/16) => 5751
  1036. X+ Today is 2 Adar 5751
  1037. X+ 
  1038. X+ fset _h(x, y) trigger(hebdate(x,y))
  1039. X+ 
  1040. X+ [_h(1,  "Tishrey")] MSG Rosh Hashana 1
  1041. X+ Entering UserFN _h(1, "Tishrey")
  1042. X+ x => 1
  1043. X+ y => "Tishrey"
  1044. X+ hebdate(1, "Tishrey") => 1991/09/09
  1045. X+ trigger(1991/09/09) => "9 September 1991"
  1046. X+ Leaving UserFN _h() => "9 September 1991"
  1047. X+ ./test.rem(11): Trig = Monday, 9 September, 1991
  1048. X+ [_h(2,  "Tishrey")] MSG Rosh Hashana 2
  1049. X+ Entering UserFN _h(2, "Tishrey")
  1050. X+ x => 2
  1051. X+ y => "Tishrey"
  1052. X+ hebdate(2, "Tishrey") => 1991/09/10
  1053. X+ trigger(1991/09/10) => "10 September 1991"
  1054. X+ Leaving UserFN _h() => "10 September 1991"
  1055. X+ ./test.rem(12): Trig = Tuesday, 10 September, 1991
  1056. X+ [_h(3,  "Tishrey")] MSG Tzom Gedalia
  1057. X+ Entering UserFN _h(3, "Tishrey")
  1058. X+ x => 3
  1059. X+ y => "Tishrey"
  1060. X+ hebdate(3, "Tishrey") => 1991/09/11
  1061. X+ trigger(1991/09/11) => "11 September 1991"
  1062. X+ Leaving UserFN _h() => "11 September 1991"
  1063. X+ ./test.rem(13): Trig = Wednesday, 11 September, 1991
  1064. X+ [_h(10, "Tishrey")] MSG Yom Kippur
  1065. X+ Entering UserFN _h(10, "Tishrey")
  1066. X+ x => 10
  1067. X+ y => "Tishrey"
  1068. X+ hebdate(10, "Tishrey") => 1991/09/18
  1069. X+ trigger(1991/09/18) => "18 September 1991"
  1070. X+ Leaving UserFN _h() => "18 September 1991"
  1071. X+ ./test.rem(14): Trig = Wednesday, 18 September, 1991
  1072. X+ [_h(15, "Tishrey")] MSG Sukkot 1
  1073. X+ Entering UserFN _h(15, "Tishrey")
  1074. X+ x => 15
  1075. X+ y => "Tishrey"
  1076. X+ hebdate(15, "Tishrey") => 1991/09/23
  1077. X+ trigger(1991/09/23) => "23 September 1991"
  1078. X+ Leaving UserFN _h() => "23 September 1991"
  1079. X+ ./test.rem(15): Trig = Monday, 23 September, 1991
  1080. X+ [_h(25, "Kislev")]  MSG Channuka
  1081. X+ Entering UserFN _h(25, "Kislev")
  1082. X+ x => 25
  1083. X+ y => "Kislev"
  1084. X+ hebdate(25, "Kislev") => 1991/12/02
  1085. X+ trigger(1991/12/02) => "2 December 1991"
  1086. X+ Leaving UserFN _h() => "2 December 1991"
  1087. X+ ./test.rem(16): Trig = Monday, 2 December, 1991
  1088. X+ [_h(10, "Tevet")]   MSG Asara B'Tevet
  1089. X+ Entering UserFN _h(10, "Tevet")
  1090. X+ x => 10
  1091. X+ y => "Tevet"
  1092. X+ hebdate(10, "Tevet") => 1991/12/17
  1093. X+ trigger(1991/12/17) => "17 December 1991"
  1094. X+ Leaving UserFN _h() => "17 December 1991"
  1095. X+ ./test.rem(17): Trig = Tuesday, 17 December, 1991
  1096. X+ [_h(15, "Shvat")]   MSG Tu B'Shvat
  1097. X+ Entering UserFN _h(15, "Shvat")
  1098. X+ x => 15
  1099. X+ y => "Shvat"
  1100. X+ hebdate(15, "Shvat") => 1992/01/20
  1101. X+ trigger(1992/01/20) => "20 January 1992"
  1102. X+ Leaving UserFN _h() => "20 January 1992"
  1103. X+ ./test.rem(18): Trig = Monday, 20 January, 1992
  1104. X+ [_h(15, "Adar A")]  MSG Purim Katan
  1105. X+ Entering UserFN _h(15, "Adar A")
  1106. X+ x => 15
  1107. X+ y => "Adar A"
  1108. X+ hebdate(15, "Adar A") => 1992/02/19
  1109. X+ trigger(1992/02/19) => "19 February 1992"
  1110. X+ Leaving UserFN _h() => "19 February 1992"
  1111. X+ ./test.rem(19): Trig = Wednesday, 19 February, 1992
  1112. X+ [_h(14, "Adar")]    MSG Purim
  1113. X+ Entering UserFN _h(14, "Adar")
  1114. X+ x => 14
  1115. X+ y => "Adar"
  1116. X+ hebdate(14, "Adar") => 1991/02/28
  1117. X+ trigger(1991/02/28) => "28 February 1991"
  1118. X+ Leaving UserFN _h() => "28 February 1991"
  1119. X+ ./test.rem(20): Trig = Thursday, 28 February, 1991
  1120. X+ [_h(15, "Nisan")]   MSG Pesach
  1121. X+ Entering UserFN _h(15, "Nisan")
  1122. X+ x => 15
  1123. X+ y => "Nisan"
  1124. X+ hebdate(15, "Nisan") => 1991/03/30
  1125. X+ trigger(1991/03/30) => "30 March 1991"
  1126. X+ Leaving UserFN _h() => "30 March 1991"
  1127. X+ ./test.rem(21): Trig = Saturday, 30 March, 1991
  1128. X+ [_h(27, "Nisan")]   MSG Yom HaShoah
  1129. X+ Entering UserFN _h(27, "Nisan")
  1130. X+ x => 27
  1131. X+ y => "Nisan"
  1132. X+ hebdate(27, "Nisan") => 1991/04/11
  1133. X+ trigger(1991/04/11) => "11 April 1991"
  1134. X+ Leaving UserFN _h() => "11 April 1991"
  1135. X+ ./test.rem(22): Trig = Thursday, 11 April, 1991
  1136. X+ [_h(4,  "Iyar")]    MSG Yom HaZikaron
  1137. X+ Entering UserFN _h(4, "Iyar")
  1138. X+ x => 4
  1139. X+ y => "Iyar"
  1140. X+ hebdate(4, "Iyar") => 1991/04/18
  1141. X+ trigger(1991/04/18) => "18 April 1991"
  1142. X+ Leaving UserFN _h() => "18 April 1991"
  1143. X+ ./test.rem(23): Trig = Thursday, 18 April, 1991
  1144. X+ [_h(5,  "Iyar")]    MSG Yom Ha'atzmaut
  1145. X+ Entering UserFN _h(5, "Iyar")
  1146. X+ x => 5
  1147. X+ y => "Iyar"
  1148. X+ hebdate(5, "Iyar") => 1991/04/19
  1149. X+ trigger(1991/04/19) => "19 April 1991"
  1150. X+ Leaving UserFN _h() => "19 April 1991"
  1151. X+ ./test.rem(24): Trig = Friday, 19 April, 1991
  1152. X+ [_h(28, "Iyar")]    MSG Yom Yerushalayim
  1153. X+ Entering UserFN _h(28, "Iyar")
  1154. X+ x => 28
  1155. X+ y => "Iyar"
  1156. X+ hebdate(28, "Iyar") => 1991/05/12
  1157. X+ trigger(1991/05/12) => "12 May 1991"
  1158. X+ Leaving UserFN _h() => "12 May 1991"
  1159. X+ ./test.rem(25): Trig = Sunday, 12 May, 1991
  1160. X+ [_h(6,  "Sivan")]   MSG Shavuot
  1161. X+ Entering UserFN _h(6, "Sivan")
  1162. X+ x => 6
  1163. X+ y => "Sivan"
  1164. X+ hebdate(6, "Sivan") => 1991/05/19
  1165. X+ trigger(1991/05/19) => "19 May 1991"
  1166. X+ Leaving UserFN _h() => "19 May 1991"
  1167. X+ ./test.rem(26): Trig = Sunday, 19 May, 1991
  1168. X+ [_h(9,  "Av")]      MSG Tish'a B'Av
  1169. X+ Entering UserFN _h(9, "Av")
  1170. X+ x => 9
  1171. X+ y => "Av"
  1172. X+ hebdate(9, "Av") => 1991/07/20
  1173. X+ trigger(1991/07/20) => "20 July 1991"
  1174. X+ Leaving UserFN _h() => "20 July 1991"
  1175. X+ ./test.rem(27): Trig = Saturday, 20 July, 1991
  1176. X+ 
  1177. X+ # Test some jahrzeit cases
  1178. X+ fset _i(x,y,z,a) trigger(hebdate(x,y,z,a))
  1179. X+ [_i(30, "Heshvan", today(), 5759)] MSG Complete-Complete
  1180. X+ today() => 1991/02/16
  1181. X+ Entering UserFN _i(30, "Heshvan", 1991/02/16, 5759)
  1182. X+ x => 30
  1183. X+ y => "Heshvan"
  1184. X+ z => 1991/02/16
  1185. X+ a => 5759
  1186. X+ hebdate(30, "Heshvan", 1991/02/16, 5759) => 1991/11/07
  1187. X+ trigger(1991/11/07) => "7 November 1991"
  1188. X+ Leaving UserFN _i() => "7 November 1991"
  1189. X+ ./test.rem(31): Trig = Thursday, 7 November, 1991
  1190. X+ [_i(30, "Heshvan", today(), 5760)] MSG Complete-Defective
  1191. X+ today() => 1991/02/16
  1192. X+ Entering UserFN _i(30, "Heshvan", 1991/02/16, 5760)
  1193. X+ x => 30
  1194. X+ y => "Heshvan"
  1195. X+ z => 1991/02/16
  1196. X+ a => 5760
  1197. X+ hebdate(30, "Heshvan", 1991/02/16, 5760) => 1991/11/07
  1198. X+ trigger(1991/11/07) => "7 November 1991"
  1199. X+ Leaving UserFN _i() => "7 November 1991"
  1200. X+ ./test.rem(32): Trig = Thursday, 7 November, 1991
  1201. X+ [_i(30, "Heshvan", today(), 5761)] MSG Illegal
  1202. X+ today() => 1991/02/16
  1203. X+ Entering UserFN _i(30, "Heshvan", 1991/02/16, 5761)
  1204. X+ x => 30
  1205. X+ y => "Heshvan"
  1206. X+ z => 1991/02/16
  1207. X+ a => 5761
  1208. X+ hebdate(30, "Heshvan", 1991/02/16, 5761) => ./test.rem(33): No 30 Heshvan 5761
  1209. X+ Bad date specification
  1210. X+ Leaving UserFN _i() => Bad date specification
  1211. X+ 
  1212. X+ [_i(30, "Kislev", today(), 5759)] MSG Complete-Complete
  1213. X+ today() => 1991/02/16
  1214. X+ Entering UserFN _i(30, "Kislev", 1991/02/16, 5759)
  1215. X+ x => 30
  1216. X+ y => "Kislev"
  1217. X+ z => 1991/02/16
  1218. X+ a => 5759
  1219. X+ hebdate(30, "Kislev", 1991/02/16, 5759) => 1991/12/07
  1220. X+ trigger(1991/12/07) => "7 December 1991"
  1221. X+ Leaving UserFN _i() => "7 December 1991"
  1222. X+ ./test.rem(35): Trig = Saturday, 7 December, 1991
  1223. X+ [_i(30, "Kislev", today(), 5760)] MSG Complete-Defective
  1224. X+ today() => 1991/02/16
  1225. X+ Entering UserFN _i(30, "Kislev", 1991/02/16, 5760)
  1226. X+ x => 30
  1227. X+ y => "Kislev"
  1228. X+ z => 1991/02/16
  1229. X+ a => 5760
  1230. X+ hebdate(30, "Kislev", 1991/02/16, 5760) => 1991/12/07
  1231. X+ trigger(1991/12/07) => "7 December 1991"
  1232. X+ Leaving UserFN _i() => "7 December 1991"
  1233. X+ ./test.rem(36): Trig = Saturday, 7 December, 1991
  1234. X+ [_i(30, "Kislev", today(), 5761)] MSG Illegal
  1235. X+ today() => 1991/02/16
  1236. X+ Entering UserFN _i(30, "Kislev", 1991/02/16, 5761)
  1237. X+ x => 30
  1238. X+ y => "Kislev"
  1239. X+ z => 1991/02/16
  1240. X+ a => 5761
  1241. X+ hebdate(30, "Kislev", 1991/02/16, 5761) => ./test.rem(37): No 30 Kislev 5761
  1242. X+ Bad date specification
  1243. X+ Leaving UserFN _i() => Bad date specification
  1244. X+ 
  1245. X+ [_i(30, "Adar A", today(), 5755)] MSG Leap
  1246. X+ today() => 1991/02/16
  1247. X+ Entering UserFN _i(30, "Adar A", 1991/02/16, 5755)
  1248. X+ x => 30
  1249. X+ y => "Adar A"
  1250. X+ z => 1991/02/16
  1251. X+ a => 5755
  1252. X+ hebdate(30, "Adar A", 1991/02/16, 5755) => 1992/03/05
  1253. X+ trigger(1992/03/05) => "5 March 1992"
  1254. X+ Leaving UserFN _i() => "5 March 1992"
  1255. X+ ./test.rem(39): Trig = Thursday, 5 March, 1992
  1256. X+ [_i(30, "Adar A", today(), 5756)] MSG Illegal
  1257. X+ today() => 1991/02/16
  1258. X+ Entering UserFN _i(30, "Adar A", 1991/02/16, 5756)
  1259. X+ x => 30
  1260. X+ y => "Adar A"
  1261. X+ z => 1991/02/16
  1262. X+ a => 5756
  1263. X+ hebdate(30, "Adar A", 1991/02/16, 5756) => ./test.rem(40): No Adar A in 5756
  1264. X+ Bad date specification
  1265. X+ Leaving UserFN _i() => Bad date specification
  1266. X+ [_i(29, "Adar A", today(), 5755)] MSG Leap
  1267. X+ today() => 1991/02/16
  1268. X+ Entering UserFN _i(29, "Adar A", 1991/02/16, 5755)
  1269. X+ x => 29
  1270. X+ y => "Adar A"
  1271. X+ z => 1991/02/16
  1272. X+ a => 5755
  1273. X+ hebdate(29, "Adar A", 1991/02/16, 5755) => 1991/03/15
  1274. X+ trigger(1991/03/15) => "15 March 1991"
  1275. X+ Leaving UserFN _i() => "15 March 1991"
  1276. X+ ./test.rem(41): Trig = Friday, 15 March, 1991
  1277. X+ [_i(29, "Adar A", today(), 5756)] MSG Illegal
  1278. X+ today() => 1991/02/16
  1279. X+ Entering UserFN _i(29, "Adar A", 1991/02/16, 5756)
  1280. X+ x => 29
  1281. X+ y => "Adar A"
  1282. X+ z => 1991/02/16
  1283. X+ a => 5756
  1284. X+ hebdate(29, "Adar A", 1991/02/16, 5756) => ./test.rem(42): No Adar A in 5756
  1285. X+ Bad date specification
  1286. X+ Leaving UserFN _i() => Bad date specification
  1287. X+ 
  1288. X  # Test each possible case of the basic reminders.
  1289. X  
  1290. X  REM MSG Every Day
  1291. X! ./test.rem(46): Trig = Saturday, 16 February, 1991
  1292. X  Every Day
  1293. X  
  1294. X  
  1295. X  REM 18 MSG Every 18th 
  1296. X! ./test.rem(48): Trig = Monday, 18 February, 1991
  1297. X  REM 15 MSG Every 15th
  1298. X! ./test.rem(49): Trig = Friday, 15 March, 1991
  1299. X  
  1300. X  REM Feb MSG February
  1301. X! ./test.rem(51): Trig = Saturday, 16 February, 1991
  1302. X  February
  1303. X  
  1304. X  REM Jan MSG January
  1305. X! ./test.rem(52): Trig = Wednesday, 1 January, 1992
  1306. X  REM March MSG March
  1307. X! ./test.rem(53): Trig = Friday, 1 March, 1991
  1308. X  
  1309. X  REM 13 Jan MSG 13 Jan
  1310. X! ./test.rem(55): Trig = Monday, 13 January, 1992
  1311. X  REM 15 Feb MSG 15 Feb
  1312. X! ./test.rem(56): Trig = Saturday, 15 February, 1992
  1313. X  REM 28 Feb MSG 28 Feb
  1314. X! ./test.rem(57): Trig = Thursday, 28 February, 1991
  1315. X  REM 29 Feb MSG 29 Feb
  1316. X! ./test.rem(58): Trig = Saturday, 29 February, 1992
  1317. X  REM 5 Mar MSG 5 Mar
  1318. X! ./test.rem(59): Trig = Tuesday, 5 March, 1991
  1319. X  
  1320. X  REM 1990 MSG 1990
  1321. X! ./test.rem(61): Expired
  1322. X  REM 1991 MSG 1991
  1323. X! ./test.rem(62): Trig = Saturday, 16 February, 1991
  1324. X  1991
  1325. X  
  1326. X  REM 1992 MSG 1991
  1327. X! ./test.rem(63): Trig = Wednesday, 1 January, 1992
  1328. X  
  1329. X  REM 1 1990 MSG 1 1990
  1330. X! ./test.rem(65): Expired
  1331. X  REM 29 1991 MSG 29 1991
  1332. X! ./test.rem(66): Trig = Friday, 29 March, 1991
  1333. X  REM 29 1992 MSG 29 1992
  1334. X! ./test.rem(67): Trig = Wednesday, 29 January, 1992
  1335. X  REM 16 1991 MSG 16 1991
  1336. X! ./test.rem(68): Trig = Saturday, 16 February, 1991
  1337. X  16 1991
  1338. X  
  1339. X  
  1340. X  REM Jan 1990 MSG Jan 1990
  1341. X! ./test.rem(70): Expired
  1342. X  REM Feb 1991 MSG Feb 1991
  1343. X! ./test.rem(71): Trig = Saturday, 16 February, 1991
  1344. X  Feb 1991
  1345. X  
  1346. X  REM Dec 1991 MSG Dec 1991
  1347. X! ./test.rem(72): Trig = Sunday, 1 December, 1991
  1348. X  REM May 1992 MSG May 1992
  1349. X! ./test.rem(73): Trig = Friday, 1 May, 1992
  1350. X  
  1351. X  REM 1 Jan 1991 MSG 1 Jan 1991
  1352. X! ./test.rem(75): Expired
  1353. X  REM 16 Feb 1991 MSG 16 Feb 1991
  1354. X! ./test.rem(76): Trig = Saturday, 16 February, 1991
  1355. X  16 Feb 1991
  1356. X  
  1357. X  REM 29 Dec 1992 MSG 29 Dec 1992
  1358. X! ./test.rem(77): Trig = Tuesday, 29 December, 1992
  1359. X  
  1360. X  REM Sun MSG Sun
  1361. X! ./test.rem(79): Trig = Sunday, 17 February, 1991
  1362. X  REM Fri Sat Tue MSG Fri Sat Tue
  1363. X! ./test.rem(80): Trig = Saturday, 16 February, 1991
  1364. X  Fri Sat Tue
  1365. X  
  1366. X  
  1367. X  REM Sun 16 MSG Sun 16
  1368. X! ./test.rem(82): Trig = Sunday, 17 February, 1991
  1369. X  REM Mon Tue Wed Thu Fri 1 MSG Mon Tue Wed Thu Fri 1
  1370. X! ./test.rem(83): Trig = Friday, 1 March, 1991
  1371. X  
  1372. X  REM Sun Feb MSG Sun Feb
  1373. X! ./test.rem(85): Trig = Sunday, 17 February, 1991
  1374. X  REM Mon Tue March MSG Mon Tue March
  1375. X! ./test.rem(86): Trig = Monday, 4 March, 1991
  1376. X  
  1377. X  REM Sun 16 Feb MSG Sun 16 Feb
  1378. X! ./test.rem(88): Trig = Sunday, 17 February, 1991
  1379. X  REM Mon Tue 10 March MSG Mon Tue 10 March
  1380. X! ./test.rem(89): Trig = Monday, 11 March, 1991
  1381. X  
  1382. X  REM Sat Sun 1991 MSG Sat Sun 1991
  1383. X! ./test.rem(91): Trig = Saturday, 16 February, 1991
  1384. X  Sat Sun 1991
  1385. X  
  1386. X  REM Mon Tue 1992 MSG Mon Tue 1992
  1387. X! ./test.rem(92): Trig = Monday, 6 January, 1992
  1388. X  
  1389. X  REM Sun 16 1991 MSG Sun 16 1991
  1390. X! ./test.rem(94): Trig = Sunday, 17 February, 1991
  1391. X  REM Mon Tue Wed Thu Fri 1 1992 MSG Mon Tue Wed Thu Fri 1 1992
  1392. X! ./test.rem(95): Trig = Wednesday, 1 January, 1992
  1393. X  
  1394. X  REM Mon Feb 1991 MSG Mon Feb 1991
  1395. X! ./test.rem(97): Trig = Monday, 18 February, 1991
  1396. X  REM Tue Jan 1992 MSG Tue Jan 1992
  1397. X! ./test.rem(98): Trig = Tuesday, 7 January, 1992
  1398. X  
  1399. X  REM Sun Mon 16 Feb 1991 MSG Sun Mon 16 Feb 1991
  1400. X! ./test.rem(100): Trig = Sunday, 17 February, 1991
  1401. X  REM Tue 28 Jan 1992 MSG Tue 28 Jan 1992
  1402. X! ./test.rem(101): Trig = Tuesday, 28 January, 1992
  1403. X  
  1404. X  # Try some Backs
  1405. X  CLEAR-OMIT-CONTEXT
  1406. X  REM 1 -1 OMIT sat sun MSG 1 -1 OMIT Sat Sun
  1407. X! ./test.rem(105): Trig = Thursday, 28 February, 1991
  1408. X  REM 1 --1 OMIT sat sun MSG 1 --1 OMIT Sat Sun
  1409. X! ./test.rem(106): Trig = Thursday, 28 February, 1991
  1410. X  
  1411. X  OMIT 28 Feb
  1412. X  REM 1 -1 OMIT sat sun MSG 1 -1 OMIT Sat Sun (28 Feb omitted)
  1413. X! ./test.rem(109): Trig = Wednesday, 27 February, 1991
  1414. X  REM 1 --1 OMIT sat sun MSG 1 --1 OMIT Sat Sun (28 Feb omitted)
  1415. X! ./test.rem(110): Trig = Thursday, 28 February, 1991
  1416. X  
  1417. X  CLEAR-OMIT-CONTEXT
  1418. X  
  1419. X  # Try out UNTIL
  1420. X  REM Wed UNTIL 21 Feb 1991 MSG Wed UNTIL 21 Feb 1991
  1421. X! ./test.rem(115): Trig = Wednesday, 20 February, 1991
  1422. X  
  1423. X  # Try playing with the OMIT context
  1424. X  
  1425. X  OMIT 28 Feb 1991
  1426. X  REM 1 Mar -1 MSG 1 mar -1 (28feb91 omitted)
  1427. X! ./test.rem(120): Trig = Wednesday, 27 February, 1991
  1428. X  REM 1 Mar --1 MSG 1 mar --1 (28Feb91 omitted)
  1429. X! ./test.rem(121): Trig = Thursday, 28 February, 1991
  1430. X  REM 28 Feb BEFORE MSG 28 Feb BEFORE (28Feb91 omitted)
  1431. X! ./test.rem(122): Trig = Wednesday, 27 February, 1991
  1432. X  REM 28 Feb SKIP MSG 28 Feb SKIP (28Feb91 omitted)
  1433. X! ./test.rem(123): Trig = Friday, 28 February, 1992
  1434. X  REM 28 Feb AFTER MSG 28 Feb AFTER (28Feb91 omitted)
  1435. X! ./test.rem(124): Trig = Friday, 1 March, 1991
  1436. X  
  1437. X  PUSH-OMIT-CONTEXT
  1438. X  CLEAR-OMIT-CONTEXT
  1439. X  REM 1 Mar -1 MSG 1 mar -1
  1440. X! ./test.rem(128): Trig = Thursday, 28 February, 1991
  1441. X  REM 1 Mar --1 MSG 1 mar --1
  1442. X! ./test.rem(129): Trig = Thursday, 28 February, 1991
  1443. X  REM 28 Feb BEFORE MSG 28 Feb BEFORE
  1444. X! ./test.rem(130): Trig = Thursday, 28 February, 1991
  1445. X  REM 28 Feb SKIP MSG 28 Feb SKIP 
  1446. X! ./test.rem(131): Trig = Thursday, 28 February, 1991
  1447. X  REM 28 Feb AFTER MSG 28 Feb AFTER
  1448. X! ./test.rem(132): Trig = Thursday, 28 February, 1991
  1449. X  
  1450. X  POP-OMIT-CONTEXT
  1451. X  REM 1 Mar -1 MSG 1 mar -1 (28feb91 omitted)
  1452. X! ./test.rem(135): Trig = Wednesday, 27 February, 1991
  1453. X  REM 1 Mar --1 MSG 1 mar --1 (28Feb91 omitted)
  1454. X! ./test.rem(136): Trig = Thursday, 28 February, 1991
  1455. X  REM 28 Feb BEFORE MSG 28 Feb BEFORE (28Feb91 omitted)
  1456. X! ./test.rem(137): Trig = Wednesday, 27 February, 1991
  1457. X  REM 28 Feb SKIP MSG 28 Feb SKIP (28Feb91 omitted)
  1458. X! ./test.rem(138): Trig = Friday, 28 February, 1992
  1459. X  REM 28 Feb AFTER MSG 28 Feb AFTER (28Feb91 omitted)
  1460. X! ./test.rem(139): Trig = Friday, 1 March, 1991
  1461. X  
  1462. X  
  1463. X  REM 13 March 1991 *1 UNTIL 19 March 1991 MSG 13-19 Mar 91
  1464. X! ./test.rem(142): Trig = Wednesday, 13 March, 1991
  1465. X   
  1466. X  # Test BACK
  1467. X  CLEAR-OMIT-CONTEXT
  1468. X  REM 18 Feb 1991 +1 MSG 18 Feb 1991 +1
  1469. X! ./test.rem(146): Trig = Monday, 18 February, 1991
  1470. X  
  1471. X  OMIT 17 Feb 1991
  1472. X  REM 18 Feb 1991 +1 MSG 18 Feb 1991 +1 (17Feb91 omitted)
  1473. X! ./test.rem(149): Trig = Monday, 18 February, 1991
  1474. X  18 Feb 1991 +1 (17Feb91 omitted)
  1475. X  
  1476. X  REM 18 Feb 1991 ++1 MSG 18 Feb 1991 ++1 (17Feb91 omitted)
  1477. X! ./test.rem(150): Trig = Monday, 18 February, 1991
  1478. X  
  1479. X  CLEAR-OMIT-CONTEXT
  1480. X  # Test the scanfrom clause
  1481. X  REM Fri SATISFY 1
  1482. X! ./test.rem(154): Trig = Friday, 22 February, 1991
  1483. X  OMIT [trigger(trigdate())]
  1484. X  trigdate() => 1991/02/22
  1485. X  trigger(1991/02/22) => "22 February 1991"
  1486. X  REM Fri after MSG 23 Feb 1991
  1487. X! ./test.rem(156): Trig = Saturday, 23 February, 1991
  1488. X  CLEAR-OMIT-CONTEXT
  1489. X  REM Fri SCANFROM [trigger(today()-7)] SATISFY 1
  1490. X  today() => 1991/02/16
  1491. X  1991/02/16 - 7 => 1991/02/09
  1492. X  trigger(1991/02/09) => "9 February 1991"
  1493. X! ./test.rem(158): Trig = Friday, 15 February, 1991
  1494. X  OMIT [trigger(trigdate())]
  1495. X  trigdate() => 1991/02/15
  1496. X  trigger(1991/02/15) => "15 February 1991"
  1497. X  REM Fri after MSG 16 Feb 1991
  1498. X! ./test.rem(160): Trig = Saturday, 16 February, 1991
  1499. X  16 Feb 1991
  1500. X  
  1501. X  CLEAR-OMIT-CONTEXT
  1502. X***************
  1503. X*** 243,249 ****
  1504. X  coerce("string", 11:44) => "11:44"
  1505. X  set a009 coerce("int", "badnews")
  1506. X  coerce("int", "badnews") => Can't coerce
  1507. X! ./test.rem(135): Can't coerce
  1508. X  set a010 coerce("int", "12")
  1509. X  coerce("int", "12") => 12
  1510. X  set a011 coerce("int", 11:44)
  1511. X--- 503,509 ----
  1512. X  coerce("string", 11:44) => "11:44"
  1513. X  set a009 coerce("int", "badnews")
  1514. X  coerce("int", "badnews") => Can't coerce
  1515. X! ./test.rem(171): Can't coerce
  1516. X  set a010 coerce("int", "12")
  1517. X  coerce("int", "12") => 12
  1518. X  set a011 coerce("int", 11:44)
  1519. X***************
  1520. X*** 255,261 ****
  1521. X  date(1992, 2, 2) => 1992/02/02
  1522. X  set a014 date(1993, 2, 29)
  1523. X  date(1993, 2, 29) => Bad date specification
  1524. X! ./test.rem(140): Bad date specification
  1525. X  set a015 day(today())
  1526. X  today() => 1991/02/16
  1527. X  day(1991/02/16) => 16
  1528. X--- 515,521 ----
  1529. X  date(1992, 2, 2) => 1992/02/02
  1530. X  set a014 date(1993, 2, 29)
  1531. X  date(1993, 2, 29) => Bad date specification
  1532. X! ./test.rem(176): Bad date specification
  1533. X  set a015 day(today())
  1534. X  today() => 1991/02/16
  1535. X  day(1991/02/16) => 16
  1536. X***************
  1537. X*** 350,364 ****
  1538. X  set a050 substr(a049, 2)
  1539. X  a049 => 21
  1540. X  substr(21, 2) => Type mismatch
  1541. X! ./test.rem(178): Type mismatch
  1542. X  set a051 substr(a050, 2, 6)
  1543. X! a050 => ./test.rem(179): Undefined variable: a050
  1544. X  set a052 time(1+2, 3+4)
  1545. X  1 + 2 => 3
  1546. X  3 + 4 => 7
  1547. X  time(3, 7) => 03:07
  1548. X  rem 10 jan 1992 AT 11:22 CAL
  1549. X! ./test.rem(181): Trig = Friday, 10 January, 1992
  1550. X  set a053 trigdate()
  1551. X  trigdate() => 1992/01/10
  1552. X  set a054 trigtime()
  1553. X--- 610,624 ----
  1554. X  set a050 substr(a049, 2)
  1555. X  a049 => 21
  1556. X  substr(21, 2) => Type mismatch
  1557. X! ./test.rem(214): Type mismatch
  1558. X  set a051 substr(a050, 2, 6)
  1559. X! a050 => ./test.rem(215): Undefined variable: a050
  1560. X  set a052 time(1+2, 3+4)
  1561. X  1 + 2 => 3
  1562. X  3 + 4 => 7
  1563. X  time(3, 7) => 03:07
  1564. X  rem 10 jan 1992 AT 11:22 CAL
  1565. X! ./test.rem(217): Trig = Friday, 10 January, 1992
  1566. X  set a053 trigdate()
  1567. X  trigdate() => 1992/01/10
  1568. X  set a054 trigtime()
  1569. X***************
  1570. X*** 371,377 ****
  1571. X  "a05" + "6" => "a056"
  1572. X  value("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH"
  1573. X  set a058 version()
  1574. X! version() => "03.00.04"
  1575. X  set a059 wkday(today())
  1576. X  today() => 1991/02/16
  1577. X  wkday(1991/02/16) => "Saturday"
  1578. X--- 631,637 ----
  1579. X  "a05" + "6" => "a056"
  1580. X  value("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH"
  1581. X  set a058 version()
  1582. X! version() => "03.00.05"
  1583. X  set a059 wkday(today())
  1584. X  today() => 1991/02/16
  1585. X  wkday(1991/02/16) => "Saturday"
  1586. X***************
  1587. X*** 450,456 ****
  1588. X  x => "foo"
  1589. X  y => 11:33
  1590. X  "foo" * 11:33 => Type mismatch
  1591. X! ./test.rem(204): Operator '*' Type mismatch
  1592. X  Leaving UserFN h() => Type mismatch
  1593. X  
  1594. X      Variable  Value
  1595. X--- 710,716 ----
  1596. X  x => "foo"
  1597. X  y => 11:33
  1598. X  "foo" * 11:33 => Type mismatch
  1599. X! ./test.rem(240): Operator '*' Type mismatch
  1600. X  Leaving UserFN h() => Type mismatch
  1601. X  
  1602. X      Variable  Value
  1603. X***************
  1604. X*** 475,481 ****
  1605. X          a048  "foo"
  1606. X          a067  "INT"
  1607. X          a039  "February"
  1608. X!         a058  "03.00.04"
  1609. X          a049  21
  1610. X          a068  "STRING"
  1611. X          a059  "Saturday"
  1612. X--- 735,741 ----
  1613. X          a048  "foo"
  1614. X          a067  "INT"
  1615. X          a039  "February"
  1616. X!         a058  "03.00.05"
  1617. X          a049  21
  1618. X          a068  "STRING"
  1619. X          a059  "Saturday"
  1620. X*** ../p4rel/test.rem    Wed Mar  3 17:01:45 1993
  1621. X--- ./test.rem    Thu Apr 22 10:24:19 1993
  1622. X***************
  1623. X*** 5,10 ****
  1624. X--- 5,46 ----
  1625. X  #
  1626. X  #     ./test-rem  # From WITHIN Remind source directory!
  1627. X  
  1628. X+ REM MSG Today is [hebday(today())] [hebmon(today())] [hebyear(today())]
  1629. X+ fset _h(x, y) trigger(hebdate(x,y))
  1630. X+ 
  1631. X+ [_h(1,  "Tishrey")] MSG Rosh Hashana 1
  1632. X+ [_h(2,  "Tishrey")] MSG Rosh Hashana 2
  1633. X+ [_h(3,  "Tishrey")] MSG Tzom Gedalia
  1634. X+ [_h(10, "Tishrey")] MSG Yom Kippur
  1635. X+ [_h(15, "Tishrey")] MSG Sukkot 1
  1636. X+ [_h(25, "Kislev")]  MSG Channuka
  1637. X+ [_h(10, "Tevet")]   MSG Asara B'Tevet
  1638. X+ [_h(15, "Shvat")]   MSG Tu B'Shvat
  1639. X+ [_h(15, "Adar A")]  MSG Purim Katan
  1640. X+ [_h(14, "Adar")]    MSG Purim
  1641. X+ [_h(15, "Nisan")]   MSG Pesach
  1642. X+ [_h(27, "Nisan")]   MSG Yom HaShoah
  1643. X+ [_h(4,  "Iyar")]    MSG Yom HaZikaron
  1644. X+ [_h(5,  "Iyar")]    MSG Yom Ha'atzmaut
  1645. X+ [_h(28, "Iyar")]    MSG Yom Yerushalayim
  1646. X+ [_h(6,  "Sivan")]   MSG Shavuot
  1647. X+ [_h(9,  "Av")]      MSG Tish'a B'Av
  1648. X+ 
  1649. X+ # Test some jahrzeit cases
  1650. X+ fset _i(x,y,z,a) trigger(hebdate(x,y,z,a))
  1651. X+ [_i(30, "Heshvan", today(), 5759)] MSG Complete-Complete
  1652. X+ [_i(30, "Heshvan", today(), 5760)] MSG Complete-Defective
  1653. X+ [_i(30, "Heshvan", today(), 5761)] MSG Illegal
  1654. X+ 
  1655. X+ [_i(30, "Kislev", today(), 5759)] MSG Complete-Complete
  1656. X+ [_i(30, "Kislev", today(), 5760)] MSG Complete-Defective
  1657. X+ [_i(30, "Kislev", today(), 5761)] MSG Illegal
  1658. X+ 
  1659. X+ [_i(30, "Adar A", today(), 5755)] MSG Leap
  1660. X+ [_i(30, "Adar A", today(), 5756)] MSG Illegal
  1661. X+ [_i(29, "Adar A", today(), 5755)] MSG Leap
  1662. X+ [_i(29, "Adar A", today(), 5756)] MSG Illegal
  1663. X+ 
  1664. X  # Test each possible case of the basic reminders.
  1665. X  
  1666. X  REM MSG Every Day
  1667. X*** ../p4rel/token.c    Tue Mar  2 12:10:53 1993
  1668. X--- ./token.c    Thu Apr 22 10:59:12 1993
  1669. X***************
  1670. X*** 188,194 ****
  1671. X     }
  1672. X  
  1673. X     /* Quickly give up the search if first char not a letter */
  1674. X!    if ( ! ((*s >= 'A' && *s <= 'Z') || (*s >= 'a' && *s <= 'z')) ) {
  1675. X        FindNumericToken(s, tok);
  1676. X        return;
  1677. X     }
  1678. X--- 188,194 ----
  1679. X     }
  1680. X  
  1681. X     /* Quickly give up the search if first char not a letter */
  1682. X!    if ( ! isalpha(*s)) {
  1683. X        FindNumericToken(s, tok);
  1684. X        return;
  1685. X     }
  1686. X*** ../p4rel/utils.c    Thu Feb 18 13:28:38 1993
  1687. X--- ./utils.c    Thu Apr 22 10:24:22 1993
  1688. X***************
  1689. X*** 183,189 ****
  1690. X  /*                                                             */
  1691. X  /***************************************************************/
  1692. X  #ifdef HAVE_PROTOS
  1693. X! PUBLIC int StrCmpi(char *s1, char *s2)
  1694. X  #else
  1695. X  int StrCmpi(s1, s2)
  1696. X  char *s1, *s2;
  1697. X--- 183,189 ----
  1698. X  /*                                                             */
  1699. X  /***************************************************************/
  1700. X  #ifdef HAVE_PROTOS
  1701. X! PUBLIC int StrCmpi(const char *s1, const char *s2)
  1702. X  #else
  1703. X  int StrCmpi(s1, s2)
  1704. X  char *s1, *s2;
  1705. END_OF_FILE
  1706.   if test 53816 -ne `wc -c <'patch.05.B'`; then
  1707.     echo shar: \"'patch.05.B'\" unpacked with wrong size!
  1708.   elif test -f 'patch.05.A' ; then 
  1709.     echo shar: Combining  \"'patch.05'\" \(106166 characters\) 
  1710.     cat 'patch.05.A' 'patch.05.B' > 'patch.05' 
  1711.     if test 106166 -ne `wc -c <'patch.05'`; then 
  1712.       echo shar: \"'patch.05'\" combined with wrong size! 
  1713.     else 
  1714.       rm patch.05.A patch.05.B
  1715.     fi 
  1716.   fi
  1717.   # end of 'patch.05.B'
  1718. fi
  1719. echo shar: End of archive 1 \(of 3\).
  1720. cp /dev/null ark1isdone
  1721. MISSING=""
  1722. for I in 1 2 3 ; do
  1723.     if test ! -f ark${I}isdone ; then
  1724.     MISSING="${MISSING} ${I}"
  1725.     fi
  1726. done
  1727. if test "${MISSING}" = "" ; then
  1728.     echo You have unpacked all 3 archives.
  1729.     rm -f ark[1-9]isdone
  1730. else
  1731.     echo You still must unpack the following archives:
  1732.     echo "        " ${MISSING}
  1733. fi
  1734. exit 0
  1735. exit 0 # Just in case...
  1736.