home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume42 / remind / patch13b < prev    next >
Encoding:
Internet Message Format  |  1994-05-06  |  44.1 KB

  1. From: dfs@doe.carleton.ca (David F. Skoll)
  2. Newsgroups: comp.sources.misc
  3. Subject: v42i065:  remind - A replacement for calendar, Patch13b/3
  4. Date: 6 May 1994 12:27:37 -0500
  5. Organization: Carleton University
  6. Sender: kent@sparky.sterling.com
  7. Approved: kent@sparky.sterling.com
  8. Message-ID: <2qdum9$itm@sparky.sterling.com>
  9. X-Md4-Signature: 4c86bb635aafc36341faac359d44ca59
  10.  
  11. Submitted-by: dfs@doe.carleton.ca (David F. Skoll)
  12. Posting-number: Volume 42, Issue 65
  13. Archive-name: remind/patch13b
  14. Environment: UNIX, MS-DOS, OS/2
  15. Patch-To: remind: Volume 33, Issue 58-69
  16.  
  17. #!/bin/sh
  18. # this is Shar.02 (part 2 of Remind-3.0/Patch-13/part)
  19. # do not concatenate these parts, unpack them in order with /bin/sh
  20. # file patch.13 continued
  21. #
  22. if touch 2>&1 | fgrep 'amc' > /dev/null
  23.  then TOUCH=touch
  24.  else TOUCH=true
  25. fi
  26. if test ! -r shar3_seq_.tmp; then
  27.     echo "Please unpack part 1 first!"
  28.     exit 1
  29. fi
  30. (read Scheck
  31.  if test "$Scheck" != 2; then
  32.     echo "Please unpack part $Scheck next!"
  33.     exit 1
  34.  else
  35.     exit 0
  36.  fi
  37. ) < shar3_seq_.tmp || exit 1
  38. echo "x - Continuing file patch.13"
  39. sed 's/^X//' << 'SHAR_EOF' >> patch.13 &&
  40. X! /*  Copyright (C) 1992, 1993 by David F. Skoll.                */
  41. X  /*                                                             */
  42. X  /***************************************************************/
  43. X  #ifdef MK_GLOBALS
  44. X--- 7,13 ----
  45. X  /*  MK_GLOBALS.  Also contains useful macro definitions.       */
  46. X  /*                                                             */
  47. X  /*  This file is part of REMIND.                               */
  48. X! /*  Copyright (C) 1992, 1993, 1994 by David F. Skoll.          */
  49. X  /*                                                             */
  50. X  /***************************************************************/
  51. X  #ifdef MK_GLOBALS
  52. X***************
  53. X*** 56,61 ****
  54. X--- 56,62 ----
  55. X  EXTERN  INIT(   int     SortByDate, 0);
  56. X  EXTERN    INIT(    int    SortByPrio, 0);
  57. X  EXTERN    INIT(    int    DefaultPrio, NO_PRIORITY);
  58. X+ EXTERN  INIT(   long    SysTime, -1L);
  59. X  
  60. X  EXTERN    char    *InitialFile;
  61. X  EXTERN    int    FileAccessDate;
  62. X*** ../prev/hbcal.c    Tue Oct 12 16:22:43 1993
  63. X--- ./hbcal.c    Mon Jan 31 16:53:22 1994
  64. X***************
  65. X*** 5,11 ****
  66. X  /*  Support for the Hebrew calendar                            */
  67. X  /*                                                             */
  68. X  /*  This file is part of REMIND.                               */
  69. X! /*  Copyright (C) 1992, 1993 by David F. Skoll.                */
  70. X  /*                                                             */
  71. X  /*  Derived from code written by Amos Shapir in 1978; revised  */
  72. X  /*  1985.                                                      */
  73. X--- 5,11 ----
  74. X  /*  Support for the Hebrew calendar                            */
  75. X  /*                                                             */
  76. X  /*  This file is part of REMIND.                               */
  77. X! /*  Copyright (C) 1992, 1993, 1994 by David F. Skoll.          */
  78. X  /*                                                             */
  79. X  /*  Derived from code written by Amos Shapir in 1978; revised  */
  80. X  /*  1985.                                                      */
  81. X*** ../prev/init.c    Mon Nov 15 14:25:30 1993
  82. X--- ./init.c    Wed Apr  6 17:09:40 1994
  83. X***************
  84. X*** 7,13 ****
  85. X  /*  in normal mode.                                            */
  86. X  /*                                                             */
  87. X  /*  This file is part of REMIND.                               */
  88. X! /*  Copyright (C) 1992, 1993 by David F. Skoll.                */
  89. X  /*                                                             */
  90. X  /***************************************************************/
  91. X  #define L_IN_INIT 1
  92. X--- 7,13 ----
  93. X  /*  in normal mode.                                            */
  94. X  /*                                                             */
  95. X  /*  This file is part of REMIND.                               */
  96. X! /*  Copyright (C) 1992, 1993, 1994 by David F. Skoll.          */
  97. X  /*                                                             */
  98. X  /***************************************************************/
  99. X  #define L_IN_INIT 1
  100. X***************
  101. X*** 162,167 ****
  102. X--- 162,168 ----
  103. X             NextMode = 1;
  104. X  #ifdef HAVE_QUEUED
  105. X             DontQueue = 1;
  106. X+            Daemon = 0;
  107. X  #endif
  108. X             break;
  109. X  
  110. X***************
  111. X*** 362,367 ****
  112. X--- 363,379 ----
  113. X           arg = argv[i++];
  114. X           FindToken(arg, &tok);
  115. X       switch (tok.type) {
  116. X+         case T_Time:
  117. X+            if (SysTime != -1L) Usage();
  118. X+            else {
  119. X+           SysTime = (long) tok.val * 60L;
  120. X+ #ifdef HAVE_QUEUED
  121. X+           DontQueue = 1;
  122. X+           Daemon = 0;
  123. X+ #endif
  124. X+            }
  125. X+            break;
  126. X+ 
  127. X          case T_Month:
  128. X             if (m != NO_MON) Usage();
  129. X             else m = tok.val;
  130. X***************
  131. X*** 378,384 ****
  132. X             break;
  133. X  
  134. X          case T_Rep:
  135. X!            rep = tok.val;
  136. X             break;
  137. X  
  138. X          default: Usage();
  139. X--- 390,397 ----
  140. X             break;
  141. X  
  142. X          case T_Rep:
  143. X!            if (rep != NO_REP) Usage();
  144. X!            else rep = tok.val;
  145. X             break;
  146. X  
  147. X          default: Usage();
  148. X***************
  149. X*** 392,425 ****
  150. X        }
  151. X  
  152. X  /* Must supply date in the form:  day, mon, yr OR mon, yr */
  153. X!       if (m == NO_MON || y == NO_YR) {
  154. X!          if (rep == NO_REP) Usage();
  155. X!      else if (m != NO_MON || y != NO_YR) Usage();
  156. X!      else {
  157. X!         m = CurMon;
  158. X!         y = CurYear;
  159. X!         if (d == NO_DAY) d = CurDay;
  160. X!          }
  161. X        }
  162. X-       if (d == NO_DAY) d=1;
  163. X-       if (d > DaysInMonth(m, y)) {
  164. X-          fprintf(ErrFp, BadDate);
  165. X-      Usage();
  166. X-       }
  167. X-       JulianToday = Julian(y, m, d);
  168. X-       if (JulianToday == -1) {
  169. X-          fprintf(ErrFp, BadDate);
  170. X-      Usage();
  171. X-       }
  172. X-       CurYear = y;
  173. X-       CurMon = m;
  174. X-       CurDay = d;
  175. X-       if (JulianToday != RealToday) IgnoreOnce = 1;
  176. X  
  177. X     }
  178. X  /* Figure out the offset from UTC */
  179. X     if (CalculateUTC)
  180. X!       (void) CalcMinsFromUTC(JulianToday, SystemTime()/60,
  181. X                   &MinsFromUTC, NULL);
  182. X  }
  183. X  
  184. X--- 405,440 ----
  185. X        }
  186. X  
  187. X  /* Must supply date in the form:  day, mon, yr OR mon, yr */
  188. X!       if (m != NO_MON || y != NO_YR || d != NO_DAY) {
  189. X!      if (m == NO_MON || y == NO_YR) {
  190. X!         if (rep == NO_REP) Usage();
  191. X!         else if (m != NO_MON || y != NO_YR) Usage();
  192. X!         else {
  193. X!            m = CurMon;
  194. X!            y = CurYear;
  195. X!            if (d == NO_DAY) d = CurDay;
  196. X!         }
  197. X!      }
  198. X!      if (d == NO_DAY) d=1;
  199. X!      if (d > DaysInMonth(m, y)) {
  200. X!         fprintf(ErrFp, BadDate);
  201. X!         Usage();
  202. X!      }
  203. X!      JulianToday = Julian(y, m, d);
  204. X!      if (JulianToday == -1) {
  205. X!         fprintf(ErrFp, BadDate);
  206. X!         Usage();
  207. X!      }
  208. X!      CurYear = y;
  209. X!      CurMon = m;
  210. X!      CurDay = d;
  211. X!      if (JulianToday != RealToday) IgnoreOnce = 1;
  212. X        }
  213. X  
  214. X     }
  215. X  /* Figure out the offset from UTC */
  216. X     if (CalculateUTC)
  217. X!       (void) CalcMinsFromUTC(JulianToday, SystemTime(1)/60,
  218. X                   &MinsFromUTC, NULL);
  219. X  }
  220. X  
  221. X***************
  222. X*** 437,447 ****
  223. X  void Usage()
  224. X  #endif /* HAVE_PROTOS */
  225. X  {
  226. X!    fprintf(ErrFp, "\nREMIND %s (%s version) Copyright 1992, 1993 by David F. Skoll\n", VERSION, L_LANGNAME);
  227. X  #ifdef BETA
  228. X     fprintf(ErrFp, ">>>> BETA VERSION <<<<\n");
  229. X  #endif
  230. X!    fprintf(ErrFp, "Usage: remind [options] filename [date] [*rep]\n");
  231. X     fprintf(ErrFp, "Options:\n");
  232. X     fprintf(ErrFp, " -n     Output next occurrence of reminders in simple format\n");
  233. X     fprintf(ErrFp, " -r     Disable RUN directives\n");
  234. X--- 452,462 ----
  235. X  void Usage()
  236. X  #endif /* HAVE_PROTOS */
  237. X  {
  238. X!    fprintf(ErrFp, "\nREMIND %s (%s version) Copyright 1992-1994 by David F. Skoll\n", VERSION, L_LANGNAME);
  239. X  #ifdef BETA
  240. X     fprintf(ErrFp, ">>>> BETA VERSION <<<<\n");
  241. X  #endif
  242. X!    fprintf(ErrFp, "Usage: remind [options] filename [date] [time] [*rep]\n");
  243. X     fprintf(ErrFp, "Options:\n");
  244. X     fprintf(ErrFp, " -n     Output next occurrence of reminders in simple format\n");
  245. X     fprintf(ErrFp, " -r     Disable RUN directives\n");
  246. X*** ../prev/lang.h    Mon Jan 31 10:37:10 1994
  247. X--- ./lang.h    Mon Jan 31 16:53:00 1994
  248. X***************
  249. X*** 5,11 ****
  250. X  /*  Header file for language support for various languages.    */
  251. X  /*                                                             */
  252. X  /*  This file is part of REMIND.                               */
  253. X! /*  Copyright (C) 1992, 1993 by David F. Skoll.                */
  254. X  /*                                                             */
  255. X  /***************************************************************/
  256. X  
  257. X--- 5,11 ----
  258. X  /*  Header file for language support for various languages.    */
  259. X  /*                                                             */
  260. X  /*  This file is part of REMIND.                               */
  261. X! /*  Copyright (C) 1992, 1993, 1994 by David F. Skoll.          */
  262. X  /*                                                             */
  263. X  /***************************************************************/
  264. X  
  265. X*** ../prev/main.c    Mon Jan 31 10:34:45 1994
  266. X--- ./main.c    Wed Apr  6 16:47:12 1994
  267. X***************
  268. X*** 6,12 ****
  269. X  /*  routines, etc.                                             */
  270. X  /*                                                             */
  271. X  /*  This file is part of REMIND.                               */
  272. X! /*  Copyright (C) 1992, 1993 by David F. Skoll.                */
  273. X  /*                                                             */
  274. X  /***************************************************************/
  275. X  #include "config.h"
  276. X--- 6,12 ----
  277. X  /*  routines, etc.                                             */
  278. X  /*                                                             */
  279. X  /*  This file is part of REMIND.                               */
  280. X! /*  Copyright (C) 1992, 1993, 1994 by David F. Skoll.          */
  281. X  /*                                                             */
  282. X  /***************************************************************/
  283. X  #include "config.h"
  284. X***************
  285. X*** 107,113 ****
  286. X  
  287. X        if (!Hush) {
  288. X           if (DestroyOmitContexts())
  289. X!          Eprint("%s", E_PUSH_NOPOP);
  290. X  #ifdef HAVE_QUEUED
  291. X           if (!Daemon && !NextMode && !NumTriggered && !NumQueued) printf("%s\n", ErrMsg[E_NOREMINDERS]);
  292. X        else
  293. X--- 107,113 ----
  294. X  
  295. X        if (!Hush) {
  296. X           if (DestroyOmitContexts())
  297. X!          Eprint("%s", ErrMsg[E_PUSH_NOPOP]);
  298. X  #ifdef HAVE_QUEUED
  299. X           if (!Daemon && !NextMode && !NumTriggered && !NumQueued) printf("%s\n", ErrMsg[E_NOREMINDERS]);
  300. X        else
  301. X***************
  302. X*** 708,716 ****
  303. X  /*                                                             */
  304. X  /***************************************************************/
  305. X  #ifdef HAVE_PROTOS
  306. X! PUBLIC long SystemTime(void)
  307. X  #else
  308. X! long SystemTime()
  309. X  #endif
  310. X  {
  311. X  #if defined( __MSDOS__ ) && defined( __TURBOC__ )
  312. X--- 708,717 ----
  313. X  /*                                                             */
  314. X  /***************************************************************/
  315. X  #ifdef HAVE_PROTOS
  316. X! PUBLIC long SystemTime(int realtime)
  317. X  #else
  318. X! long SystemTime(realtime)
  319. X! int realtime;
  320. X  #endif
  321. X  {
  322. X  #if defined( __MSDOS__ ) && defined( __TURBOC__ )
  323. X***************
  324. X*** 718,731 ****
  325. X  
  326. X     struct time t;
  327. X  
  328. X     gettime(&t);
  329. X     return (long) t.ti_hour * 3600L + (long) t.ti_min * 60L +
  330. X        (long) t.ti_sec;
  331. X  #else
  332. X  /* Get time in Unix or with MSC */
  333. X!   time_t tloc;
  334. X!   struct tm *t;
  335. X  
  336. X     (void) time(&tloc);
  337. X     t = localtime(&tloc);
  338. X     return (long) t->tm_hour * 3600L + (long) t->tm_min * 60L +
  339. X--- 719,737 ----
  340. X  
  341. X     struct time t;
  342. X  
  343. X+ /* If time was supplied on command line, return it. */
  344. X+    if (!realtime && (SysTime != -1L)) return SysTime;
  345. X+ 
  346. X     gettime(&t);
  347. X     return (long) t.ti_hour * 3600L + (long) t.ti_min * 60L +
  348. X        (long) t.ti_sec;
  349. X  #else
  350. X  /* Get time in Unix or with MSC */
  351. X!    time_t tloc;
  352. X!    struct tm *t;
  353. X  
  354. X+    if (!realtime && (SysTime != -1L)) return SysTime;
  355. X+ 
  356. X     (void) time(&tloc);
  357. X     t = localtime(&tloc);
  358. X     return (long) t->tm_hour * 3600L + (long) t->tm_min * 60L +
  359. X***************
  360. X*** 1149,1155 ****
  361. X     char *s;
  362. X  
  363. X     t.typ = MSG_TYPE;
  364. X!    tt.ttime = SystemTime() / 60;
  365. X     if ( (r=DoSubst(p, SubstBuffer, &t, &tt, JulianToday, NORMAL_MODE)) )
  366. X        return r;
  367. X     s = SubstBuffer;
  368. X--- 1155,1161 ----
  369. X     char *s;
  370. X  
  371. X     t.typ = MSG_TYPE;
  372. X!    tt.ttime = SystemTime(0) / 60;
  373. X     if ( (r=DoSubst(p, SubstBuffer, &t, &tt, JulianToday, NORMAL_MODE)) )
  374. X        return r;
  375. X     s = SubstBuffer;
  376. X*** ../prev/makefile.bcc    Mon Jan 31 10:41:07 1994
  377. X--- ./makefile.bcc    Mon Jan 31 16:48:22 1994
  378. X***************
  379. X*** 1,6 ****
  380. X  # Makefile for REMIND for Borland C++
  381. X  
  382. X! VERSION= 03.00.12
  383. X  
  384. X  MODEL=l
  385. X  
  386. X--- 1,6 ----
  387. X  # Makefile for REMIND for Borland C++
  388. X  
  389. X! VERSION= 03.00.13
  390. X  
  391. X  MODEL=l
  392. X  
  393. X*** ../prev/makefile.tc    Mon Jan 31 10:40:39 1994
  394. X--- ./makefile.tc    Mon Jan 31 16:48:13 1994
  395. X***************
  396. X*** 1,7 ****
  397. X  # Makefile for REMIND for Turbo C for MSDOS
  398. X  
  399. X  CC= tcc
  400. X! VERSION= 03.00.12
  401. X  
  402. X  HDRS= config.h err.h expr.h globals.h protos.h types.h version.h \
  403. X  lang.h english.h german.h dutch.h finnish.h french.h norwgian.h \
  404. X--- 1,7 ----
  405. X  # Makefile for REMIND for Turbo C for MSDOS
  406. X  
  407. X  CC= tcc
  408. X! VERSION= 03.00.13
  409. X  
  410. X  HDRS= config.h err.h expr.h globals.h protos.h types.h version.h \
  411. X  lang.h english.h german.h dutch.h finnish.h french.h norwgian.h \
  412. X*** ../prev/moon.c    Mon Jan 31 10:29:38 1994
  413. X--- ./moon.c    Mon Jan 31 17:03:20 1994
  414. X***************
  415. X*** 5,11 ****
  416. X  /*  Calculations for figuring out moon phases.                 */
  417. X  /*                                                             */
  418. X  /*  This file is part of REMIND.                               */
  419. X! /*  Copyright (C) 1992, 1993 by David F. Skoll.                */
  420. X  /*                                                             */
  421. X  /***************************************************************/
  422. X  
  423. X--- 5,11 ----
  424. X  /*  Calculations for figuring out moon phases.                 */
  425. X  /*                                                             */
  426. X  /*  This file is part of REMIND.                               */
  427. X! /*  Copyright (C) 1992, 1993, 1994 by David F. Skoll           */
  428. X  /*                                                             */
  429. X  /***************************************************************/
  430. X  
  431. X*** ../prev/norwgian.h    Tue Oct 12 16:22:49 1993
  432. X--- ./norwgian.h    Mon Jan 31 17:03:14 1994
  433. X***************
  434. X*** 6,11 ****
  435. X--- 6,12 ----
  436. X  /*                                                             */
  437. X  /*  This file is part of REMIND.                               */
  438. X  /*  This file is Copyright (C) 1993 by Trygve Randen.          */
  439. X+ /*  Remind is Copyright (C) 1992, 1993, 1994 by David F. Skoll */
  440. X  /*                                                             */
  441. X  /***************************************************************/
  442. X  
  443. X*** ../prev/omit.c    Tue Oct 12 16:22:49 1993
  444. X--- ./omit.c    Mon Jan 31 17:02:47 1994
  445. X***************
  446. X*** 6,12 ****
  447. X  /*  the data structures for OMITted dates.                     */
  448. X  /*                                                             */
  449. X  /*  This file is part of REMIND.                               */
  450. X! /*  Copyright (C) 1992, 1993 by David F. Skoll.                */
  451. X  /*                                                             */
  452. X  /***************************************************************/
  453. X  #include "config.h"
  454. X--- 6,12 ----
  455. X  /*  the data structures for OMITted dates.                     */
  456. X  /*                                                             */
  457. X  /*  This file is part of REMIND.                               */
  458. X! /*  Copyright (C) 1992, 1993, 1994 by David F. Skoll           */
  459. X  /*                                                             */
  460. X  /***************************************************************/
  461. X  #include "config.h"
  462. X*** ../prev/os2func.c    Wed Nov 17 10:12:21 1993
  463. X--- ./os2func.c    Mon Jan 31 17:02:43 1994
  464. X***************
  465. X*** 7,13 ****
  466. X  /*  This file is part of REMIND.                               */
  467. X  /*                                                             */
  468. X  /*  This file is Copyright (C) 1993 by Russ Herman.            */
  469. X! /*  REMIND is Copyright (C) 1993 by David F. Skoll.            */
  470. X  /*                                                             */
  471. X  /***************************************************************/
  472. X  #ifdef OS2_POPUP
  473. X--- 7,13 ----
  474. X  /*  This file is part of REMIND.                               */
  475. X  /*                                                             */
  476. X  /*  This file is Copyright (C) 1993 by Russ Herman.            */
  477. X! /*  REMIND is Copyright (C) 1993, 1994 by David F. Skoll       */
  478. X  /*                                                             */
  479. X  /***************************************************************/
  480. X  #ifdef OS2_POPUP
  481. X*** ../prev/polish.h    Mon Jan 31 10:39:33 1994
  482. X--- ./polish.h    Thu Apr  7 13:36:01 1994
  483. X***************
  484. X*** 396,407 ****
  485. X  void Usage()
  486. X  #endif /* HAVE_PROTOS */
  487. X  {
  488. X!    fprintf(ErrFp, "\nREMIND %s (%s version) Copyright 1992, 1993 by David F. Skoll\n", VERSION, L_LANGNAME);
  489. X  #ifdef BETA
  490. X     fprintf(ErrFp, ">>>> BETA VERSION <<<<\n");
  491. X  #endif
  492. X  #ifdef ISOLATIN1
  493. X!    fprintf(ErrFp, "\nSpos\363b u\277ycia: remind [opcje] plik [data] [*powt\363rzenie]\n");
  494. X     fprintf(ErrFp, "Opcje:\n");
  495. X     fprintf(ErrFp, " -n     Wypisz nast\352pne przypomnienia w prostym formacie\n");
  496. X     fprintf(ErrFp, " -r     Zablokuj dyrektywy RUN\n");
  497. X--- 396,407 ----
  498. X  void Usage()
  499. X  #endif /* HAVE_PROTOS */
  500. X  {
  501. X!    fprintf(ErrFp, "\nREMIND %s (%s version) Copyright 1992-1994 by David F. Skoll\n", VERSION, L_LANGNAME);
  502. X  #ifdef BETA
  503. X     fprintf(ErrFp, ">>>> BETA VERSION <<<<\n");
  504. X  #endif
  505. X  #ifdef ISOLATIN1
  506. X!    fprintf(ErrFp, "\nSpos\363b u\277ycia: remind [opcje] plik [data] [czas] [*powt\363rzenie]\n");
  507. X     fprintf(ErrFp, "Opcje:\n");
  508. X     fprintf(ErrFp, " -n     Wypisz nast\352pne przypomnienia w prostym formacie\n");
  509. X     fprintf(ErrFp, " -r     Zablokuj dyrektywy RUN\n");
  510. X***************
  511. X*** 429,435 ****
  512. X     fprintf(ErrFp, " -ivar=val Zainicjuj zmienn\261 var warto\266cia val i zachowaj ja\n");
  513. X     fprintf(ErrFp, " -m     Rozpocznij kalendarz od poniedzia\263ku zamiast od niedzieli\n");
  514. X  #else /* ISOLATIN1 */
  515. X!    fprintf(ErrFp, "\nSposob uzycia: remind [opcje] plik [data] [*powtorzenie]\n");
  516. X     fprintf(ErrFp, "Opcje:\n");
  517. X     fprintf(ErrFp, " -n     Wypisz nastepne przypomnienia w prostym formacie\n");
  518. X     fprintf(ErrFp, " -r     Zablokuj dyrektywy RUN\n");
  519. X--- 429,435 ----
  520. X     fprintf(ErrFp, " -ivar=val Zainicjuj zmienn\261 var warto\266cia val i zachowaj ja\n");
  521. X     fprintf(ErrFp, " -m     Rozpocznij kalendarz od poniedzia\263ku zamiast od niedzieli\n");
  522. X  #else /* ISOLATIN1 */
  523. X!    fprintf(ErrFp, "\nSposob uzycia: remind [opcje] plik [data] [czas] [*powtorzenie]\n");
  524. X     fprintf(ErrFp, "Opcje:\n");
  525. X     fprintf(ErrFp, " -n     Wypisz nastepne przypomnienia w prostym formacie\n");
  526. X     fprintf(ErrFp, " -r     Zablokuj dyrektywy RUN\n");
  527. X*** ../prev/protos.h    Mon Jan 31 10:35:37 1994
  528. X--- ./protos.h    Wed Apr  6 16:46:17 1994
  529. X***************
  530. X*** 5,11 ****
  531. X  /*  Function Prototypes.                                       */
  532. X  /*                                                             */
  533. X  /*  This file is part of REMIND.                               */
  534. X! /*  Copyright (C) 1992, 1993 by David F. Skoll.                */
  535. X  /*                                                             */
  536. X  /***************************************************************/
  537. X  #ifdef HAVE_PROTOS
  538. X--- 5,11 ----
  539. X  /*  Function Prototypes.                                       */
  540. X  /*                                                             */
  541. X  /*  This file is part of REMIND.                               */
  542. X! /*  Copyright (C) 1992, 1993, 1994 by David F. Skoll           */
  543. X  /*                                                             */
  544. X  /***************************************************************/
  545. X  #ifdef HAVE_PROTOS
  546. X***************
  547. X*** 43,49 ****
  548. X  int DoSubstFromString ARGS ((char *source, char *dest, int jul, int tim));
  549. X  int EvalExpr ARGS ((char **e, Value *v));
  550. X  int DoCoerce ARGS ((char type, Value *v));
  551. X- void DestroyValue ARGS ((Value *v));
  552. X  void PrintValue  ARGS ((Value *v, FILE *fp));
  553. X  int CopyValue ARGS ((Value *dest, const Value *src));
  554. X  int ReadLine ARGS ((void));
  555. X--- 43,48 ----
  556. X***************
  557. X*** 71,77 ****
  558. X  void CreateParser ARGS ((char *s, ParsePtr p));
  559. X  void DestroyParser ARGS ((ParsePtr p));
  560. X  void PushToken ARGS ((const char *tok));
  561. X! long SystemTime ARGS ((void));
  562. X  int SystemDate ARGS ((int *y, int *m, int *d));
  563. X  int DoIf ARGS ((ParsePtr p));
  564. X  int DoElse ARGS ((ParsePtr p));
  565. X--- 70,76 ----
  566. X  void CreateParser ARGS ((char *s, ParsePtr p));
  567. X  void DestroyParser ARGS ((ParsePtr p));
  568. X  void PushToken ARGS ((const char *tok));
  569. X! long SystemTime ARGS ((int realtime));
  570. X  int SystemDate ARGS ((int *y, int *m, int *d));
  571. X  int DoIf ARGS ((ParsePtr p));
  572. X  int DoElse ARGS ((ParsePtr p));
  573. X***************
  574. X*** 113,118 ****
  575. X--- 112,118 ----
  576. X  int PreserveVar ARGS ((char *name));
  577. X  int DoPreserve  ARGS ((Parser *p));
  578. X  int DoSatRemind ARGS ((Trigger *trig, TimeTrig *tim, ParsePtr p));
  579. X+ void DoMsgCommand ARGS ((char *cmd, char *msg));
  580. X  int ParseNonSpaceChar ARGS ((ParsePtr p, int *err, int peek));
  581. X  unsigned int HashVal ARGS ((const char *str));
  582. X  int DateOK ARGS ((int y, int m, int d));
  583. X*** ../prev/queue.c    Wed Nov 17 12:56:07 1993
  584. X--- ./queue.c    Wed Apr  6 16:45:51 1994
  585. X***************
  586. X*** 5,11 ****
  587. X  /*  Queue up reminders for subsequent execution.               */
  588. X  /*                                                             */
  589. X  /*  This file is part of REMIND.                               */
  590. X! /*  Copyright (C) 1992, 1993 by David F. Skoll.                */
  591. X  /*                                                             */
  592. X  /***************************************************************/
  593. X  #include "config.h"
  594. X--- 5,11 ----
  595. X  /*  Queue up reminders for subsequent execution.               */
  596. X  /*                                                             */
  597. X  /*  This file is part of REMIND.                               */
  598. X! /*  Copyright (C) 1992, 1993, 1994 by David F. Skoll           */
  599. X  /*                                                             */
  600. X  /***************************************************************/
  601. X  #include "config.h"
  602. X***************
  603. X*** 86,92 ****
  604. X     if (DontQueue ||
  605. X         tim->ttime == NO_TIME ||
  606. X         typ == CAL_TYPE ||
  607. X!        tim->ttime < SystemTime() / 60 ||
  608. X         ((typ == RUN_TYPE) && RunDisabled)) return OK;
  609. X  
  610. X     qelem = NEW(QueuedRem);
  611. X--- 86,92 ----
  612. X     if (DontQueue ||
  613. X         tim->ttime == NO_TIME ||
  614. X         typ == CAL_TYPE ||
  615. X!        tim->ttime < SystemTime(0) / 60 ||
  616. X         ((typ == RUN_TYPE) && RunDisabled)) return OK;
  617. X  
  618. X     qelem = NEW(QueuedRem);
  619. X***************
  620. X*** 157,163 ****
  621. X     /* Initialize the queue - initialize all the entries time of issue */
  622. X     
  623. X     while (q) {
  624. X!       q->tt.nexttime = (int) (SystemTime()/60 - 1);
  625. X        q->tt.nexttime = CalculateNextTime(q);
  626. X        q = q->next;
  627. X     }
  628. X--- 157,163 ----
  629. X     /* Initialize the queue - initialize all the entries time of issue */
  630. X     
  631. X     while (q) {
  632. X!       q->tt.nexttime = (int) (SystemTime(0)/60 - 1);
  633. X        q->tt.nexttime = CalculateNextTime(q);
  634. X        q = q->next;
  635. X     }
  636. X***************
  637. X*** 178,184 ****
  638. X        if (Daemon && !q)
  639. X           TimeToSleep = (long) 60*Daemon;
  640. X        else
  641. X!          TimeToSleep = (long) q->tt.nexttime * 60L - SystemTime();
  642. X  
  643. X        while (TimeToSleep > 0L) {
  644. X           SleepTime = (unsigned) ((TimeToSleep > 30000L) ? 30000 : TimeToSleep);
  645. X--- 178,184 ----
  646. X        if (Daemon && !q)
  647. X           TimeToSleep = (long) 60*Daemon;
  648. X        else
  649. X!          TimeToSleep = (long) q->tt.nexttime * 60L - SystemTime(0);
  650. X  
  651. X        while (TimeToSleep > 0L) {
  652. X           SleepTime = (unsigned) ((TimeToSleep > 30000L) ? 30000 : TimeToSleep);
  653. X***************
  654. X*** 192,198 ****
  655. X       if (Daemon && !q)
  656. X          TimeToSleep = (long) 60*Daemon;
  657. X           else
  658. X!         TimeToSleep = (long) q->tt.nexttime * 60L - SystemTime();
  659. X        }
  660. X  
  661. X        /* Trigger the reminder */
  662. X--- 192,198 ----
  663. X       if (Daemon && !q)
  664. X          TimeToSleep = (long) 60*Daemon;
  665. X           else
  666. X!         TimeToSleep = (long) q->tt.nexttime * 60L - SystemTime(0);
  667. X        }
  668. X  
  669. X        /* Trigger the reminder */
  670. X*** ../prev/rem2ps.1    Tue Oct 12 16:22:50 1993
  671. X--- ./rem2ps.1    Wed Feb  2 11:28:54 1994
  672. X***************
  673. X*** 1,4 ****
  674. X! .TH REM2PS 1 "30 September 1993"
  675. X  .UC4
  676. X  .SH NAME
  677. X  rem2ps \- draw a PostScript calendar from Remind output
  678. X--- 1,4 ----
  679. X! .TH REM2PS 1 "2 February 1994"
  680. X  .UC4
  681. X  .SH NAME
  682. X  rem2ps \- draw a PostScript calendar from Remind output
  683. X***************
  684. X*** 9,14 ****
  685. X--- 9,18 ----
  686. X  \fBRemind\fR with the \fB\-p\fR option.  It emits PostScript code (which
  687. X  draws a calendar) to the standard output.
  688. X  .SH OPTIONS
  689. X+ .TP
  690. X+ .B \-v
  691. X+ Be more verbose.  This causes \fBRem2ps\fR to print progress messages
  692. X+ to the standard error stream.  Normally, it is silent.
  693. X  .TP
  694. X  .B \-n
  695. X  Produce a calendar whose first column is Monday (rather than Sunday.)
  696. X*** ../prev/rem2ps.c    Wed Oct 13 10:46:21 1993
  697. X--- ./rem2ps.c    Mon Apr 18 10:17:29 1994
  698. X***************
  699. X*** 5,11 ****
  700. X  /*  Print a PostScript calendar.                               */
  701. X  /*                                                             */
  702. X  /*  This file is part of REMIND.                               */
  703. X! /*  Copyright (C) 1992, 1993 by David F. Skoll.                */
  704. X  /*                                                             */
  705. X  /***************************************************************/
  706. X  #include "config.h"
  707. X--- 5,11 ----
  708. X  /*  Print a PostScript calendar.                               */
  709. X  /*                                                             */
  710. X  /*  This file is part of REMIND.                               */
  711. X! /*  Copyright (C) 1992, 1993, 1994 by David F. Skoll           */
  712. X  /*                                                             */
  713. X  /***************************************************************/
  714. X  #include "config.h"
  715. X***************
  716. X*** 17,22 ****
  717. X--- 17,23 ----
  718. X  #include <unistd.h>
  719. X  #endif
  720. X  #include "rem2ps.h"
  721. X+ #include "version.h"
  722. X  #ifdef HAVE_MALLOC_H
  723. X  #include <malloc.h>
  724. X  #endif
  725. X***************
  726. X*** 117,122 ****
  727. X--- 118,124 ----
  728. X  int MondayFirst;
  729. X  int LeftMarg, RightMarg, TopMarg, BotMarg;
  730. X  int FillPage;
  731. X+ int Verbose = 0;
  732. X  
  733. X  void Init ARGS ((int argc, char *argv[]));
  734. X  void Usage ARGS ((char *s));
  735. X***************
  736. X*** 153,170 ****
  737. X     while (!feof(stdin)) {
  738. X        gets(LineBuffer);
  739. X        if (!strcmp(LineBuffer, PSBEGIN)) {
  740. X!          if (!validfile) WriteProlog();
  741. X           validfile++;
  742. X           DoPsCal();
  743. X        }
  744. X     }
  745. X     if (!validfile) {
  746. X!       fprintf(stderr, "rem2ps: Couldn't find any calendar data - are you\n");
  747. X        fprintf(stderr, "        sure you fed me input produced by remind -p ...?\n");
  748. X        exit(1);
  749. X     }
  750. X     printf("%%%%Trailer\n");
  751. X     printf("%%%%Pages: %d\n", validfile);
  752. X     return 0;
  753. X  }
  754. X  
  755. X--- 155,179 ----
  756. X     while (!feof(stdin)) {
  757. X        gets(LineBuffer);
  758. X        if (!strcmp(LineBuffer, PSBEGIN)) {
  759. X!          if (!validfile) {
  760. X!         if (Verbose) {
  761. X!            fprintf(stderr, "Rem2PS: Version %s Copyright 1992-1994 by David F. Skoll\n\n", VERSION);
  762. X!            fprintf(stderr, "Generating PostScript calendar\n");
  763. X!         }
  764. X!         WriteProlog();
  765. X!          }
  766. X           validfile++;
  767. X           DoPsCal();
  768. X        }
  769. X     }
  770. X     if (!validfile) {
  771. X!       fprintf(stderr, "Rem2PS: Couldn't find any calendar data - are you\n");
  772. X        fprintf(stderr, "        sure you fed me input produced by remind -p ...?\n");
  773. X        exit(1);
  774. X     }
  775. X     printf("%%%%Trailer\n");
  776. X     printf("%%%%Pages: %d\n", validfile);
  777. X+    if (Verbose) fprintf(stderr, "Rem2PS: Done\n");
  778. X     return 0;
  779. X  }
  780. X  
  781. X***************
  782. X*** 185,194 ****
  783. X     int sfirst;
  784. X     int i;
  785. X     int is_ps;
  786. X     CalEntry *c, *d;
  787. X  
  788. X  /* Read the month and year name, followed by # days in month and 1st day of
  789. X!    month, followed by the MondayFirst flag */
  790. X     gets(LineBuffer);
  791. X     sscanf(LineBuffer, "%s %s %d %d", month, year, &days, &wkday);
  792. X     gets(LineBuffer);
  793. X--- 194,205 ----
  794. X     int sfirst;
  795. X     int i;
  796. X     int is_ps;
  797. X+    int firstcol;
  798. X+ 
  799. X     CalEntry *c, *d;
  800. X  
  801. X  /* Read the month and year name, followed by # days in month and 1st day of
  802. X!    month */
  803. X     gets(LineBuffer);
  804. X     sscanf(LineBuffer, "%s %s %d %d", month, year, &days, &wkday);
  805. X     gets(LineBuffer);
  806. X***************
  807. X*** 198,203 ****
  808. X--- 209,217 ----
  809. X     MaxDay = days;
  810. X     FirstWkDay = wkday;
  811. X  
  812. X+ /* Print a message for the user */
  813. X+    if (Verbose) fprintf(stderr, "        %s %s\n", month, year);
  814. X+ 
  815. X     printf("%%%%Page: %c%c%c%c%c %d\n", month[0], month[1], month[2],
  816. X               year[2], year[3], validfile);
  817. X  
  818. X***************
  819. X*** 206,218 ****
  820. X     printf("/SAVESTATE save def (%s) (%s) PreCal SAVESTATE restore\n", month, year);
  821. X     printf("(%s %s) doheading\n", month, year);
  822. X  
  823. X  /* Calculate the minimum box size */
  824. X     if (!FillPage) {
  825. X        printf("/MinBoxSize ytop MinY sub 7 div def\n");
  826. X     } else {
  827. X!       if ((days == 31 && wkday >= 5) || (days == 30 && wkday == 6))
  828. X           printf("/MinBoxSize ytop MinY sub 6 div def\n");
  829. X!       else if (days == 28 && wkday == 0 && NoSmallCal)
  830. X           printf("/MinBoxSize ytop MinY sub 4 div def\n");
  831. X        else
  832. X           printf("/MinBoxSize ytop MinY sub 5 div def\n");
  833. X--- 220,241 ----
  834. X     printf("/SAVESTATE save def (%s) (%s) PreCal SAVESTATE restore\n", month, year);
  835. X     printf("(%s %s) doheading\n", month, year);
  836. X  
  837. X+ /* Figure out the column of the first day in the calendar */
  838. X+ 
  839. X+    if (MondayFirst) {
  840. X+       firstcol = wkday-1;
  841. X+       if (firstcol < 0) firstcol = 6;
  842. X+    } else {
  843. X+       firstcol = wkday;
  844. X+    }
  845. X+ 
  846. X  /* Calculate the minimum box size */
  847. X     if (!FillPage) {
  848. X        printf("/MinBoxSize ytop MinY sub 7 div def\n");
  849. X     } else {
  850. X!       if ((days == 31 && firstcol >= 5) || (days == 30 && firstcol == 6))
  851. X           printf("/MinBoxSize ytop MinY sub 6 div def\n");
  852. X!       else if (days == 28 && firstcol == 0 && NoSmallCal)
  853. X           printf("/MinBoxSize ytop MinY sub 4 div def\n");
  854. X        else
  855. X           printf("/MinBoxSize ytop MinY sub 5 div def\n");
  856. X***************
  857. X*** 616,621 ****
  858. X--- 639,648 ----
  859. X              }
  860. X          break;
  861. X  
  862. X+      case 'v':
  863. X+         Verbose = 1;
  864. X+         break;
  865. X+ 
  866. X           case 'm':
  867. X          if (i == argc) Usage("Media must be supplied");
  868. X          t = argv[i++];
  869. X***************
  870. X*** 698,708 ****
  871. X  char *s;
  872. X  #endif
  873. X  {
  874. X!    if (s) fprintf(stderr, "\nrem2ps: %s\n\n", s);
  875. X  
  876. X     fprintf(stderr, "Rem2PS: Produce a PostScript calendar from output of Remind.\n\n");
  877. X     fprintf(stderr, "Usage: rem2ps [options]\n\n");
  878. X     fprintf(stderr, "Options:\n\n");
  879. X     fprintf(stderr, "-p file       Include user-supplied PostScript code in prologue\n");
  880. X     fprintf(stderr, "-l            Do calendar in landscape mode\n");
  881. X     fprintf(stderr, "-c[n]         Control small calendars: 0=none; 1=bt; 2=tb; 3=sbt\n");
  882. X--- 725,736 ----
  883. X  char *s;
  884. X  #endif
  885. X  {
  886. X!    if (s) fprintf(stderr, "Rem2PS: %s\n\n", s);
  887. X  
  888. X     fprintf(stderr, "Rem2PS: Produce a PostScript calendar from output of Remind.\n\n");
  889. X     fprintf(stderr, "Usage: rem2ps [options]\n\n");
  890. X     fprintf(stderr, "Options:\n\n");
  891. X+    fprintf(stderr, "-v            Print progress messages to standard error\n");
  892. X     fprintf(stderr, "-p file       Include user-supplied PostScript code in prologue\n");
  893. X     fprintf(stderr, "-l            Do calendar in landscape mode\n");
  894. X     fprintf(stderr, "-c[n]         Control small calendars: 0=none; 1=bt; 2=tb; 3=sbt\n");
  895. X*** ../prev/rem2ps.h    Tue Oct 12 16:22:50 1993
  896. X--- ./rem2ps.h    Mon Jan 31 17:02:22 1994
  897. X***************
  898. X*** 5,11 ****
  899. X  /*  Define the PostScript prologue                             */
  900. X  /*                                                             */
  901. X  /*  This file is part of REMIND.                               */
  902. X! /*  Copyright (C) 1992, 1993 by David F. Skoll.                */
  903. X  /*                                                             */
  904. X  /***************************************************************/
  905. X  
  906. X--- 5,11 ----
  907. X  /*  Define the PostScript prologue                             */
  908. X  /*                                                             */
  909. X  /*  This file is part of REMIND.                               */
  910. X! /*  Copyright (C) 1992, 1993, 1994 by David F. Skoll           */
  911. X  /*                                                             */
  912. X  /***************************************************************/
  913. X  
  914. X*** ../prev/remind-all.sh    Tue Oct 12 16:22:51 1993
  915. X--- ./remind-all.sh    Mon Jan 31 17:02:16 1994
  916. X***************
  917. X*** 2,8 ****
  918. X  
  919. X  # This file is part of REMIND
  920. X  #
  921. X! # REMIND is Copyright (C) 1992, 1993 by David F. Skoll
  922. X  # This file is Copyright (C) 1990 by Bill Aten
  923. X  
  924. X  # Thanks to Bill Aten for this script.
  925. X--- 2,8 ----
  926. X  
  927. X  # This file is part of REMIND
  928. X  #
  929. X! # REMIND is Copyright (C) 1992, 1993, 1994 by David F. Skoll
  930. X  # This file is Copyright (C) 1990 by Bill Aten
  931. X  
  932. X  # Thanks to Bill Aten for this script.
  933. X*** ../prev/remind.1    Mon Jan 31 11:01:39 1994
  934. X--- ./remind.1    Thu Apr  7 12:39:49 1994
  935. X***************
  936. X*** 1,9 ****
  937. X! .TH REMIND 1 "31 January 1994"
  938. X  .UC 4
  939. X  .SH NAME
  940. X  remind \- a sophisticated reminder service
  941. X  .SH SYNOPSIS
  942. X! .B remind [\fIoptions\fR] \fIfilename\fR [\fIdate\fR]
  943. X  .SH DESCRIPTION
  944. X  \fBRemind\fR reads the supplied \fIfilename\fR and executes the commands
  945. X  found in it.  The commands are used to issue reminders and alarms.  Each
  946. X--- 1,9 ----
  947. X! .TH REMIND 1 "6 April 1994"
  948. X  .UC 4
  949. X  .SH NAME
  950. X  remind \- a sophisticated reminder service
  951. X  .SH SYNOPSIS
  952. X! .B remind [\fIoptions\fR] \fIfilename\fR [\fIdate\fR] [\fI*rep\fR] [\fItime\fR]
  953. X  .SH DESCRIPTION
  954. X  \fBRemind\fR reads the supplied \fIfilename\fR and executes the commands
  955. X  found in it.  The commands are used to issue reminders and alarms.  Each
  956. X***************
  957. X*** 139,149 ****
  958. X  command.  Defaults to 150.
  959. X  .TP
  960. X  \fB\-k\fR\fIcmd\fR
  961. X! Instead of simply printing \fBMSG\fR-type reminders, this causes them to be
  962. X! passed to the specific \fIcmd\fR.  You must use '%s' where you want the body to
  963. X! appear, and may need to enclose this option in quotes.  Also, because
  964. X! \fIcmd\fR is run using the \fBsystem()\fR library function, shell quotes in
  965. X! the body of the message may cause problems.  Note that this option
  966. X  \fBoverrides\fR the \fB\-r\fR option and the \fBRUN OFF\fR command.
  967. X  .PP
  968. X  .RS
  969. X--- 139,150 ----
  970. X  command.  Defaults to 150.
  971. X  .TP
  972. X  \fB\-k\fR\fIcmd\fR
  973. X! Instead of simply printing \fBMSG\fR-type
  974. X! reminders, this causes them to be passed to the specific \fIcmd\fR.
  975. X! You must use '%s' where you want the body to appear, and may need to
  976. X! enclose this option in quotes.  Note that all shell characters in the
  977. X! body of the reminder are escaped with a backslash, and the entire body
  978. X! of the reminder is passed as a single argument.  Note that this option
  979. X  \fBoverrides\fR the \fB\-r\fR option and the \fBRUN OFF\fR command.
  980. X  .PP
  981. X  .RS
  982. X***************
  983. X*** 160,175 ****
  984. X  with the above technique.  So be very careful.  Also, the \fIcmd\fR is passed
  985. X  as an argument to \fBsprintf()\fR.  If you use formatting directives other
  986. X  than %s, or use more than one %s directive, there's a good chance that
  987. X! you'll crash \fBRemind\fR.  Finally, because \fIcmd\fR is executed using
  988. X! the \fBsystem()\fR library function, shell delimiters in \fBMSG\fR-type
  989. X! reminders could cause problems.  \fIIn particular, never run untrusted
  990. X! reminders using the \fR\fB\-k\fR\fI option\fR.  A reminder like:
  991. X! .PP
  992. X! .nf
  993. X!     REM msg foo ; rm -Rf .
  994. X! .fi
  995. X! .PP
  996. X! would cause havoc if run with the \fB\-k\fR option.
  997. X  .RE
  998. X  .TP
  999. X  \fB\-z\fR[\fIn\fR] (UNIX and OS/2 only)
  1000. X--- 161,169 ----
  1001. X  with the above technique.  So be very careful.  Also, the \fIcmd\fR is passed
  1002. X  as an argument to \fBsprintf()\fR.  If you use formatting directives other
  1003. X  than %s, or use more than one %s directive, there's a good chance that
  1004. X! you'll crash \fBRemind\fR.  Finally, because all shell and whitespace
  1005. X! characters are escaped, the program you execute with the \fB\-k\fR
  1006. X! option must be prepared to handle the entire message as a single argument.
  1007. X  .RE
  1008. X  .TP
  1009. X  \fB\-z\fR[\fIn\fR] (UNIX and OS/2 only)
  1010. X***************
  1011. X*** 207,220 ****
  1012. X  If you do supply a \fIdate\fR on the command line, then \fBRemind\fR uses
  1013. X  it, rather than the actual system date, as its notion of "today."
  1014. X  This lets you create calendars for future months, or test to see
  1015. X! how your reminders will be triggered in the future.
  1016. X  .PP
  1017. X! In addition, as part of the \fIdate\fR component, you can supply a
  1018. X! \fIrepeat\fR parameter, which has the form *\fInum\fR.  This causes
  1019. X! \fBRemind\fR to be run \fInum\fR times, with the date incrementing
  1020. X! on each iteration.  You may have to enclose the parameter in quotes
  1021. X! to avoid shell expansion.  See the subsection "Repeated Execution"
  1022. X! in the section "Calendar Mode" for more information.
  1023. X  .SH REMINDER FILES
  1024. X  .PP
  1025. X  \fBRemind\fR uses scripts to control its operation.  You can use any
  1026. X--- 201,218 ----
  1027. X  If you do supply a \fIdate\fR on the command line, then \fBRemind\fR uses
  1028. X  it, rather than the actual system date, as its notion of "today."
  1029. X  This lets you create calendars for future months, or test to see
  1030. X! how your reminders will be triggered in the future.  Similarly,
  1031. X! you can supply a \fItime\fR (in 24-hour format -- for example, 17:15) to
  1032. X! set \fBRemind\fR's notion of "now" to a particular time.  Supplying
  1033. X! a \fItime\fR on the command line also implicitly enables the \fB\-q\fR
  1034. X! option and disables the \fB\-z\fR option.
  1035. X  .PP
  1036. X! In addition, you can supply a \fIrepeat\fR parameter, which has the
  1037. X! form *\fInum\fR.  This causes \fBRemind\fR to be run \fInum\fR times,
  1038. X! with the date incrementing on each iteration.  You may have to enclose
  1039. X! the parameter in quotes to avoid shell expansion.  See the subsection
  1040. X! "Repeated Execution" in the section "Calendar Mode" for more
  1041. X! information.
  1042. X  .SH REMINDER FILES
  1043. X  .PP
  1044. X  \fBRemind\fR uses scripts to control its operation.  You can use any
  1045. X***************
  1046. X*** 2045,2051 ****
  1047. X  in degrees.  0 is a new moon, 180 is a full moon, 90 is first-quarter, etc.
  1048. X  .TP
  1049. X  .B now()
  1050. X! Returns the current system time, as a \fBTIME\fR type.
  1051. X  .TP
  1052. X  .B ord(i_num)
  1053. X  Returns a string which is the ordinal number \fInum\fR.  For example,
  1054. X--- 2043,2050 ----
  1055. X  in degrees.  0 is a new moon, 180 is a full moon, 90 is first-quarter, etc.
  1056. X  .TP
  1057. X  .B now()
  1058. X! Returns the current system time, as a \fBTIME\fR type.  This may be
  1059. X! the actual time, or a time supplied on the command line.
  1060. X  .TP
  1061. X  .B ord(i_num)
  1062. X  Returns a string which is the ordinal number \fInum\fR.  For example,
  1063. X***************
  1064. X*** 2068,2081 ****
  1065. X  \fIstr2\fR otherwise.
  1066. X  .RE
  1067. X  .TP
  1068. X! .B psmoon(i_phase [,i_size])
  1069. X! Returns a \fBSTRING\fR consisting of PostScript code to draw a moon
  1070. X! in the upper-left hand corner of the calendar box.  \fIPhase\fR specifies
  1071. X! the phase of the moon, and is 0 (new moon), 1 (first quarter), 2 (full moon)
  1072. X! or 3 (third quarter).  If \fIsize\fR is specified, it controls the radius of
  1073. X! the moon in PostScript units (1/72 inch.)  If it is not specified, the size
  1074. X! of the day-number font is used.
  1075. X  .PP
  1076. X  .RS
  1077. X  For example, the following four lines place moon symbols on the PostScript
  1078. X  calendar:
  1079. X--- 2067,2081 ----
  1080. X  \fIstr2\fR otherwise.
  1081. X  .RE
  1082. X  .TP
  1083. X! .B psmoon(i_phase [,i_size [,s_note [,i_notesize]]])
  1084. X! Returns a \fBSTRING\fR consisting of PostScript code to draw a moon in
  1085. X! the upper-left hand corner of the calendar box.  \fIPhase\fR specifies
  1086. X! the phase of the moon, and is 0 (new moon), 1 (first quarter), 2 (full
  1087. X! moon) or 3 (third quarter).  If \fIsize\fR is specified, it controls
  1088. X! the radius of the moon in PostScript units (1/72 inch.)  If it is not
  1089. X! specified or is negative, the size of the day-number font is used.
  1090. X  .PP
  1091. X+ .PP
  1092. X  .RS
  1093. X  For example, the following four lines place moon symbols on the PostScript
  1094. X  calendar:
  1095. X***************
  1096. X*** 2087,2092 ****
  1097. X--- 2087,2106 ----
  1098. X          REM [trigger(moondate(3))] PS [psmoon(3)]
  1099. X  .fi
  1100. X  .PP
  1101. X+ If \fInote\fR is specified, the text is used to annotate the moon
  1102. X+ display.  The font is the same font used for calendar entries.  If
  1103. X+ \fInotesize\fR is given, it specifies the font size to use for the
  1104. X+ annotation, in PostScript units (1/72 inch.)  If \fInotesize\fR is not
  1105. X+ given, it defaults to the size used for calendar entries.  (If you annotate
  1106. X+ the display, be careful not to overwrite the day number -- \fBRemind\fR
  1107. X+ does not check for this.)  For example, if you want the time of each new
  1108. X+ moon displayed, you could use this in your reminder script:
  1109. X+ .PP
  1110. X+ .nf
  1111. X+     REM [trigger(moondate(0))] PS [psmoon(0, -1, moontime(0)+"")]
  1112. X+ .fi
  1113. X+ .PP
  1114. X+ Note how the time is coerced to a string by concatenating the null string.
  1115. X  .RE
  1116. X  .TP
  1117. X  .B psshade(i_num)
  1118. X***************
  1119. X*** 2102,2107 ****
  1120. X--- 2116,2126 ----
  1121. X  The above command emits PostScript code to lightly shade the boxes
  1122. X  for Saturday and Sunday in a PostScript calendar.
  1123. X  .RE
  1124. X+ .TP
  1125. X+ .B realnow()
  1126. X+ Returns the true time of day as provided by the operating system.
  1127. X+ This is in contrast to \fBnow()\fR, which may return a time supplied
  1128. X+ on the command line.
  1129. X  .TP
  1130. X  .B realtoday()
  1131. X  Returns the date as provided by the operating system.  This is in contrast to
  1132. X*** ../prev/sort.c    Tue Nov 16 17:40:25 1993
  1133. X--- ./sort.c    Thu Feb 10 16:50:06 1994
  1134. X***************
  1135. X*** 5,11 ****
  1136. X  /*  Routines for sorting reminders by trigger date             */
  1137. X  /*                                                             */
  1138. X  /*  This file is part of REMIND.                               */
  1139. X! /*  Copyright (C) 1992, 1993 by David F. Skoll.                */
  1140. X  /*                                                             */
  1141. X  /***************************************************************/
  1142. X  #include "config.h"
  1143. X--- 5,11 ----
  1144. X  /*  Routines for sorting reminders by trigger date             */
  1145. X  /*                                                             */
  1146. X  /*  This file is part of REMIND.                               */
  1147. X! /*  Copyright (C) 1992, 1993, 1994 by David F. Skoll           */
  1148. X  /*                                                             */
  1149. X  /***************************************************************/
  1150. X  #include "config.h"
  1151. X***************
  1152. X*** 158,166 ****
  1153. X        switch(cur->typ) {
  1154. X           case MSG_TYPE:
  1155. X          if (MsgCommand) {
  1156. X!            char buf[LINELEN+TOKSIZE];
  1157. X!            sprintf(buf, MsgCommand, cur->text);
  1158. X!            system(buf);
  1159. X              } else {
  1160. X             if (cur->trigdate != olddate) {
  1161. X                IssueSortBanner(cur->trigdate);
  1162. X--- 158,164 ----
  1163. X        switch(cur->typ) {
  1164. X           case MSG_TYPE:
  1165. X          if (MsgCommand) {
  1166. X!            DoMsgCommand(MsgCommand, cur->text);
  1167. X              } else {
  1168. X             if (cur->trigdate != olddate) {
  1169. X                IssueSortBanner(cur->trigdate);
  1170. X*** ../prev/test-rem    Tue Oct 12 16:22:52 1993
  1171. X--- ./test-rem    Mon Jan 31 17:05:05 1994
  1172. X***************
  1173. X*** 7,13 ****
  1174. X  # in the build directory.
  1175. X  #
  1176. X  # This file is part of REMIND.
  1177. X! # Copyright (C) 1992, 1993 by David F. Skoll
  1178. X  # ---------------------------------------------------------------------------
  1179. X  
  1180. X  TEST_GETENV="foo bar baz" ; export TEST_GETENV
  1181. X--- 7,13 ----
  1182. X  # in the build directory.
  1183. X  #
  1184. X  # This file is part of REMIND.
  1185. X! # Copyright (C) 1992, 1993, 1994 by David F. Skoll
  1186. X  # ---------------------------------------------------------------------------
  1187. X  
  1188. X  TEST_GETENV="foo bar baz" ; export TEST_GETENV
  1189. X*** ../prev/test-rem.bat    Mon Nov 15 14:25:36 1993
  1190. X--- ./test-rem.bat    Mon Jan 31 17:04:57 1994
  1191. X***************
  1192. X*** 7,13 ****
  1193. X  rem in the build directory.
  1194. X  rem
  1195. X  rem This file is part of REMIND.
  1196. X! rem Copyright (C) 1992, 1993 by David F. Skoll
  1197. X  rem ---------------------------------------------------------------------------
  1198. X  
  1199. X  del test.out > nul
  1200. X--- 7,13 ----
  1201. X  rem in the build directory.
  1202. X  rem
  1203. X  rem This file is part of REMIND.
  1204. X! rem Copyright (C) 1992, 1993, 1994 by David F. Skoll
  1205. SHAR_EOF
  1206. echo "End of Remind-3.0/Patch-13/part part 2"
  1207. echo "File patch.13 is continued in part 3"
  1208. echo "3" > shar3_seq_.tmp
  1209. exit 0
  1210.  
  1211.  
  1212.  
  1213. exit 0 # Just in case...
  1214.