home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 2 / 2175 < prev    next >
Encoding:
Internet Message Format  |  1990-12-28  |  24.4 KB

  1. From: dfs@doe.carleton.ca (David F. Skoll)
  2. Newsgroups: alt.sources
  3. Subject: REMIND 2.2 Patch 03
  4. Message-ID: <dfs.659811943@yar>
  5. Date: 28 Nov 90 17:05:43 GMT
  6.  
  7. This is Patch 03 for Remind; read the shar for more information.
  8.  
  9. You must have Remind 2.2, patchlevel 2 before applying this patch.
  10.  
  11. --
  12. David F. Skoll
  13.  
  14. #!/bin/sh
  15. # This is Remind-2.2-patch.03, a shell archive (shar 3.32)
  16. # made 11/28/1990 16:56 UTC by dfs@yar
  17. # Source directory /enterprise/transporter/dfs/work/.rem/work
  18. #
  19. # existing files will NOT be overwritten
  20. #
  21. # This shar contains:
  22. # length  mode       name
  23. # ------ ---------- ------------------------------------------
  24. #  20501 -rw------- patch.03
  25. #   1034 -rwx------ kall
  26. #
  27. #
  28. # This patch fixes the following problems:
  29. # - Calendar now uses correct OMIT context
  30. # - Calendar now correctly formats words that "just" fit
  31. # - stdout not flushed when REMIND forked - this could result in extra
  32. #   reminders if you pipe the output to a file - has been fixed
  33. # - Makefile made more configurable
  34. # - Type inconsistency in 'timed.c' fixed
  35. # - Bug in calendar formatting fixed
  36. # - Man page corrected and updated
  37.  
  38. # This patch adds the following features:
  39. # - OMIT commands can have MSG or RUN components to reduce redundancy
  40. # - RUN reminders can be placed in the calendar if you so specify
  41. # - REMIND will not terminate if it finds that stdout is no longer a tty.
  42. #   You must explicitly kill it - hence the kall script.
  43.  
  44. # The kall script is a script to kill processes whose command-name matches
  45. # a string.  For example, if you want to kill all your remind processes
  46. # when you log out, put 'kall remind' in your .logout file.  Read the
  47. # script for more information.  NOTE: You may (in fact, you probably will)
  48. # have to edit the script to suit your flavour of 'ps'
  49.  
  50. if touch 2>&1 | fgrep 'amc' > /dev/null
  51.  then TOUCH=touch
  52.  else TOUCH=true
  53. fi
  54. # ============= patch.03 ==============
  55. if test X"$1" != X"-c" -a -f 'patch.03'; then
  56.     echo "File already exists: skipping 'patch.03'"
  57. else
  58. echo "x - extracting patch.03 (Text)"
  59. sed 's/^X//' << 'SHAR_EOF' > patch.03 &&
  60. XPatch 03 - 28 November 1990
  61. XFixes various problems and adds a couple of conveniences.
  62. X
  63. XThis patch modifies the Makefile to make it more configurable for
  64. Xvarious systems.
  65. X*** ../work-backup/Makefile    Thu Nov 15 15:30:41 1990
  66. X--- ./Makefile    Wed Nov 28 09:50:37 1990
  67. X***************
  68. X*** 1,10 ****
  69. X--- 1,24 ----
  70. X  # Makefile for REMIND - simple file
  71. X  
  72. X+ #--------------- BEGINNING OF THINGS YOU CAN CHANGE --------------
  73. X+ 
  74. X  #If you have a BSD system:
  75. X  CFLAGS= -O -DUNIX
  76. X  
  77. X  #If you have a SYSV system, comment previous line and uncomment next line:
  78. X  #CFLAGS= -O -DUNIX -DSYSV
  79. X+ 
  80. X+ #If your system does not include <malloc.h>, uncomment next line:
  81. X+ #CFLAGS += -DNO_MALLOC_H
  82. X+ 
  83. X+ #If you have a SYSV system which does not implement the pid_t type,
  84. X+ #uncomment the next line:
  85. X+ #CFLAGS += -Dpid_t=int
  86. X+ 
  87. X+ #If you want to use gcc:
  88. X+ #CC= gcc
  89. X+ 
  90. X+ #--------------- SHOULDN'T CHANGE STUFF BELOW HERE ---------------
  91. X  
  92. X  all: dorem.o files.o main.o nextdate.o init.o dosubst.o timed.o calendar.o cache.o
  93. X      $(LINK.c) -o remind dorem.o files.o main.o nextdate.o init.o dosubst.o timed.o calendar.o cache.o
  94. X
  95. XThis patch allows you to specify whether or not you have <malloc.h>
  96. XAlso caches OMIT statements as well as REMs
  97. X*** ../work-backup/cache.c    Fri Nov 16 13:38:47 1990
  98. X--- ./cache.c    Wed Nov 28 10:03:06 1990
  99. X***************
  100. X*** 9,15 ****
  101. X--- 9,17 ----
  102. X  /***************************************************************/
  103. X  
  104. X  #include <stdio.h>
  105. X+ #ifndef NO_MALLOC_H
  106. X  #include <malloc.h>
  107. X+ #endif
  108. X  #ifndef UNIX
  109. X  #include <string.h>
  110. X  #endif
  111. X***************
  112. X*** 83,89 ****
  113. X  
  114. X        s = Line;
  115. X        tok = ParseToken(&s);
  116. X!       if (tok.type == Rem_t) { /* Yup, this is a REM, so cache it */
  117. X           c = (Centry *) malloc(sizeof(Centry));
  118. X           if (c == NULL) {
  119. X              CacheFailed = 1;
  120. X--- 85,92 ----
  121. X  
  122. X        s = Line;
  123. X        tok = ParseToken(&s);
  124. X!       if (tok.type == Rem_t || tok.type == Omit_t) { 
  125. X!          /* Yup, this is a REM or OMIT, so cache it */
  126. X           c = (Centry *) malloc(sizeof(Centry));
  127. X           if (c == NULL) {
  128. X              CacheFailed = 1;
  129. X***************
  130. X*** 126,131 ****
  131. X--- 129,138 ----
  132. X  void ResetCache()
  133. X  #endif
  134. X  {
  135. X+    /* Reset the OMIT context */
  136. X+    NumFullOmit = 0;
  137. X+    NumPartOmit = 0;
  138. X+   
  139. X     if (CacheFailed) OpenFile(FileName);
  140. X     else Current = Cache.next;
  141. X  }
  142. X
  143. XThis patch allows you to specify whether or not you have <malloc.h>
  144. XAlso fixes formatting of output if a word will *just* fit in the calendar.
  145. XFixes the OMIT context for calendar creation.
  146. X*** ../work-backup/calendar.c    Fri Nov 16 09:57:28 1990
  147. X--- ./calendar.c    Wed Nov 28 10:55:11 1990
  148. X***************
  149. X*** 9,15 ****
  150. X--- 9,17 ----
  151. X  /*                                                             */
  152. X  /***************************************************************/
  153. X  #include <stdio.h>
  154. X+ #ifndef NO_MALLOC_H
  155. X  #include <malloc.h>
  156. X+ #endif
  157. X  #include <ctype.h>
  158. X  #ifndef UNIX
  159. X  #include <string.h>
  160. X***************
  161. X*** 46,52 ****
  162. X  
  163. X  /* Make function prototypes local - they're not used anywhere else */
  164. X  #ifndef UNIX
  165. X! CalEntry *CreateCalEntry(void);
  166. X  void AddCalEntry(CalEntry *e);
  167. X  void EmitOneCalendarLine(void);
  168. X  void InitCalendar(int m, int y);
  169. X--- 48,54 ----
  170. X  
  171. X  /* Make function prototypes local - they're not used anywhere else */
  172. X  #ifndef UNIX
  173. X! CalEntry *CreateCalEntry(int type);
  174. X  void AddCalEntry(CalEntry *e);
  175. X  void EmitOneCalendarLine(void);
  176. X  void InitCalendar(int m, int y);
  177. X***************
  178. X*** 207,213 ****
  179. X  {
  180. X     if (SimpleCalendar) return;
  181. X     putchar('\f');
  182. X-    putchar('\n');
  183. X  }
  184. X  
  185. X  /***************************************************************/
  186. X--- 209,214 ----
  187. X***************
  188. X*** 229,235 ****
  189. X        used[DayOfWeek(JulianToday)] = CurDay;
  190. X        if (GetLine()) break;
  191. X        i = ProcessLine();
  192. X!       if (i) if (e = CreateCalEntry()) AddCalEntry(e);
  193. X     }
  194. X  
  195. X     /* Now figure out if we should print the calendar */
  196. X--- 230,236 ----
  197. X        used[DayOfWeek(JulianToday)] = CurDay;
  198. X        if (GetLine()) break;
  199. X        i = ProcessLine();
  200. X!       if (i>0) if (e = CreateCalEntry()) AddCalEntry(e);
  201. X     }
  202. X  
  203. X     /* Now figure out if we should print the calendar */
  204. X***************
  205. X*** 299,309 ****
  206. X  /*                                                             */
  207. X  /* Allocates and creates a calendar entry.                     */
  208. X  /*                                                             */
  209. X  /***************************************************************/
  210. X  #ifndef UNIX
  211. X! CalEntry *CreateCalEntry(void)
  212. X  #else
  213. X! CalEntry *CreateCalEntry()
  214. X  #endif
  215. X  {
  216. X     CalEntry *e;
  217. X--- 300,314 ----
  218. X  /*                                                             */
  219. X  /* Allocates and creates a calendar entry.                     */
  220. X  /*                                                             */
  221. X+ /* Type = 1: MSG  type = 2: RUN                                */
  222. X+ /*                                                             */
  223. X+ /*                                                             */
  224. X  /***************************************************************/
  225. X  #ifndef UNIX
  226. X! CalEntry *CreateCalEntry(int type)
  227. X  #else
  228. X! CalEntry *CreateCalEntry(type)
  229. X! int type;
  230. X  #endif
  231. X  {
  232. X     CalEntry *e;
  233. X***************
  234. X*** 333,340 ****
  235. X        s++;
  236. X     }
  237. X  
  238. X     /* If we found one, look for another */
  239. X!    if (t != s) {
  240. X        s = t;
  241. X        while (*s) {
  242. X           if (*s == '%' && *(s+1) == '\"') {
  243. X--- 338,351 ----
  244. X        s++;
  245. X     }
  246. X  
  247. X+    /* If it's a RUN type, and there's no %" mark, ignore it. */
  248. X+    if (type == 2 && t == WorkBuf) {
  249. X+       free(e);
  250. X+       return NULL;
  251. X+    }
  252. X+ 
  253. X     /* If we found one, look for another */
  254. X!    if (t != WorkBuf) {
  255. X        s = t;
  256. X        while (*s) {
  257. X           if (*s == '%' && *(s+1) == '\"') {
  258. X***************
  259. X*** 377,383 ****
  260. X           *t++ = '\n';
  261. X           while (isspace(*s)) s++;
  262. X        }
  263. X!       else if (column != 0 && column+l >= CalWidth) {
  264. X           *t++ = '\n';
  265. X           column = 0;
  266. X           if (l >= CalWidth) {
  267. X--- 388,394 ----
  268. X           *t++ = '\n';
  269. X           while (isspace(*s)) s++;
  270. X        }
  271. X!       else if (column != 0 && column+l > CalWidth) {
  272. X           *t++ = '\n';
  273. X           column = 0;
  274. X           if (l >= CalWidth) {
  275. X***************
  276. X*** 401,407 ****
  277. X       CopyWord(&s, &t, l);
  278. X           while (isspace(*s)) s++;
  279. X           *t++ = ' ';
  280. X!      if (column == CalWidth) {
  281. X             *(t-1) = '\n';
  282. X             column = 0;
  283. X           }
  284. X--- 412,418 ----
  285. X       CopyWord(&s, &t, l);
  286. X           while (isspace(*s)) s++;
  287. X           *t++ = ' ';
  288. X!      if (column > CalWidth) {
  289. X             *(t-1) = '\n';
  290. X             column = 0;
  291. X           }
  292. X*** ../work-backup/defines.h    Thu Nov 15 09:41:13 1990
  293. X--- ./defines.h    Wed Nov 28 10:03:42 1990
  294. X***************
  295. X*** 13,19 ****
  296. X     the number of fully-specified (dd-mm-yy) and partially-specified
  297. X     (dd-mm) holidays. */
  298. X  #define BASE 1990
  299. X! #define FOMITSIZE 100
  300. X  #define POMITSIZE 75
  301. X  
  302. X  /* Useful macros */
  303. X--- 13,19 ----
  304. X     the number of fully-specified (dd-mm-yy) and partially-specified
  305. X     (dd-mm) holidays. */
  306. X  #define BASE 1990
  307. X! #define FOMITSIZE 150
  308. X  #define POMITSIZE 75
  309. X  
  310. X  /* Useful macros */
  311. X*** ../work-backup/dorem.c    Thu Nov 15 09:40:48 1990
  312. X--- ./dorem.c    Wed Nov 28 10:11:43 1990
  313. X***************
  314. X*** 242,252 ****
  315. X  
  316. X     jul = GetTriggerDate(d, m, y, wd, cons, back, repeat, omit);
  317. X     if (Calendar) {
  318. X!       if (jul == JulianToday && tok.type == Msg_t) {
  319. X           while (isspace(**s)) (*s)++;
  320. X           strcpy(WorkBuf, *s);
  321. X           CalTime = tim;
  322. X!      return 1;
  323. X        } else return 0;
  324. X     }
  325. X       
  326. X--- 242,252 ----
  327. X  
  328. X     jul = GetTriggerDate(d, m, y, wd, cons, back, repeat, omit);
  329. X     if (Calendar) {
  330. X!       if (jul == JulianToday) {
  331. X           while (isspace(**s)) (*s)++;
  332. X           strcpy(WorkBuf, *s);
  333. X           CalTime = tim;
  334. X!          if (tok.type == Run_t) return 2; else return 1;
  335. X        } else return 0;
  336. X     }
  337. X       
  338. XThis patch allows you to specify whether or not you have <malloc.h>
  339. X*** ../work-backup/files.c    Thu Nov 15 09:39:23 1990
  340. X--- ./files.c    Wed Nov 28 09:43:02 1990
  341. X***************
  342. X*** 3,9 ****
  343. X--- 3,11 ----
  344. X  #include <stdlib.h>
  345. X  #endif
  346. X  #include <string.h>
  347. X+ #ifndef NO_MALLOC_H
  348. X  #include <malloc.h>
  349. X+ #endif
  350. X  #ifndef UNIX
  351. X  #include <dos.h>
  352. X  #endif
  353. X
  354. XThis patch updates the PATCHLEVEL to 3.
  355. X*** ../work-backup/init.c    Wed Nov 28 09:40:24 1990
  356. X--- ./init.c    Wed Nov 28 10:23:26 1990
  357. X***************
  358. X*** 7,13 ****
  359. X  #include "globals.h"
  360. X  #include "protos.h"
  361. X  
  362. X! #define PATCHLEVEL 2
  363. X  
  364. X  static char DPMsg[] = "Debug and Purge options conflict - Purge chosen.\n";
  365. X  static char DPCMsg[] = "Calendar overrides Debug and Purge options.\n";
  366. X--- 7,13 ----
  367. X  #include "globals.h"
  368. X  #include "protos.h"
  369. X  
  370. X! #define PATCHLEVEL 3
  371. X  
  372. X  static char DPMsg[] = "Debug and Purge options conflict - Purge chosen.\n";
  373. X  static char DPCMsg[] = "Calendar overrides Debug and Purge options.\n";
  374. X
  375. XThis patch modifies the OMIT command to allow MSG and RUN tokens.
  376. XAlso fixes the return values to allow OMIT to appear in a calendar.
  377. X*** ../work-backup/main.c    Thu Nov 15 16:52:20 1990
  378. X--- ./main.c    Wed Nov 28 10:19:39 1990
  379. X***************
  380. X*** 221,228 ****
  381. X               break;
  382. X  
  383. X        case Omit_t:   i = DoGlobalOmit(&s);
  384. X               if (Purge && TopLevel())
  385. X!             if (i < 0) Eprint("Purged '%s'\n", Line);
  386. X              else       Output(Line);
  387. X               break;
  388. X  
  389. X--- 221,229 ----
  390. X               break;
  391. X  
  392. X        case Omit_t:   i = DoGlobalOmit(&s);
  393. X+              if (Calendar) return i;
  394. X               if (Purge && TopLevel())
  395. X!             if (i == -1) Eprint("Purged '%s'\n", Line);
  396. X              else       Output(Line);
  397. X               break;
  398. X  
  399. X***************
  400. X*** 357,363 ****
  401. X  /*                                                             */
  402. X  /*  Add an entry to the global ommissions array.  Either       */
  403. X  /*  a fully-specified date, or a mm-yy type date.              */
  404. X! /*  Return 0 if OK, -1 if date is in past, 1 if problem.       */
  405. X  /*                                                             */
  406. X  /***************************************************************/
  407. X  #ifndef UNIX
  408. X--- 358,364 ----
  409. X  /*                                                             */
  410. X  /*  Add an entry to the global ommissions array.  Either       */
  411. X  /*  a fully-specified date, or a mm-yy type date.              */
  412. X! /*  Return 0 if OK, -1 if date is in past, -2 if problem.      */
  413. X  /*                                                             */
  414. X  /***************************************************************/
  415. X  #ifndef UNIX
  416. X***************
  417. X*** 371,399 ****
  418. X     int omit;
  419. X     int *ptr;
  420. X     Token tok;
  421. X  
  422. X     tok.type = Unknown_t;
  423. X!    while(tok.type != Eol_t) {
  424. X        tok = ParseToken(s);
  425. X        switch (tok.type) {
  426. X       case Year_t:  y = tok.val; break;
  427. X       case Month_t: m = tok.val; break;
  428. X       case Day_t:   d = tok.val; break;
  429. X!      case Eol_t:   break;
  430. X       default:      Eprint("Invalid token '%s' for OMIT command.\n", tok.str);
  431. X!                return 1;
  432. X        }
  433. X     }
  434. X  
  435. X     if (d == -1 || m == -1 || CheckDate(d, m, y)) {
  436. X        Eprint("Invalid date specification.\n");
  437. X!       return 1;
  438. X     }
  439. X  
  440. X     if (y == -1) { /* Only mm-dd specified */
  441. X        if (NumPartOmit == POMITSIZE) {
  442. X       Eprint("Too many partially-specified OMITs.\n");
  443. X!      return 1;
  444. X        }
  445. X        omit = (m << 5) + d;
  446. X        ptr = PartOmitArray + NumPartOmit;
  447. X--- 372,405 ----
  448. X     int omit;
  449. X     int *ptr;
  450. X     Token tok;
  451. X+    char *olds = *s;
  452. X  
  453. X     tok.type = Unknown_t;
  454. X!    while(tok.type != Eol_t && tok.type != Run_t && tok.type != Msg_t) {
  455. X        tok = ParseToken(s);
  456. X        switch (tok.type) {
  457. X       case Year_t:  y = tok.val; break;
  458. X       case Month_t: m = tok.val; break;
  459. X       case Day_t:   d = tok.val; break;
  460. X! 
  461. X!      case Delta_t:
  462. X!      case Eol_t:   
  463. X!      case Msg_t:
  464. X!      case Run_t: break;
  465. X       default:      Eprint("Invalid token '%s' for OMIT command.\n", tok.str);
  466. X!                return -2;
  467. X        }
  468. X     }
  469. X  
  470. X     if (d == -1 || m == -1 || CheckDate(d, m, y)) {
  471. X        Eprint("Invalid date specification.\n");
  472. X!       return -2;
  473. X     }
  474. X  
  475. X     if (y == -1) { /* Only mm-dd specified */
  476. X        if (NumPartOmit == POMITSIZE) {
  477. X       Eprint("Too many partially-specified OMITs.\n");
  478. X!      return -2;
  479. X        }
  480. X        omit = (m << 5) + d;
  481. X        ptr = PartOmitArray + NumPartOmit;
  482. X***************
  483. X*** 413,422 ****
  484. X          ptr++;
  485. X       }
  486. X        }
  487. X     } else { /* All three specified */
  488. X        if (NumFullOmit == FOMITSIZE) {
  489. X       Eprint("Too many fully-specified OMITs.\n");
  490. X!      return 1;
  491. X        }
  492. X        omit = Julian(d, m, y);
  493. X        if (omit < JulianToday) {
  494. X--- 419,430 ----
  495. X          ptr++;
  496. X       }
  497. X        }
  498. X+       /* If we got a MSG or a RUN, then execute DoRem */
  499. X+       if (tok.type == Run_t || tok.type == Msg_t) return DoRem(&olds);
  500. X     } else { /* All three specified */
  501. X        if (NumFullOmit == FOMITSIZE) {
  502. X       Eprint("Too many fully-specified OMITs.\n");
  503. X!      return -2;
  504. X        }
  505. X        omit = Julian(d, m, y);
  506. X        if (omit < JulianToday) {
  507. X***************
  508. X*** 441,446 ****
  509. X--- 449,456 ----
  510. X          ptr++;
  511. X       }
  512. X        }
  513. X+       /* If we got a MSG or a RUN, then execute DoRem */
  514. X+       if (tok.type == Run_t || tok.type == Msg_t) return DoRem(&olds);
  515. X     }
  516. X     return 0;
  517. X  }
  518. X***************
  519. X*** 606,612 ****
  520. X  {
  521. X     int t;
  522. X  
  523. X!    if (jul < 0) return 1;
  524. X  
  525. X     if (jul >= JulFirst && JulFirst != -1) {
  526. X        *y = FirstYear;
  527. X--- 616,622 ----
  528. X  {
  529. X     int t;
  530. X  
  531. X!    if (jul < 0) return -1;
  532. X  
  533. X     if (jul >= JulFirst && JulFirst != -1) {
  534. X        *y = FirstYear;
  535. X***************
  536. X*** 753,758 ****
  537. X--- 763,771 ----
  538. X         printf("%d reminder%s queued for later today.\n", NumAtsQueued,
  539. X                (NumAtsQueued == 1) ? "" : "s");
  540. X  
  541. X+    fflush(stdout); /* Flush output so we don't get 2 copies when directing */
  542. X+            /* stdout to a file. */
  543. X+    
  544. X     if (NumAtsQueued) {
  545. X        pid = fork();
  546. X        if (pid == -1) Eprint("Can't fork to perform ATs!\n");
  547. X
  548. XThis patch fixes some errors in the manual, clears up some omissions, and
  549. Xadds some more useful information.
  550. X*** ../work-backup/remind.1    Wed Nov 28 09:40:24 1990
  551. X--- ./remind.1    Wed Nov 28 11:04:22 1990
  552. X***************
  553. X*** 57,68 ****
  554. X  option is not compatible with the \fB\-p\fR or \fB\-d\fR options.
  555. X  .TP
  556. X  .B \-w\fR\fIn\fR
  557. X! The \fB\-w\fR flag causes \fBremind\fR to format the calendar for a device
  558. X  whose output width is \fIn\fR columns.  The default is to produce a calendar
  559. X  for an 80-column device.
  560. X  .TP
  561. X  .B \-s
  562. X! The \fB\-s\fB flag causes \fBremind\fR to send an unformatted "simple
  563. X  calendar" listing to standard output.  This can be used if you wish to
  564. X  format the calendar with another program rather than using \fBremind\fR's
  565. X  built-in calendar format.
  566. X--- 57,70 ----
  567. X  option is not compatible with the \fB\-p\fR or \fB\-d\fR options.
  568. X  .TP
  569. X  .B \-w\fR\fIn\fR
  570. X! The \fB\-w\fR flag, when used in conjunction with \fB\-c\fR,
  571. X! causes \fBremind\fR to format the calendar for a device
  572. X  whose output width is \fIn\fR columns.  The default is to produce a calendar
  573. X  for an 80-column device.
  574. X  .TP
  575. X  .B \-s
  576. X! The \fB\-s\fB flag, when used in conjunction with \fB\-c\fR,
  577. X! causes \fBremind\fR to send an unformatted "simple
  578. X  calendar" listing to standard output.  This can be used if you wish to
  579. X  format the calendar with another program rather than using \fBremind\fR's
  580. X  built-in calendar format.
  581. X***************
  582. X*** 839,844 ****
  583. X--- 841,861 ----
  584. X  with business reminders (for which omission of holidays is appropriate)
  585. X  following the
  586. X  .I global OMITs.
  587. X+ .PP
  588. X+ For convenience, you can include a \fIdelta\fR and a \fIMSG\fR or \fIRUN\fR
  589. X+ token in a global \fIOMIT\fR.  This is useful to avoid duplication of holiday
  590. X+ entries.  For example, the line:
  591. X+ .PP
  592. X+ .nf
  593. X+     OMIT 25 Dec +2 MSG %"Christmas%" is %b.
  594. X+ .fi
  595. X+ .PP
  596. X+ is exactly equivalent to:
  597. X+ .PP
  598. X+ .nf
  599. X+     OMIT 25 Dec
  600. X+     REM 25 Dec +2 MSG %"Christmas%" is %b.
  601. X+ .fi
  602. X  .SH THE INCLUDE COMMAND
  603. X  The
  604. X  .I INCLUDE
  605. X***************
  606. X*** 1056,1067 ****
  607. X  causes the need for the "...ago" forms.
  608. X  .TP
  609. X  .B %2
  610. X! is replaced with "at \fIhh\fR:\fImm\fRam" or "..pm" depending on the
  611. X  .I AT
  612. X  time of the reminder.
  613. X  .TP
  614. X  .B %3
  615. X! is replaced with "at \fIhh\fR:\fImm\fR" in 24-hour format.
  616. X  .TP
  617. X  .B %4
  618. X  is replaced with "\fImm\fR" where \fImm\fR is the number of minutes between
  619. X--- 1073,1084 ----
  620. X  causes the need for the "...ago" forms.
  621. X  .TP
  622. X  .B %2
  623. X! is replaced with "\fIhh\fR:\fImm\fRam" or "..pm" depending on the
  624. X  .I AT
  625. X  time of the reminder.
  626. X  .TP
  627. X  .B %3
  628. X! is replaced with "\fIhh\fR:\fImm\fR" in 24-hour format.
  629. X  .TP
  630. X  .B %4
  631. X  is replaced with "\fImm\fR" where \fImm\fR is the number of minutes between
  632. X***************
  633. X*** 1167,1176 ****
  634. X  being entered into the calendar, and the time of each reminder is printed
  635. X  before the reminder text.
  636. X  .PP
  637. X! Note that only \fIMSG\fR reminders are included in the calendar; \fIRUN\fR
  638. X! reminders are ignored.  If you indicate empty text for the calendar entry
  639. X  with the sequence \fB%"%"\fR, then the reminder is ignored when producing
  640. X! the calendar.
  641. X  .SH THE BANNER COMMAND
  642. X  When
  643. X  .B remind
  644. X--- 1184,1203 ----
  645. X  being entered into the calendar, and the time of each reminder is printed
  646. X  before the reminder text.
  647. X  .PP
  648. X! Note that by default, only \fIMSG\fR reminders are included in the calendar; 
  649. X! \fIRUN\fR reminders are ignored.  However, if you explicitly place the %"
  650. X! escape sequences in a \fIRUN\fR reminder, then it will be included in the
  651. X! calendar.
  652. X! If you indicate empty text for the calendar entry
  653. X  with the sequence \fB%"%"\fR, then the reminder is ignored when producing
  654. X! the calendar, whether is is a \fIMSG\fR or \fIRUN\fR type.
  655. X! .PP
  656. X! If your reminder file has errors in it, when you produce a calendar, you
  657. X! will get many error messages apparently coming from the file "*cache*"
  658. X! This is because \fBremind\fR caches the reminder file for efficient
  659. X! production of the calendar.  Thus, you should check that your reminder
  660. X! file is error-free (by running \fBremind\fR with the \fB\-\d\fR option)
  661. X! before attempting to produce a calendar.
  662. X  .SH THE BANNER COMMAND
  663. X  When
  664. X  .B remind
  665. X***************
  666. X*** 1263,1269 ****
  667. X  .PP
  668. X  .nf
  669. X      REM 5 Feb 1991 AT 14:00 +45 *30 \\
  670. X!     RUN mail -s "Meeting %2" $LOGNAME </dev/null
  671. X  .fi
  672. X  .PP
  673. X  On 5 Februrary, 1991, this reminder will mail 
  674. X--- 1290,1296 ----
  675. X  .PP
  676. X  .nf
  677. X      REM 5 Feb 1991 AT 14:00 +45 *30 \\
  678. X!     RUN mail -s "Meeting %2" $LOGNAME </dev/null &
  679. X  .fi
  680. X  .PP
  681. X  On 5 Februrary, 1991, this reminder will mail 
  682. X***************
  683. X*** 1272,1282 ****
  684. X  and the body of the message will be blank.
  685. X  .PP
  686. X  .nf
  687. X!     REM AT 17:00 RUN echo "5:00pm - GO HOME!" | xless -g +0+0
  688. X  .fi
  689. X  .PP
  690. X  This reminder will pop up an xless window at 5:00pm every day.  The xless
  691. X  window will contain the line "5:00pm - GO HOME!"
  692. X  .PP
  693. X  .nf
  694. X      remind -c12 /dev/null 1 Jan 1991
  695. X--- 1299,1317 ----
  696. X  and the body of the message will be blank.
  697. X  .PP
  698. X  .nf
  699. X!     REM AT 17:00 RUN echo "5:00pm - GO HOME!" | xless -g +0+0 &
  700. X  .fi
  701. X  .PP
  702. X  This reminder will pop up an xless window at 5:00pm every day.  The xless
  703. X  window will contain the line "5:00pm - GO HOME!"
  704. X+ .PP
  705. X+ .nf
  706. X+     REM AT 23:59 RUN (sleep 120; remind -a .reminders) &
  707. X+ .fi
  708. X+ This reminder will run at one minute to midnight.  It will cause a new
  709. X+ remind process to start at one minute past midnight.  This allows you to
  710. X+ have a continuous reminder service so you can work through the night and
  711. X+ still get timed reminders for early in the morning.
  712. X  .PP
  713. X  .nf
  714. X      remind -c12 /dev/null 1 Jan 1991
  715. X
  716. XThis patch allows you to specify whether or not you have <malloc.h>
  717. XAlso fixes a type mismatch that some compilers complained about.
  718. X*** ../work-backup/timed.c    Thu Nov 15 09:35:21 1990
  719. X--- ./timed.c    Wed Nov 28 10:01:12 1990
  720. X***************
  721. X*** 1,6 ****
  722. X--- 1,8 ----
  723. X  #include <stdio.h>
  724. X  #include <signal.h>
  725. X+ #ifndef NO_MALLOC_H
  726. X  #include <malloc.h>
  727. X+ #endif
  728. X  #include "defines.h"
  729. X  #include "globals.h"
  730. X  #include "protos.h"
  731. X***************
  732. X*** 21,27 ****
  733. X   
  734. X  static AtEntry AtQueue =
  735. X  {
  736. X!    0, 0, 0, 0, 0, NULL, NULL
  737. X  };
  738. X  
  739. X  /***************************************************************/
  740. X--- 23,29 ----
  741. X   
  742. X  static AtEntry AtQueue =
  743. X  {
  744. X!    0, 0, 0, 0, Unknown_t, NULL, NULL
  745. X  };
  746. X  
  747. X  /***************************************************************/
  748. X***************
  749. X*** 151,160 ****
  750. X     signal(SIGHUP, SigHupHandler);
  751. X  
  752. X     while (e = AtQueue.next) {
  753. X-       /* Check if the user has logged off.  If so, die gracefully. */
  754. X-       if (!isatty(1)) {
  755. X-         exit(0);
  756. X-       }
  757. X        now = SystemTime();
  758. X        TimeToSleep = (long) e->firsttime * 60L - now;
  759. X        if (TimeToSleep < 0L) TimeToSleep = 0L;
  760. X--- 153,158 ----
  761. SHAR_EOF
  762. $TOUCH -am 1128112390 patch.03 &&
  763. chmod 0600 patch.03 ||
  764. echo "restore of patch.03 failed"
  765. set `wc -c patch.03`;Wc_c=$1
  766. if test "$Wc_c" != "20501"; then
  767.     echo original size 20501, current size $Wc_c
  768. fi
  769. fi
  770. # ============= kall ==============
  771. if test X"$1" != X"-c" -a -f 'kall'; then
  772.     echo "File already exists: skipping 'kall'"
  773. else
  774. echo "x - extracting kall (Text)"
  775. sed 's/^X//' << 'SHAR_EOF' > kall &&
  776. X#!/bin/sh
  777. X#
  778. X# kall - kill all processes belonging to this user that match
  779. X#           specified string.
  780. X
  781. Xsignal=`echo $1 | grep '^\-.*'`
  782. Xme=`basename $0`
  783. X
  784. Xif [ "$signal" != "" ]; then
  785. X    shift
  786. Xelse
  787. X    signal="-TERM"
  788. Xfi
  789. X
  790. Xif [ "$1" = "" ]; then
  791. X    echo "usage: $me [-signal] string [string...]"
  792. X    echo "       kills all of your processes where command name matches"
  793. X    echo "       any of the given strings."
  794. X    exit
  795. Xfi
  796. X
  797. Xmsg="0"
  798. X
  799. Xwhile [ "$1" != "" ]; do
  800. X
  801. X# NOTE:  You may have to modify the next line, since PS is non-portable.
  802. X# Basically, we list all processes owned by this user, edit out the 'kall'
  803. X# process itself, and collect all processes matching $1.  This is accomplished
  804. X# by the 'sed' command.  The 'awk' command picks out the process IDs to pass
  805. X# them on to kill.
  806. X    rprocs=`ps -cx | sed -n -e /$me/d -e /$1/p | awk '{print $1}'`
  807. X    if [ "$rprocs" != "" ]; then
  808. X        msg="1"
  809. X        echo -n "${me}: Sending $signal signal to $1 process(es)"
  810. X        echo '...'
  811. X        kill $signal $rprocs
  812. X    fi
  813. X    shift
  814. Xdone
  815. X
  816. Xif [ $msg = "1" ]; then
  817. X    echo "${me}: Done."
  818. Xfi
  819. SHAR_EOF
  820. $TOUCH -am 1128115390 kall &&
  821. chmod 0700 kall ||
  822. echo "restore of kall failed"
  823. set `wc -c kall`;Wc_c=$1
  824. if test "$Wc_c" != "1034"; then
  825.     echo original size 1034, current size $Wc_c
  826. fi
  827. fi
  828. exit 0
  829.