home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume34 / remind / patch01b < prev    next >
Encoding:
Text File  |  1992-12-17  |  51.3 KB  |  1,682 lines

  1. Newsgroups: comp.sources.misc
  2. From: <dfs@doe.carleton.ca> (David F. Skoll)
  3. Subject: v34i080:  remind - A replacement for calendar, Patch01b/2
  4. Message-ID: <1992Dec18.212216.15166@sparky.imd.sterling.com>
  5. X-Md4-Signature: 0e3d67773c7fb0af6f8e468daa10c4d3
  6. Date: Fri, 18 Dec 1992 21:22:16 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: <dfs@doe.carleton.ca> (David F. Skoll)
  10. Posting-number: Volume 34, Issue 80
  11. Archive-name: remind/patch01b
  12. Environment: UNIX, MS-DOS
  13. Patch-To: remind: Volume 33, Issue 58-69
  14.  
  15. #! /bin/sh
  16. # This is a shell archive.  Remove anything before this line, then feed it
  17. # into a shell via "sh file" or similar.  To overwrite existing files,
  18. # type "sh file -c".
  19. # Contents:  defs.rem makefile.os2 patch.01.A rem2ps.1 rem2ps.h
  20. # Wrapped by kent@sparky on Fri Dec 18 15:00:44 1992
  21. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
  22. echo If this archive is complete, you will see the following message:
  23. echo '          "shar: End of archive 2 (of 2)."'
  24. if test -f 'defs.rem' -a "${1}" != "-c" ; then 
  25.   echo shar: Will not clobber existing file \"'defs.rem'\"
  26. else
  27.   echo shar: Extracting \"'defs.rem'\" \(3194 characters\)
  28.   sed "s/^X//" >'defs.rem' <<'END_OF_FILE'
  29. X# ---------------------------------------------------------------------------
  30. X#
  31. X# DEFS.REM
  32. X#
  33. X# This file is a reminder script, which contains a few handy definitions.
  34. X# Cut and paste as desired!
  35. X#
  36. X# This file is part of REMIND.
  37. X# Copyright (C) 1992 by David F. Skoll
  38. X#
  39. X# ---------------------------------------------------------------------------
  40. X
  41. X# It's handy to have symbolic constants for weekdays and month names
  42. XSET Sunday    0
  43. XSET Monday    1
  44. XSET Tuesday   2
  45. XSET Wednesday 3
  46. XSET Thursday  4
  47. XSET Friday    5
  48. XSET Saturday  6
  49. X
  50. X# ---------------------------------------------------------------------------
  51. X
  52. XSET Jan 1
  53. XSET Feb 2
  54. XSET Mar 3
  55. XSET Apr 4
  56. XSET May 5
  57. XSET Jun 6
  58. XSET Jul 7
  59. XSET Aug 8
  60. XSET Sep 9
  61. XSET Oct 10
  62. XSET Nov 11
  63. XSET Dec 12
  64. X
  65. X# ---------------------------------------------------------------------------
  66. X
  67. XSET January   1
  68. XSET February  2
  69. XSET March     3
  70. XSET April     4
  71. XSET May       5
  72. XSET June      6
  73. XSET July      7
  74. XSET August    8
  75. XSET September 9
  76. XSET October   10
  77. XSET November  11
  78. XSET December  12
  79. X
  80. X# ---------------------------------------------------------------------------
  81. X
  82. X# A function which, given a time, returns a string in "AM/PM" format.
  83. X# Unfortunately, has a leading zero.  Example call:
  84. X#    set a ampm(now())
  85. X
  86. XFSET ampm(x) iif(x<1:00, x+12*60+"am", \
  87. X             iif(x<12:00, x+"am", \
  88. X                 iif(x<13:00, x+"pm", x-12*60+"pm")))
  89. X
  90. X# A function which knocks off a single leading zero from a string
  91. X
  92. XFSET no_lz(s) iif(substr(s, 1, 1)=="0", substr(s, 2), s)
  93. X
  94. X# ---------------------------------------------------------------------------
  95. X
  96. X# Here's a tricky problem:  The 4th of July is a holiday in the U.S.
  97. X# However, if it falls on a Saturday, the previous Friday is a holiday.
  98. X# If it falls on a Sunday, the next Monday is a holiday.  Here's how
  99. X# to do it.  NOTE that the following procedure makes the OMIT context
  100. X# dependent upon the current date.  SInce it only depends on the current
  101. X# year, which is not likely to change while producing a calendar, we
  102. X# are fairly safe.  However, reminders with huge DELTA or BACK components
  103. X# may not operate as expected.  In general, any time you make OMIT
  104. X# dependent upon the current date, it's tricky and results may not be
  105. X# what you expect.  You should try to make sure that the OMIT context
  106. X# "near" any current reminders will not change during a calendar run.
  107. X
  108. Xset thisyear year(today())
  109. X
  110. XOMIT 4 July MSG The real thing!
  111. X
  112. X# Check for Saturday case
  113. Xif wkdaynum(date(thisyear, 7, 4)) == Saturday
  114. X   OMIT 3 July [thisyear] MSG 4 July (observed)
  115. Xendif
  116. X
  117. X# Check for Sunday case
  118. Xif wkdaynum(date(thisyear, 7, 4)) == Sunday
  119. X   OMIT 5 July [thisyear] MSG 4 July (observed)
  120. Xendif
  121. X
  122. X# ---------------------------------------------------------------------------
  123. X
  124. X# Here's the since() function - quite useful for remembering how
  125. X# old kids are:
  126. X
  127. Xfset since(x) ord(year(trigdate())-x)
  128. X
  129. X# Here's an example of how to use it:
  130. XREM 1 Nov ++12 MSG %"Dean's [since(1984)] birthday%" is %b.
  131. X
  132. X# ---------------------------------------------------------------------------
  133. X
  134. X# How do we get a double-quote into a string????  Only works on ASCII
  135. X# machines
  136. X
  137. Xset example "The last word of this sentence is in " \
  138. X    + char(34) + "quotes." + char(34)
  139. END_OF_FILE
  140.   if test 3194 -ne `wc -c <'defs.rem'`; then
  141.     echo shar: \"'defs.rem'\" unpacked with wrong size!
  142.   fi
  143.   # end of 'defs.rem'
  144. fi
  145. if test -f 'makefile.os2' -a "${1}" != "-c" ; then 
  146.   echo shar: Will not clobber existing file \"'makefile.os2'\"
  147. else
  148.   echo shar: Extracting \"'makefile.os2'\" \(2335 characters\)
  149.   sed "s/^X//" >'makefile.os2' <<'END_OF_FILE'
  150. X# Makefile for REMIND for Microsoft C 6.00A for OS/2 and MSDOS
  151. X# This copy was modified from the original to permit creation of 
  152. X#   remind.exe   OS/2 1.x--2.0 executable
  153. X#   remindb.exe  OS/2 and MSDOS bound executable
  154. X#
  155. X# Darrel Hankerson hank@ducvax.auburn.edu
  156. X# 11 November 1992
  157. X
  158. XO = .obj
  159. X
  160. XCC= cl
  161. X
  162. X# Put any additional flags for the C compiler here
  163. XMODEL = S
  164. XDEFINES= -D__MSDOS__ -D__MSC__ -D__STDC__ -DOS2
  165. XCFLAGS= -A$(MODEL) $(DEFINES)
  166. X
  167. XLINK = cl
  168. XLFLAGS = -A$(MODEL) -Lp
  169. XBIND = bind
  170. X
  171. Xall: remind.exe remindb.exe rem2ps.exe
  172. X
  173. X#-----------------------------------------------------------------------------
  174. X# YOU SHOULDN'T EDIT ANYTHING BELOW HERE.  You may want to change some things
  175. X# in config.h; then, you should be able to type 'make'.
  176. X#-----------------------------------------------------------------------------
  177. XVERSION= 03.00.01
  178. X
  179. XHDRS= config.h err.h expr.h globals.h protos.h types.h version.h
  180. X
  181. XSTDHDRS= config.h types.h protos.h globals.h err.h
  182. X
  183. XSRCS= calendar.c dorem.c dosubst.c expr.c files.c funcs.c globals.c init.c \
  184. Xmain.c omit.c token.c trigger.c userfns.c utils.c var.c
  185. X
  186. XMANIFEST= README.UNIX README.DOS COPYRIGHT $(HDRS) $(SRCS) Makefile rem rem.1 \
  187. Xremind.1 remind-all.csh remind-all.sh test.rem test-rem test.cmp makefile.tc \
  188. Xmakefile.msc lnk.msc lnk.tc MANIFEST.UNX MANIFEST.DOS WHATSNEW.30 kall kall.1 \
  189. Xdefs.rem README.OS2 makefile.os2 rem2ps.c rem2ps.h remind.def rem2ps.1
  190. X
  191. XOBJS= $(SRCS:.c=$O)
  192. X
  193. Xrem2ps.exe: rem2ps.obj remind.def
  194. X    copy remind.def rem2ps.def
  195. X    $(LINK) -o $@ $(LFLAGS) $<
  196. X
  197. Xrem2ps.obj: rem2ps.c
  198. X    $(CC) -c $(CFLAGS) rem2ps.c
  199. X
  200. Xremind.exe: $(OBJS) remind.def
  201. X    $(LINK) -o $@ $(LFLAGS) $< 
  202. X
  203. Xremindb.exe: remind.exe
  204. X    $(BIND) -o $@ $<
  205. X
  206. Xrem2psb.exe: rem2ps.exe
  207. X    $(BIND) -o $@ $<
  208. X
  209. X.c.$O:
  210. X    $(CC) -c $(CFLAGS) $<
  211. X
  212. Xclean:
  213. X    rm -f *$O
  214. X
  215. Xrem2ps$O: rem2ps.c rem2ps.h config.h
  216. Xcalendar$O: calendar.c $(STDHDRS) expr.h
  217. Xdorem$O: dorem.c $(STDHDRS) expr.h
  218. Xdosubst$O: dosubst.c $(STDHDRS)
  219. Xexpr$O: expr.c $(STDHDRS) expr.h
  220. Xfiles$O: files.c $(STDHDRS)
  221. Xfuncs$O: funcs.c $(STDHDRS) expr.h version.h
  222. Xglobals$O: globals.c config.h types.h globals.h err.h
  223. Xinit$O: init.c $(STDHDRS) expr.h version.h
  224. Xmain$O: main.c $(STDHDRS) expr.h
  225. Xomit$O: omit.c $(STDHDRS)
  226. Xtoken$O: token.c $(STDHDRS)
  227. Xtrigger$O: trigger.c $(STDHDRS) expr.h
  228. Xuserfns$O: userfns.c $(STDHDRS) expr.h
  229. Xutils$O: utils.c $(STDHDRS)
  230. Xvar$O: var.c $(STDHDRS) expr.h
  231. END_OF_FILE
  232.   if test 2335 -ne `wc -c <'makefile.os2'`; then
  233.     echo shar: \"'makefile.os2'\" unpacked with wrong size!
  234.   fi
  235.   # end of 'makefile.os2'
  236. fi
  237. if test -f 'patch.01.A' -a "${1}" != "-c" ; then 
  238.   echo shar: Will not clobber existing file \"'patch.01.A'\"
  239. else
  240.   echo shar: Extracting \"'patch.01.A'\" \(32698 characters\)
  241.   sed "s/^X//" >'patch.01.A' <<'END_OF_FILE'
  242. XPrereq: "03.00.00"
  243. X*** ../p0/version.h    Mon Nov  9 14:12:11 1992
  244. X--- ./version.h    Wed Dec 16 10:51:27 1992
  245. X***************
  246. X*** 5,12 ****
  247. X  /*  What version of remind do we have?                         */
  248. X  /*                                                             */
  249. X  /*  This file is part of REMIND.                               */
  250. X! /*  Copyright (C) 1991 by David F. Skoll.                      */
  251. X  /*                                                             */
  252. X  /***************************************************************/
  253. X  
  254. X! #define VERSION "03.00.00"
  255. X--- 5,12 ----
  256. X  /*  What version of remind do we have?                         */
  257. X  /*                                                             */
  258. X  /*  This file is part of REMIND.                               */
  259. X! /*  Copyright (C) 1992 by David F. Skoll.                      */
  260. X  /*                                                             */
  261. X  /***************************************************************/
  262. X  
  263. X! #define VERSION "03.00.01"
  264. X*** ../p0/MANIFEST.DOS    Mon Nov  9 14:12:36 1992
  265. X--- ./MANIFEST.DOS    Wed Dec 16 10:51:55 1992
  266. X***************
  267. X*** 1,6 ****
  268. X--- 1,7 ----
  269. X  calendar.c
  270. X  config.h
  271. X  copyrigh
  272. X+ defs.rem
  273. X  dorem.c
  274. X  dosubst.c
  275. X  err.h
  276. X***************
  277. X*** 18,23 ****
  278. X--- 19,25 ----
  279. X  main.c
  280. X  makefile
  281. X  makefile.msc
  282. X+ makefile.os2
  283. X  makefile.tc
  284. X  manifest.dos
  285. X  manifest.unx
  286. X***************
  287. X*** 25,36 ****
  288. X--- 27,43 ----
  289. X  protos.h
  290. X  queue.c
  291. X  readme.dos
  292. X+ readme.os2
  293. X  readme.uni
  294. X  rem
  295. X  rem.1
  296. X+ rem2ps.1
  297. X+ rem2ps.c
  298. X+ rem2ps.h
  299. X  remind-a.csh
  300. X  remind-a.sh
  301. X  remind.1
  302. X+ remind.def
  303. X  test-rem
  304. X  test.cmp
  305. X  test.rem
  306. X*** ../p0/MANIFEST.UNX    Mon Nov  9 14:12:36 1992
  307. X--- ./MANIFEST.UNX    Wed Dec 16 10:51:55 1992
  308. X***************
  309. X*** 1,6 ****
  310. X  calendar.c
  311. X  config.h
  312. X! COPYRIGHT
  313. X  dorem.c
  314. X  dosubst.c
  315. X  err.h
  316. X--- 1,14 ----
  317. X+ COPYRIGHT
  318. X+ MANIFEST.DOS
  319. X+ MANIFEST.UNX
  320. X+ Makefile
  321. X+ README.DOS
  322. X+ README.OS2
  323. X+ README.UNIX
  324. X+ WHATSNEW.30
  325. X  calendar.c
  326. X  config.h
  327. X! defs.rem
  328. X  dorem.c
  329. X  dosubst.c
  330. X  err.h
  331. X***************
  332. X*** 16,36 ****
  333. X  lnk.msc
  334. X  lnk.tc
  335. X  main.c
  336. X- Makefile
  337. X  makefile.msc
  338. X  makefile.tc
  339. X- MANIFEST.DOS
  340. X- MANIFEST.UNX
  341. X  omit.c
  342. X  protos.h
  343. X  queue.c
  344. X- README.DOS
  345. X- README.UNIX
  346. X  rem
  347. X  rem.1
  348. X  remind-all.csh
  349. X  remind-all.sh
  350. X  remind.1
  351. X  test-rem
  352. X  test.cmp
  353. X  test.rem
  354. X--- 24,44 ----
  355. X  lnk.msc
  356. X  lnk.tc
  357. X  main.c
  358. X  makefile.msc
  359. X+ makefile.os2
  360. X  makefile.tc
  361. X  omit.c
  362. X  protos.h
  363. X  queue.c
  364. X  rem
  365. X  rem.1
  366. X+ rem2ps.1
  367. X+ rem2ps.c
  368. X+ rem2ps.h
  369. X  remind-all.csh
  370. X  remind-all.sh
  371. X  remind.1
  372. X+ remind.def
  373. X  test-rem
  374. X  test.cmp
  375. X  test.rem
  376. X***************
  377. X*** 41,44 ****
  378. X  utils.c
  379. X  var.c
  380. X  version.h
  381. X- WHATSNEW.30
  382. X--- 49,51 ----
  383. X*** ../p0/Makefile    Mon Nov  9 14:12:26 1992
  384. X--- ./Makefile    Wed Dec 16 10:54:10 1992
  385. X***************
  386. X*** 7,13 ****
  387. X  # Uncomment the next line if you are running on a SYSV system
  388. X  # SYSV= -DSYSV
  389. X  
  390. X! # Uncomment the next line if you are running on any type of UNIX system
  391. X  UNIX= -DUNIX
  392. X  
  393. X  # Uncomment the next line if you want to use gcc instead of default compiler
  394. X--- 7,13 ----
  395. X  # Uncomment the next line if you are running on a SYSV system
  396. X  # SYSV= -DSYSV
  397. X  
  398. X! # Uncomment the next line if you are running under UNIX (including SYSV!)
  399. X  UNIX= -DUNIX
  400. X  
  401. X  # Uncomment the next line if you want to use gcc instead of default compiler
  402. X***************
  403. X*** 17,27 ****
  404. X  CFLAGS= -O -ansi
  405. X  CDEFS=
  406. X  
  407. X  #-----------------------------------------------------------------------------
  408. X  # YOU SHOULDN'T EDIT ANYTHING BELOW HERE.  You may want to change some things
  409. X  # in config.h; then, you should be able to type 'make'.
  410. X  #-----------------------------------------------------------------------------
  411. X! VERSION= 03.00.00
  412. X  
  413. X  HDRS= config.h err.h expr.h globals.h protos.h types.h version.h
  414. X  STDHDRS= config.h types.h protos.h globals.h err.h
  415. X--- 17,51 ----
  416. X  CFLAGS= -O -ansi
  417. X  CDEFS=
  418. X  
  419. X+ #### INSTALLATION LOCATIONS ####
  420. X+ # Note that I use 'cp' rather than 'install' for improved portability.
  421. X+ #
  422. X+ # BINDIR:  Where should the Remind executable be installed?
  423. X+ BINDIR= /usr/local/bin
  424. X+ 
  425. X+ # SCRIPTDIR:  Where should the kall and rem shell scripts be installed?
  426. X+ SCRIPTDIR= /usr/share/bin
  427. X+ 
  428. X+ # MANDIR:  Where should the man pages be installed?
  429. X+ MANDIR= /usr/local/man
  430. X+ 
  431. X+ # MANSECT:  Which man section should the man pages go into?
  432. X+ MANSECT= 1
  433. X+ 
  434. X+ # EXEMODE:  What file protection mode should be used for the executables?
  435. X+ EXEMODE= 755
  436. X+ 
  437. X+ # MANMODE:  What file protection mode should be used for the man pages?
  438. X+ MANMODE= 644
  439. X+ 
  440. X+ # OWNER:  What owner and group to use for executables, scripts and man pages?
  441. X+ OWNER=bin.bin
  442. X+ 
  443. X  #-----------------------------------------------------------------------------
  444. X  # YOU SHOULDN'T EDIT ANYTHING BELOW HERE.  You may want to change some things
  445. X  # in config.h; then, you should be able to type 'make'.
  446. X  #-----------------------------------------------------------------------------
  447. X! VERSION= 03.00.01
  448. X  
  449. X  HDRS= config.h err.h expr.h globals.h protos.h types.h version.h
  450. X  STDHDRS= config.h types.h protos.h globals.h err.h
  451. X***************
  452. X*** 30,48 ****
  453. X  
  454. X  MANIFEST= README.UNIX README.DOS COPYRIGHT $(HDRS) $(SRCS) Makefile rem rem.1 \
  455. X  remind.1 remind-all.csh remind-all.sh test.rem test-rem test.cmp makefile.tc \
  456. X! makefile.msc lnk.msc lnk.tc MANIFEST.UNX MANIFEST.DOS WHATSNEW.30 kall kall.1
  457. X  
  458. X  OBJS= $(SRCS:.c=.o)
  459. X  
  460. X! remind: $(OBJS)
  461. X!     $(CC) -o remind $(OBJS)
  462. X  
  463. X  .c.o:
  464. X      $(CC) $(UNIX) $(SYSV) -c -o $*.o $(CFLAGS) $(CDEFS) $*.c
  465. X  
  466. X  clean:
  467. X      rm -f *.o *~
  468. X  
  469. X  calendar.o: calendar.c $(STDHDRS) expr.h
  470. X  dorem.o: dorem.c $(STDHDRS) expr.h
  471. X  dosubst.o: dosubst.c $(STDHDRS)
  472. X--- 54,79 ----
  473. X  
  474. X  MANIFEST= README.UNIX README.DOS COPYRIGHT $(HDRS) $(SRCS) Makefile rem rem.1 \
  475. X  remind.1 remind-all.csh remind-all.sh test.rem test-rem test.cmp makefile.tc \
  476. X! makefile.msc lnk.msc lnk.tc MANIFEST.UNX MANIFEST.DOS WHATSNEW.30 kall kall.1 \
  477. X! defs.rem README.OS2 makefile.os2 rem2ps.c rem2ps.h remind.def rem2ps.1
  478. X  
  479. X  OBJS= $(SRCS:.c=.o)
  480. X  
  481. X! all: remind rem2ps
  482. X  
  483. X  .c.o:
  484. X      $(CC) $(UNIX) $(SYSV) -c -o $*.o $(CFLAGS) $(CDEFS) $*.c
  485. X  
  486. X+ rem2ps: rem2ps.o
  487. X+     $(CC) -o rem2ps rem2ps.o
  488. X+ 
  489. X+ remind: $(OBJS)
  490. X+     $(CC) -o remind $(OBJS)
  491. X+ 
  492. X  clean:
  493. X      rm -f *.o *~
  494. X  
  495. X+ rem2ps.o: rem2ps.c
  496. X  calendar.o: calendar.c $(STDHDRS) expr.h
  497. X  dorem.o: dorem.c $(STDHDRS) expr.h
  498. X  dosubst.o: dosubst.c $(STDHDRS)
  499. X***************
  500. X*** 61,75 ****
  501. X  var.o: var.c $(STDHDRS) expr.h
  502. X  
  503. X  tarZ:
  504. X!     tar cvf remind-3.0.0.tar $(MANIFEST)
  505. X!     compress -v remind-3.0.0.tar
  506. X  
  507. X  shar:
  508. X      shar -x -n"Remind $(VERSION)" -l45 -o./Shar $(MANIFEST)
  509. X  
  510. X  todos:
  511. X-     mdel 'a:*.*'
  512. X-     mdel 'a:*'
  513. X      mcopy -tn $(MANIFEST) a:
  514. X  
  515. X  fromdos:
  516. X--- 92,104 ----
  517. X  var.o: var.c $(STDHDRS) expr.h
  518. X  
  519. X  tarZ:
  520. X!     tar cvf remind-3.0.1.tar $(MANIFEST)
  521. X!     compress -v remind-3.0.1.tar
  522. X  
  523. X  shar:
  524. X      shar -x -n"Remind $(VERSION)" -l45 -o./Shar $(MANIFEST)
  525. X  
  526. X  todos:
  527. X      mcopy -tn $(MANIFEST) a:
  528. X  
  529. X  fromdos:
  530. X***************
  531. X*** 76,81 ****
  532. X--- 105,111 ----
  533. X      mcopy -tn 'a:*' .
  534. X      -mv -f copyrigh COPYRIGHT
  535. X      -mv -f makefile Makefile
  536. X+     -mv -f readme.os2 README.OS2
  537. X      -mv -f readme.dos README.DOS
  538. X      -mv -f readme.uni README.UNIX
  539. X      -mv -f remind-a.csh remind-all.csh
  540. X***************
  541. X*** 89,92 ****
  542. X      cp $(MANIFEST) ../backup
  543. X  
  544. X  transmit:
  545. X!     sz -a -Z -e $(MANIFEST)
  546. X--- 119,154 ----
  547. X      cp $(MANIFEST) ../backup
  548. X  
  549. X  transmit:
  550. X!     sz -a -e $(MANIFEST)
  551. X! 
  552. X! install:  install-bin install-scripts install-man
  553. X! 
  554. X! install-bin: remind rem2ps
  555. X!     cp remind $(BINDIR)/remind
  556. X!     -chmod $(EXEMODE) $(BINDIR)/remind
  557. X!     -chown $(OWNER) $(BINDIR)/remind
  558. X!     cp rem2ps $(BINDIR)/rem2ps
  559. X!     -chmod $(EXEMODE) $(BINDIR)/rem2ps
  560. X!     -chown $(OWNER) $(BINDIR)/rem2ps
  561. X! 
  562. X! install-scripts:
  563. X!     cp kall $(SCRIPTDIR)/kall
  564. X!     -chmod $(EXEMODE) $(SCRIPTDIR)/kall
  565. X!     -chown $(OWNER) $(SCRIPTDIR)/kall
  566. X!     cp rem $(SCRIPTDIR)/rem
  567. X!     -chmod $(EXEMODE) $(SCRIPTDIR)/rem
  568. X!     -chown $(OWNER) $(SCRIPTDIR)/rem
  569. X! 
  570. X! install-man:
  571. X!     cp remind.1 $(MANDIR)/man$(MANSECT)/remind.$(MANSECT)
  572. X!     -chmod $(MANMODE) $(MANDIR)/man$(MANSECT)/remind.$(MANSECT)
  573. X!     -chown $(OWNER) $(MANDIR)/man$(MANSECT)/remind.$(MANSECT)
  574. X!     cp rem.1 $(MANDIR)/man$(MANSECT)/rem.$(MANSECT)
  575. X!     -chmod $(MANMODE) $(MANDIR)/man$(MANSECT)/rem.$(MANSECT)
  576. X!     -chown $(OWNER) $(MANDIR)/man$(MANSECT)/rem.$(MANSECT)
  577. X!     cp kall.1 $(MANDIR)/man$(MANSECT)/kall.$(MANSECT)
  578. X!     -chmod $(MANMODE) $(MANDIR)/man$(MANSECT)/kall.$(MANSECT)
  579. X!     -chown $(OWNER) $(MANDIR)/man$(MANSECT)/kall.$(MANSECT)
  580. X!     cp rem2ps.1 $(MANDIR)/man$(MANSECT)/rem2ps.$(MANSECT)
  581. X!     -chmod $(MANMODE) $(MANDIR)/man$(MANSECT)/rem2ps.$(MANSECT)
  582. X!     -chown $(OWNER) $(MANDIR)/man$(MANSECT)/rem2ps.$(MANSECT)
  583. X*** ../p0/README.DOS    Mon Nov  9 14:12:05 1992
  584. X--- ./README.DOS    Wed Dec 16 10:51:22 1992
  585. X***************
  586. X*** 15,19 ****
  587. X--- 15,27 ----
  588. X  
  589. X  This will create REMIND.EXE, which is ready to be executed.
  590. X  
  591. X+ The file "defs.rem" has some sample Remind definitions and commands.
  592. X+ 
  593. X  --
  594. X  David F. Skoll <dfs@doe.carleton.ca>
  595. X+ 4-317 LeBreton Street South
  596. X+ Ottawa, Ontario K1S 4L4
  597. X+ CANADA
  598. X+ 
  599. X+ Tel. (613) 567-3662
  600. X+ 
  601. X*** ../p0/README.UNIX    Mon Nov  9 14:12:05 1992
  602. X--- ./README.UNIX    Wed Dec 16 10:51:21 1992
  603. X***************
  604. X*** 16,25 ****
  605. X  
  606. X  5 - Type 'make'
  607. X  
  608. X! 6 - Type 'test-rem' to run the acceptance test
  609. X  
  610. X! 7 - Copy the remind executable to the appropriate directory, and copy
  611. X!     the man page to the man directory.
  612. X  
  613. X  Two shell scripts, "remind-all.csh" and "remind-all.sh" are provided.
  614. X  These allow automatic mailing of reminders to all users who create a
  615. X--- 16,25 ----
  616. X  
  617. X  5 - Type 'make'
  618. X  
  619. X! 6 - Type 'sh test-rem' to run the acceptance test
  620. X  
  621. X! 7 - Type 'make install' to install Remind, kall, rem and the man
  622. X!     pages.
  623. X  
  624. X  Two shell scripts, "remind-all.csh" and "remind-all.sh" are provided.
  625. X  These allow automatic mailing of reminders to all users who create a
  626. X***************
  627. X*** 38,46 ****
  628. X--- 38,61 ----
  629. X  is provided.  You should examine the script to ensure that the defaults
  630. X  are correct.
  631. X  
  632. X+ Many people have asked me why I supply the "rem" script instead of
  633. X+ having Remind assume a default file.  The answer is: That's how I like
  634. X+ it!  My personal preference is for a program which normally takes
  635. X+ parameters to display usage information when invoked with no
  636. X+ parameters.  I like that behaviour so I can quickly get an idea of
  637. X+ what a program does without poring through the man page.  And I think
  638. X+ I'll keep Remind that way.  Sorry to all who dislike it. :-)
  639. X+ 
  640. X  A shell script called "kall" is provided so you can kill your background
  641. X  remind processes when you log out.  See the man page.  Note that kall
  642. X  depends on the output of "ps", and may not be portable.
  643. X  
  644. X+ The file "defs.rem" has some sample Remind definitions and commands.
  645. X+ 
  646. X  --
  647. X  David F. Skoll <dfs@doe.carleton.ca>
  648. X+ 4-317 LeBreton Street South
  649. X+ Ottawa, Ontario K1S 4L4
  650. X+ CANADA
  651. X+ 
  652. X+ Tel. (613) 567-3662
  653. X*** ../p0/WHATSNEW.30    Mon Nov  9 14:12:37 1992
  654. X--- ./WHATSNEW.30    Wed Dec 16 10:51:56 1992
  655. X***************
  656. X*** 1,5 ****
  657. X--- 1,50 ----
  658. X  CHANGES TO REMIND
  659. X  
  660. X+ *** PLEASE NOTE:  AFTER 24 FEBRUARY, 1993, MY NEW ADDRESS WILL BE:
  661. X+ 986 Eiffel Avenue,
  662. X+ Ottawa, Ontario
  663. X+ Canada
  664. X+ 
  665. X+ * Version 3.0 Patch 1
  666. X+ 
  667. X+ - Wrote the Rem2ps program to produce PostScript calendars
  668. X+ 
  669. X+ - Added an 'install' target to the Makefile
  670. X+ 
  671. X+ - Fixed a bug which allowed the shell() function to execute in timed
  672. X+   reminders which were queued with RUN disabled.
  673. X+ 
  674. X+ - Added support for OS/2, courtesy of DARREL HANKERSON
  675. X+   <HANK@DUCVAX.AUBURN.EDU>
  676. X+ 
  677. X+ - In expressions, can now specify literal dates as 'yyyy/mm/dd' rather than
  678. X+   using the date() function.
  679. X+ 
  680. X+ - Fixed all the source files to include "config.h" first.
  681. X+ 
  682. X+ - Changed the way triggers are calculated so that trigger dates are 
  683. X+   always valid if year, month and day are specified, and there is no
  684. X+   UNTIL clause.  See MAN page section "DETAILS ABOUT TRIGVALID()."
  685. X+ 
  686. X+ - Defined _POSIX_SOURCE so Remind will compile on SGI workstations (and
  687. X+   be more portable... I hope.)
  688. X+ 
  689. X+ - Fixed some rather brain-dead definitions of UPPER and LOWER, as pointed
  690. X+   out by <rsalz@osf.org>
  691. X+ 
  692. X+ - Added more details to the Man page concerning how triggers are computed,
  693. X+   and added warnings about computing OMIT dates.
  694. X+ 
  695. X+ - Added the file defs.rem which contains examples of useful definitions and
  696. X+   triggers.
  697. X+ 
  698. X+ - Changed the script test-rem to be a sh script instead of csh for improved
  699. X+   portability.
  700. X+ 
  701. X+ - Fixed up the README.* files to reflect the changes.
  702. X+ 
  703. X+ - Re-formatted the WHATSNEW.30 file.
  704. X+ 
  705. X  * Version 3.0
  706. X  
  707. X  - Total rewrite from previous versions
  708. X***************
  709. X*** 21,100 ****
  710. X  - Fixed a lurking bug in trigger date calculation which, amazingly, had not
  711. X    been caught in the couple of years that Remind has been out!
  712. X  
  713. X! * Version 2.4 Patch 5 - Added the "c+n" option for printing a calendar by
  714. X! weeks instead of months, courtesy Dennis Cottel (dennis@peanuts.nosc.mil).
  715. X  
  716. X! * Version 2.3 Patch 4 - Made the init.c file nicer.  Made the Makefile
  717. X! prettier.  Added "make test", "make tar" and "make shar" Makefile targets.
  718. X  
  719. X! * Version 2.3 Patch 3 - Added a command-line option for Remind to process
  720. X! queued reminders in the foreground.  This makes automatic termination
  721. X! of Remind processes from within X-Windows and Sunview easier.
  722. X  
  723. X! * Version 2.3 Patch 2 - Fixed up a problem with timed reminders which resulted
  724. X! in cursor not starting from left side of screen on some systems.
  725. X  
  726. X! Fixed the SIGINT handler for SYSV systems - this was interrupting the
  727. X! sleep(2) system call.
  728. X  
  729. X! Closed stdin and stdout if remind was part of a pipe - this prevents other
  730. X! sections of the pipe from hanging as remind puts itself in the background.
  731. X  
  732. X! Added the "-h" (Hush mode) option
  733. X  
  734. X! Added the "%#" and "%@" modifiers for the current time.
  735. X  
  736. X! Made the Makefile more portable
  737. X  
  738. X! * Version 2.3 Patch 1 - Added the "-t" command-line option to get Remind
  739. X! to trigger all non-expired reminders.
  740. X  
  741. X! Added Turbo C support courtesy of Rhys Weatherly
  742. X  
  743. X! Added the "RUN ON" and "RUN OFF" commands for a secure interface with
  744. X! the Elm mail system.
  745. X  
  746. X! Added the "rem" shell script for running Remind with a default script.
  747. X  
  748. X! Added manual pages for "kall" and "rem".
  749. X  
  750. X! * Version 2.3 - Added the UNTIL keyword for forcing reminders to expire.
  751. X  
  752. X! Added the "++" form of 'back' and the "--" form of 'delta' for
  753. X! ignoring OMIT information.
  754. X  
  755. X! Added the CLEAR-OMIT-CONTEXT, PUSH-OMIT-CONTEXT and POP-OMIT-CONTEXT
  756. X! keywords for isolating personal or peculiar reminders from the global
  757. X! OMIT context.
  758. X  
  759. X! Speeded up the parsing of tokens.
  760. X  
  761. X! Changed the source to recognize and exploit ANSI-C compilers which
  762. X! accept function prototypes.
  763. X  
  764. X! Added the "-n" option to output the next occurrence of each reminder
  765. X! in SimpleCalendar format
  766. X  
  767. X! Modified the calendar and SimpleCalendar formats so that the % escape
  768. X! substitutions ARE performed.
  769. X  
  770. X! * Version 2.2 - Patch 5 - Added the BEFORE, AFTER and SKIP tokens to make the
  771. X! handling of holidays more sensible.  Also corrected a few more bugs.
  772. X  
  773. X! * Version 2.2 - Patch 3  - Added the MSG or RUN tokens in an OMIT command; also
  774. X! allowed RUN-type reminders to be explicitly included in the calendar by
  775. X! using the %" escape sequence.
  776. X  
  777. X! * Version 2.2 - Added the AT keyword, the timed reminders daemon, and the
  778. X! calendar facility.
  779. X  
  780. X! * Version 2.1 - Added the "repeat" token for repeating reminders with a period
  781. X! other than 7 days.  Also fixed some bugs from version 2.0
  782. X  
  783. X! * Version 2.0 - first public release.  Included advanced date specifications,
  784. X! character substitution, and the RUN keyword.
  785. X  
  786. X! * Version 1.0 - never publicly released.
  787. X  
  788. X  
  789. X  
  790. X--- 66,169 ----
  791. X  - Fixed a lurking bug in trigger date calculation which, amazingly, had not
  792. X    been caught in the couple of years that Remind has been out!
  793. X  
  794. X! * Version 2.4 Patch 5 
  795. X  
  796. X! - Added the "c+n" option for printing a calendar by
  797. X!   weeks instead of months, courtesy Dennis Cottel (dennis@peanuts.nosc.mil).
  798. X  
  799. X! * Version 2.3 Patch 4
  800. X  
  801. X! - Made the init.c file nicer.  Made the Makefile
  802. X!   prettier.  Added "make test", "make tar" and "make shar" Makefile targets.
  803. X  
  804. X! * Version 2.3 Patch 3
  805. X  
  806. X! - Added a command-line option for Remind to process
  807. X!   queued reminders in the foreground.  This makes automatic termination
  808. X!   of Remind processes from within X-Windows and Sunview easier.
  809. X  
  810. X! * Version 2.3 Patch 2
  811. X  
  812. X! - Fixed up a problem with timed reminders which resulted
  813. X!   in cursor not starting from left side of screen on some systems.
  814. X  
  815. X! - Fixed the SIGINT handler for SYSV systems - this was interrupting the
  816. X!   sleep(2) system call.
  817. X  
  818. X! - Closed stdin and stdout if remind was part of a pipe - this prevents other
  819. X!   sections of the pipe from hanging as remind puts itself in the background.
  820. X  
  821. X! - Added the "-h" (Hush mode) option
  822. X  
  823. X! - Added the "%#" and "%@" modifiers for the current time.
  824. X  
  825. X! - Made the Makefile more portable
  826. X  
  827. X! * Version 2.3 Patch 1
  828. X  
  829. X! - Added the "-t" command-line option to get Remind
  830. X!   to trigger all non-expired reminders.
  831. X  
  832. X! - Added Turbo C support courtesy of Rhys Weatherly
  833. X  
  834. X! - Added the "RUN ON" and "RUN OFF" commands for a secure interface with
  835. X!   the Elm mail system.
  836. X  
  837. X! - Added the "rem" shell script for running Remind with a default script.
  838. X  
  839. X! - Added manual pages for "kall" and "rem".
  840. X  
  841. X! * Version 2.3
  842. X  
  843. X! - Added the UNTIL keyword for forcing reminders to expire.
  844. X  
  845. X! - Added the "++" form of 'back' and the "--" form of 'delta' for
  846. X!   ignoring OMIT information.
  847. X  
  848. X! - Added the CLEAR-OMIT-CONTEXT, PUSH-OMIT-CONTEXT and POP-OMIT-CONTEXT
  849. X!   keywords for isolating personal or peculiar reminders from the global
  850. X!   OMIT context.
  851. X  
  852. X! - Speeded up the parsing of tokens.
  853. X  
  854. X! - Changed the source to recognize and exploit ANSI-C compilers which
  855. X!   accept function prototypes.
  856. X  
  857. X! - Added the "-n" option to output the next occurrence of each reminder
  858. X!   in SimpleCalendar format
  859. X  
  860. X! - Modified the calendar and SimpleCalendar formats so that the % escape
  861. X!   substitutions ARE performed.
  862. X! 
  863. X! * Version 2.2 - Patch 5
  864. X! 
  865. X! - Added the BEFORE, AFTER and SKIP tokens to make the
  866. X!   handling of holidays more sensible.  Also corrected a few more bugs.
  867. X! 
  868. X! * Version 2.2 - Patch 3
  869. X! 
  870. X! - Added the MSG or RUN tokens in an OMIT command; also
  871. X!   allowed RUN-type reminders to be explicitly included in the calendar by
  872. X!   using the %" escape sequence.
  873. X! 
  874. X! * Version 2.2
  875. X! 
  876. X! - Added the AT keyword, the timed reminders daemon, and the
  877. X!   calendar facility.
  878. X! 
  879. X! * Version 2.1
  880. X! 
  881. X! - Added the "repeat" token for repeating reminders with a period
  882. X!   other than 7 days.  Also fixed some bugs from version 2.0
  883. X! 
  884. X! * Version 2.0
  885. X! 
  886. X! - first public release.  Included advanced date specifications,
  887. X!   character substitution, and the RUN keyword.
  888. X! 
  889. X! * Version 1.0
  890. X! 
  891. X! - never publicly released.
  892. X  
  893. X  
  894. X  
  895. X*** ../p0/calendar.c    Mon Nov  9 14:12:13 1992
  896. X--- ./calendar.c    Wed Dec 16 10:51:29 1992
  897. X***************
  898. X*** 173,182 ****
  899. X--- 173,202 ----
  900. X  static void DoCalendarOneMonth()
  901. X  #endif
  902. X  {
  903. X+    int y, m, d, mm, yy;
  904. X+ 
  905. X     if (!DoSimpleCalendar) WriteCalHeader();
  906. X  
  907. X+    if (PsCal) {
  908. X+       FromJulian(JulianToday, &y, &m, &d);
  909. X+       printf("%s\n", PSBEGIN);
  910. X+       printf("%s %d %d %d\n",
  911. X+               MonthName[m], y, DaysInMonth(m, y), (JulianToday+1) % 7);
  912. X+       mm = m-1;
  913. X+       if (mm<0) {
  914. X+          mm = 11; yy = y-1;
  915. X+       } else yy=y;
  916. X+ 
  917. X+       printf("%s %d\n", MonthName[mm], DaysInMonth(mm,yy));
  918. X+       mm = m+1;
  919. X+       if (mm>11) {
  920. X+          mm = 0; yy = y+1;
  921. X+       } else yy=y;
  922. X+       printf("%s %d\n", MonthName[mm], DaysInMonth(mm,yy));
  923. X+    }
  924. X     while (WriteCalendarRow()) continue;
  925. X  
  926. X+    if (PsCal) printf("%s\n", PSEND);
  927. X     if (!DoSimpleCalendar) WriteCalTrailer();
  928. X  }   
  929. X  
  930. X*** ../p0/config.h    Mon Nov  9 14:12:07 1992
  931. X--- ./config.h    Wed Dec 16 10:51:23 1992
  932. X***************
  933. X*** 7,13 ****
  934. X  /*  care of certain system dependencies.                       */
  935. X  /*                                                             */
  936. X  /*  This file is part of REMIND.                               */
  937. X! /*  Copyright (C) 1991 by David F. Skoll.                      */
  938. X  /*                                                             */
  939. X  /***************************************************************/
  940. X  
  941. X--- 7,13 ----
  942. X  /*  care of certain system dependencies.                       */
  943. X  /*                                                             */
  944. X  /*  This file is part of REMIND.                               */
  945. X! /*  Copyright (C) 1992 by David F. Skoll.                      */
  946. X  /*                                                             */
  947. X  /***************************************************************/
  948. X  
  949. X***************
  950. X*** 109,115 ****
  951. X--- 109,117 ----
  952. X  /*---------------------------------------------------------------------*/
  953. X  /* Do we have the <unistd.h> header?  If not, use sys/files.h          */
  954. X  /*---------------------------------------------------------------------*/
  955. X+ #ifdef UNIX
  956. X  #define HAVE_UNISTD 1
  957. X+ #endif
  958. X  
  959. X  /*---------------------------------------------------------------------*/
  960. X  /* How many attempts to resolve a weird date spec?                     */
  961. X***************
  962. X*** 151,153 ****
  963. X--- 153,162 ----
  964. X  /*---------------------------------------------------------------------*/
  965. X  #define PUBLIC
  966. X  #define PRIVATE static
  967. X+ 
  968. X+ #ifdef UNIX
  969. X+ #define _POSIX_SOURCE
  970. X+ #endif
  971. X+ 
  972. X+ #define PSBEGIN "# rem2ps begin"
  973. X+ #define PSEND   "# rem2ps end"
  974. X*** ../p0/dorem.c    Mon Nov  9 14:12:13 1992
  975. X--- ./dorem.c    Wed Dec 16 10:51:30 1992
  976. X***************
  977. X*** 10,17 ****
  978. X  /*  Copyright (C) 1992 by David F. Skoll.                      */
  979. X  /*                                                             */
  980. X  /***************************************************************/
  981. X- #include <stdio.h>
  982. X  #include "config.h"
  983. X  #ifdef HAVE_STDLIB_H
  984. X  #include <stdlib.h>
  985. X  #endif
  986. X--- 10,17 ----
  987. X  /*  Copyright (C) 1992 by David F. Skoll.                      */
  988. X  /*                                                             */
  989. X  /***************************************************************/
  990. X  #include "config.h"
  991. X+ #include <stdio.h>
  992. X  #ifdef HAVE_STDLIB_H
  993. X  #include <stdlib.h>
  994. X  #endif
  995. X*** ../p0/dosubst.c    Mon Nov  9 14:12:14 1992
  996. X--- ./dosubst.c    Wed Dec 16 10:51:30 1992
  997. X***************
  998. X*** 9,17 ****
  999. X  /*  Copyright (C) 1992 by David F. Skoll.                      */
  1000. X  /*                                                             */
  1001. X  /***************************************************************/
  1002. X  #include <stdio.h>
  1003. X  #include <ctype.h>
  1004. X- #include "config.h"
  1005. X  #ifdef HAVE_STDLIB_H
  1006. X  #include <stdlib.h>
  1007. X  #endif
  1008. X--- 9,17 ----
  1009. X  /*  Copyright (C) 1992 by David F. Skoll.                      */
  1010. X  /*                                                             */
  1011. X  /***************************************************************/
  1012. X+ #include "config.h"
  1013. X  #include <stdio.h>
  1014. X  #include <ctype.h>
  1015. X  #ifdef HAVE_STDLIB_H
  1016. X  #include <stdlib.h>
  1017. X  #endif
  1018. X***************
  1019. X*** 110,116 ****
  1020. X        if (err) return err;
  1021. X        if (c == '\n') continue;
  1022. X        if (!c) {
  1023. X!          if (mode != CAL_MODE) *s++ = '\n';
  1024. X       *s++ = 0;
  1025. X       break;
  1026. X        }
  1027. X--- 110,116 ----
  1028. X        if (err) return err;
  1029. X        if (c == '\n') continue;
  1030. X        if (!c) {
  1031. X!          if (mode != CAL_MODE && t->typ != RUN_TYPE) *s++ = '\n';
  1032. X       *s++ = 0;
  1033. X       break;
  1034. X        }
  1035. X***************
  1036. X*** 346,352 ****
  1037. X          s += strlen(s);
  1038. X          break;
  1039. X  
  1040. X!          case '_': sprintf(s, "%s", NL);
  1041. X          s += strlen(s);
  1042. X          break;
  1043. X  
  1044. X--- 346,356 ----
  1045. X          s += strlen(s);
  1046. X          break;
  1047. X  
  1048. X!          case '_': 
  1049. X!             if (mode != CAL_MODE)
  1050. X!                sprintf(s, "%s", NL);
  1051. X!             else
  1052. X!                sprintf(s, " ");
  1053. X          s += strlen(s);
  1054. X          break;
  1055. X  
  1056. X*** ../p0/err.h    Mon Nov  9 14:12:07 1992
  1057. X--- ./err.h    Wed Dec 16 10:51:24 1992
  1058. X***************
  1059. X*** 5,11 ****
  1060. X  /*  Error definitions.                                         */
  1061. X  /*                                                             */
  1062. X  /*  This file is part of REMIND.                               */
  1063. X! /*  Copyright (C) 1991 by David F. Skoll.                      */
  1064. X  /*                                                             */
  1065. X  /***************************************************************/
  1066. X  
  1067. X--- 5,11 ----
  1068. X  /*  Error definitions.                                         */
  1069. X  /*                                                             */
  1070. X  /*  This file is part of REMIND.                               */
  1071. X! /*  Copyright (C) 1992 by David F. Skoll.                      */
  1072. X  /*                                                             */
  1073. X  /***************************************************************/
  1074. X  
  1075. X*** ../p0/expr.c    Mon Nov  9 14:12:16 1992
  1076. X--- ./expr.c    Wed Dec 16 10:51:32 1992
  1077. X***************
  1078. X*** 5,23 ****
  1079. X  /*  This file contains routines to parse and evaluate          */
  1080. X  /*  expressions.                                               */
  1081. X  /*                                                             */
  1082. X! /*  Copyright 1991 by David F. Skoll.                          */
  1083. X  /*                                                             */
  1084. X  /***************************************************************/
  1085. X  
  1086. X! /* If we're using Turbo C, turn off annoying warning messages! */
  1087. X! #ifdef __TURBOC__
  1088. X! #pragma warn -pia
  1089. X! #endif
  1090. X! 
  1091. X  #include <stdio.h>
  1092. X  #include <ctype.h>
  1093. X  #include <string.h>
  1094. X- #include "config.h"
  1095. X  #ifdef HAVE_STDLIB_H
  1096. X  #include <stdlib.h>
  1097. X  #endif
  1098. X--- 5,18 ----
  1099. X  /*  This file contains routines to parse and evaluate          */
  1100. X  /*  expressions.                                               */
  1101. X  /*                                                             */
  1102. X! /*  Copyright 1992 by David F. Skoll.                          */
  1103. X  /*                                                             */
  1104. X  /***************************************************************/
  1105. X  
  1106. X! #include "config.h"
  1107. X  #include <stdio.h>
  1108. X  #include <ctype.h>
  1109. X  #include <string.h>
  1110. X  #ifdef HAVE_STDLIB_H
  1111. X  #include <stdlib.h>
  1112. X  #endif
  1113. X***************
  1114. X*** 62,67 ****
  1115. X--- 57,63 ----
  1116. X  PRIVATE int MakeValue ARGS ((char *s, Value *v, Var *locals));
  1117. X  PRIVATE int PushOpStack ARGS ((Operator *op));
  1118. X  PRIVATE int PopOpStack ARGS ((Operator *op));
  1119. X+ PRIVATE int ParseLiteralDate ARGS ((char **s, int *jul));
  1120. X  
  1121. X  /* Binary operators - all left-associative */
  1122. X  
  1123. X***************
  1124. X*** 236,243 ****
  1125. X        if (c == '\"') return OK ; else return E_MISS_QUOTE;
  1126. X     }
  1127. X  
  1128. X!    if (!ISID(c)) return E_ILLEGAL_CHAR;
  1129. X  
  1130. X     /* Parse a constant, variable name or function */
  1131. X     while (ISID(**in) || **in == ':') *out++ = *(*in)++;
  1132. X  
  1133. X--- 232,249 ----
  1134. X        if (c == '\"') return OK ; else return E_MISS_QUOTE;
  1135. X     }
  1136. X  
  1137. X!    /* Dates can be specified with single-quotes */
  1138. X!    if (c == '\'') {
  1139. X!       while (**in) if ((c = *out++ = *(*in)++) == '\'') break;
  1140. X!       *out = 0;
  1141. X!       if (c == '\'') return OK ; else return E_MISS_QUOTE;
  1142. X!    }
  1143. X  
  1144. X+    if (!ISID(c)) {
  1145. X+       Eprint("%s '%c'", ErrMsg[E_ILLEGAL_CHAR], c);
  1146. X+       return E_ILLEGAL_CHAR;
  1147. X+    }
  1148. X+ 
  1149. X     /* Parse a constant, variable name or function */
  1150. X     while (ISID(**in) || **in == ':') *out++ = *(*in)++;
  1151. X  
  1152. X***************
  1153. X*** 337,343 ****
  1154. X             r = Evaluate(s, locals);
  1155. X             if (r) return r;
  1156. X             if (*ExprBuf == ')') break;
  1157. X!            else if (*ExprBuf != ',') return E_ILLEGAL_CHAR;
  1158. X              }
  1159. X          if (f) r = CallFunc(f, args);
  1160. X          else {
  1161. X--- 343,352 ----
  1162. X             r = Evaluate(s, locals);
  1163. X             if (r) return r;
  1164. X             if (*ExprBuf == ')') break;
  1165. X!            else if (*ExprBuf != ',') {
  1166. X!            Eprint("Expecting comma, found '%c'", *ExprBuf);
  1167. X!               return E_ILLEGAL_CHAR;
  1168. X!                }
  1169. X              }
  1170. X          if (f) r = CallFunc(f, args);
  1171. X          else {
  1172. X***************
  1173. X*** 352,358 ****
  1174. X              r = PushOpStack(f);
  1175. X              if (r) return r;
  1176. X          continue;  /* Still looking for an atomic vlue */
  1177. X!      } else if (!ISID(*ExprBuf) && *ExprBuf != '"') {
  1178. X          return E_ILLEGAL_CHAR;
  1179. X       } else { /* Must be a literal value */
  1180. X          r = MakeValue(ExprBuf, &va, locals);
  1181. X--- 361,368 ----
  1182. X              r = PushOpStack(f);
  1183. X              if (r) return r;
  1184. X          continue;  /* Still looking for an atomic vlue */
  1185. X!      } else if (!ISID(*ExprBuf) && *ExprBuf != '"' && *ExprBuf != '\'') {
  1186. X!             Eprint("%s '%c'", ErrMsg[E_ILLEGAL_CHAR], *ExprBuf);
  1187. X          return E_ILLEGAL_CHAR;
  1188. X       } else { /* Must be a literal value */
  1189. X          r = MakeValue(ExprBuf, &va, locals);
  1190. X***************
  1191. X*** 408,415 ****
  1192. X  /***************************************************************/
  1193. X  /*                                                             */
  1194. X  /*  MakeValue                                                  */
  1195. X! /*  Generate a literal value.  It's either a string, a number  */
  1196. X! /*  or the value of a symbol.                                  */
  1197. X  /*                                                             */
  1198. X  /***************************************************************/
  1199. X  #ifdef HAVE_PROTOS
  1200. X--- 418,425 ----
  1201. X  /***************************************************************/
  1202. X  /*                                                             */
  1203. X  /*  MakeValue                                                  */
  1204. X! /*  Generate a literal value.  It's either a string, a number, */
  1205. X! /*  a date or the value of a symbol.                           */
  1206. X  /*                                                             */
  1207. X  /***************************************************************/
  1208. X  #ifdef HAVE_PROTOS
  1209. X***************
  1210. X*** 435,440 ****
  1211. X--- 445,457 ----
  1212. X        strncpy(v->v.str, s+1, len-1);
  1213. X        *(v->v.str+len-1) = 0;
  1214. X        return OK;
  1215. X+    } else if (*s == '\'') { /* It's a literal date */
  1216. X+       s++;
  1217. X+       if ((r=ParseLiteralDate(&s, &h))) return r;
  1218. X+       if (*s != '\'') return E_BAD_DATE;
  1219. X+       v->type = DATE_TYPE;
  1220. X+       v->v.val = h;
  1221. X+       return OK;
  1222. X     } else if (isdigit(*s)) { /* It's a number - use len to hold it.*/
  1223. X        len = 0;
  1224. X        while (*s && isdigit(*s)) {
  1225. X***************
  1226. X*** 640,670 ****
  1227. X             } else return E_2LOW;
  1228. X  
  1229. X          case STR_TYPE:
  1230. X-            y=0; m=0; d=0;
  1231. X             s = v->v.str;
  1232. X!            if (!isdigit(*s)) return E_CANT_COERCE;
  1233. X!            while (isdigit(*s)) {
  1234. X!           y *= 10;
  1235. X!           y += *s++ - '0';
  1236. X!            }
  1237. X!            if (*s++ != '/') return E_CANT_COERCE;
  1238. X!            if (!isdigit(*s)) return E_CANT_COERCE;
  1239. X!            while (isdigit(*s)) {
  1240. X!           m *= 10;
  1241. X!           m += *s++ - '0';
  1242. X!            }
  1243. X!            m--;
  1244. X!            if (*s++ != '/') return E_CANT_COERCE;
  1245. X!            if (!isdigit(*s)) return E_CANT_COERCE;
  1246. X!            while (isdigit(*s)) {
  1247. X!           d *= 10;
  1248. X!           d += *s++ - '0';
  1249. X!            }
  1250. X!            if (*s || y < BASE || y > BASE+YR_RANGE ||
  1251. X!             m>11 || d<1 || d>DaysInMonth(m, y)) return E_CANT_COERCE;
  1252. X             v->type = DATE_TYPE;
  1253. X             free(v->v.str);
  1254. X!            v->v.val = Julian(y, m, d);
  1255. X             return OK;
  1256. X  
  1257. X          default: return E_CANT_COERCE;
  1258. X--- 657,668 ----
  1259. X             } else return E_2LOW;
  1260. X  
  1261. X          case STR_TYPE:
  1262. X             s = v->v.str;
  1263. X!            if (ParseLiteralDate(&s, &i)) return E_CANT_COERCE;
  1264. X!            if (*s) return E_CANT_COERCE;
  1265. X             v->type = DATE_TYPE;
  1266. X             free(v->v.str);
  1267. X!            v->v.val = i;
  1268. X             return OK;
  1269. X  
  1270. X          default: return E_CANT_COERCE;
  1271. X***************
  1272. X*** 1209,1212 ****
  1273. X--- 1207,1255 ----
  1274. X        dest->v.val = src->v.val;
  1275. X        return OK;
  1276. X     }
  1277. X+ }
  1278. X+ 
  1279. X+ /***************************************************************/
  1280. X+ /*                                                             */
  1281. X+ /*  ParseLiteralDate                                           */
  1282. X+ /*                                                             */
  1283. X+ /*  Parse a literal date.  Return result in jul, update s.     */
  1284. X+ /*                                                             */
  1285. X+ /***************************************************************/
  1286. X+ #ifdef HAVE_PROTOS
  1287. X+ PRIVATE int ParseLiteralDate(char **s, int *jul)
  1288. X+ #else
  1289. X+ static int ParseLiteralDate(s, jul)
  1290. X+ char **s;
  1291. X+ int *jul;
  1292. X+ #endif
  1293. X+ {
  1294. X+    int y, m, d;
  1295. X+ 
  1296. X+    y=0; m=0; d=0;
  1297. X+ 
  1298. X+    if (!isdigit(**s)) return E_BAD_DATE;
  1299. X+    while (isdigit(**s)) {
  1300. X+       y *= 10;
  1301. X+       y += *(*s)++ - '0';
  1302. X+    }
  1303. X+    if (*(*s)++ != '/') return E_BAD_DATE;
  1304. X+    if (!isdigit(**s)) return E_BAD_DATE;
  1305. X+    while (isdigit(**s)) {
  1306. X+       m *= 10;
  1307. X+       m += *(*s)++ - '0';
  1308. X+    }
  1309. X+    m--;
  1310. X+    if (*(*s)++ != '/') return E_BAD_DATE;
  1311. X+    if (!isdigit(**s)) return E_BAD_DATE;
  1312. X+    while (isdigit(**s)) {
  1313. X+       d *= 10;
  1314. X+       d += *(*s)++ - '0';
  1315. X+    }
  1316. X+    if (y < BASE || y > BASE+YR_RANGE || m<0 ||
  1317. X+         m>11 || d<1 || d>DaysInMonth(m, y)) return E_BAD_DATE;
  1318. X+ 
  1319. X+    *jul = Julian(y, m, d);
  1320. X+ 
  1321. X+    return OK;
  1322. X  }
  1323. END_OF_FILE
  1324.   if test 32698 -ne `wc -c <'patch.01.A'`; then
  1325.     echo shar: \"'patch.01.A'\" unpacked with wrong size!
  1326.   elif test -f 'patch.01.B'; then 
  1327.     echo shar: Combining  \"'patch.01'\" \(67490 characters\) 
  1328.     cat 'patch.01.A' 'patch.01.B' > 'patch.01' 
  1329.     if test 67490 -ne `wc -c <'patch.01'`; then 
  1330.       echo shar: \"'patch.01'\" combined with wrong size! 
  1331.     else 
  1332.       rm patch.01.A patch.01.B 
  1333.     fi 
  1334.   fi
  1335.   # end of 'patch.01.A'
  1336. fi
  1337. if test -f 'rem2ps.1' -a "${1}" != "-c" ; then 
  1338.   echo shar: Will not clobber existing file \"'rem2ps.1'\"
  1339. else
  1340.   echo shar: Extracting \"'rem2ps.1'\" \(3542 characters\)
  1341.   sed "s/^X//" >'rem2ps.1' <<'END_OF_FILE'
  1342. X.TH REM2PS 1 "25 November 1992"
  1343. X.UC4
  1344. X.SH NAME
  1345. Xrem2ps \- draw a PostScript calendar from Remind output
  1346. X.SH SYNOPSIS
  1347. X.B rem2ps [\fIoptions\fR]
  1348. X.SH DESCRIPTION
  1349. X\fBRem2ps\fR reads the standard input, which should be the results of running
  1350. X\fBRemind\fR with the \fB\-p\fR option.  It emits PostScript code (which
  1351. Xdraws a calendar) to the standard output.
  1352. X.SH OPTIONS
  1353. X.TP
  1354. X.B \-l
  1355. XProduce the calendar in landscape mode rather than the default
  1356. Xportrait mode.
  1357. X.TP
  1358. X.B \-c
  1359. XDo not generate small calendars for the next and previous months.  By
  1360. Xdefault, these small calendars are generated and placed on the main
  1361. Xcalendar.
  1362. X.TP
  1363. X.B \-m media
  1364. XSet the page size.  You must specify the media type, which can be one of the
  1365. Xfollowing.  (Sizes are approximate.  For a list of media types, type
  1366. X"rem2ps -m help".)
  1367. X.RS
  1368. X.TP
  1369. XLetter
  1370. X8.5 x 11 in.
  1371. X.TP
  1372. XLegal
  1373. X11 x 17 in.
  1374. X.TP
  1375. XLedger
  1376. X8.5 x 14 in.
  1377. X.TP
  1378. XStatement
  1379. X5.5 x 8.5 in.
  1380. X.TP
  1381. XExecutive
  1382. X7.5 x 10 in.
  1383. X.TP
  1384. XA3
  1385. X29.7 x 42 cm.
  1386. X.TP
  1387. XA4
  1388. X21 x 29.7 cm.
  1389. X.TP
  1390. XA5
  1391. X14.8 x 21 cm.
  1392. X.TP
  1393. XB4
  1394. X25.7 x 36.4 cm.
  1395. X.TP
  1396. XB5
  1397. X18.3 x 25.7 cm.
  1398. X.TP
  1399. XFolio
  1400. X8.5 x 13 in.
  1401. X.TP
  1402. XQuarto
  1403. X8.5 x 10.8 in.
  1404. X.TP
  1405. X10x14
  1406. X10 x 14 in.
  1407. X.PP
  1408. XType "rem2ps -m help" for a list of available media.  Note that the media
  1409. Xtype (and all \fBRem2ps\fR options) are case-sensitive.
  1410. X.RE
  1411. X.TP
  1412. X\fB\-f\fR[\fBshed\fR] \fIfont\fR
  1413. XSet the font for the small calendar, the calendar headings, the calendar
  1414. Xentries, and the day numbers, respectively.  \fIFont\fR must be the
  1415. Xname of a valid PostScript font.  The default fonts are equivalent to
  1416. Xspecifying:
  1417. X.RS
  1418. X.PP
  1419. X.nf
  1420. X    -fhes Helvetica -fd Helvetica-BoldOblique
  1421. X.fi
  1422. X.PP
  1423. XIn other words, the heading, entry and small-calendar fonts are set
  1424. Xto Helvetica, and the font for the day numbers is set to
  1425. XHelvetica-BoldOblique.
  1426. X.RE
  1427. X.TP
  1428. X\fB\-s\fR[\fBhed\fR] \fIsize\fR
  1429. XSet the size (in points) of the text for the the calendar headings,
  1430. Xthe calendar entries, and the day numbers, respectively.  \fISize\fR
  1431. Xmust be a decimal number.  The default sizes are equivalent to
  1432. Xspecifying:
  1433. X.RS
  1434. X.PP
  1435. X.nf
  1436. X    -sdh 14 -se 8
  1437. X.fi
  1438. X.PP
  1439. XIn other words, the heading and day numbers are 14-point fonts, and the
  1440. Xcalendar entries are printed in 8-point text.
  1441. X.RE
  1442. X.TP
  1443. X\fB\-b\fR \fIsize\fR
  1444. XSet the size of the blank white border in each calendar box to \fIsize\fR
  1445. Xpoints.  The default border size is 6 points, or 1/12 in.
  1446. X.TP
  1447. X\fB\-t\fR \fIsize\fR
  1448. XSet the thickness of the black calendar grid lines.  The default is 1,
  1449. Xfor a line thickness of one point (1/72 in.)
  1450. X.SH USAGE
  1451. XTo use \fBRem2ps\fR, you should pipe the output of \fBRemind\fR with the \fB\-p\fR
  1452. Xoption to \fBRem2ps\fR, and then send the result to a printer.  This is most easily
  1453. Xillustrated with examples:
  1454. X.PP
  1455. X.nf
  1456. X    remind -p12 /dev/null 1 jan 1994 | rem2ps | lpr -Plaser
  1457. X.fi
  1458. X.PP
  1459. XThat example creates a blank calendar for the entire year of 1994, and
  1460. Xsends it the the printer named "laser."
  1461. X.PP
  1462. X.nf
  1463. X    remind -p ~/.reminders | rem2ps -l -sd 18 > cal.ps
  1464. X.fi
  1465. X.PP
  1466. XThis reminder creates a calendar for the current month, filling in
  1467. Xentries from the reminder file "~/.reminders."  The calendar is produced
  1468. Xin landscape mode, with a font size of 18 for the day numbers.  The result
  1469. Xis put in the PostScript file "cal.ps."
  1470. X.SH AUTHOR
  1471. XDavid F. Skoll
  1472. X.SH BUGS
  1473. XAll \fBRem2ps\fR options are case-sensitive, unlike \fBRemind\fR.  Any time you supply
  1474. Xa font name or size, line thickness, or border width, it is treated as a
  1475. Xstring and sent straight to the PostScript interpreter.  Thus, if you
  1476. Xsupply invalid fonts or sizes, \fBRem2ps\fR will not complain, but the resulting
  1477. XPostScript output will probably not work.
  1478. X.SH SEE ALSO
  1479. X\fBRemind\fR
  1480. END_OF_FILE
  1481.   if test 3542 -ne `wc -c <'rem2ps.1'`; then
  1482.     echo shar: \"'rem2ps.1'\" unpacked with wrong size!
  1483.   fi
  1484.   # end of 'rem2ps.1'
  1485. fi
  1486. if test -f 'rem2ps.h' -a "${1}" != "-c" ; then 
  1487.   echo shar: Will not clobber existing file \"'rem2ps.h'\"
  1488. else
  1489.   echo shar: Extracting \"'rem2ps.h'\" \(5685 characters\)
  1490.   sed "s/^X//" >'rem2ps.h' <<'END_OF_FILE'
  1491. X/***************************************************************/
  1492. X/*                                                             */
  1493. X/*  REM2PS.H                                                   */
  1494. X/*                                                             */
  1495. X/*  Define the PostScript prologue                             */
  1496. X/*                                                             */
  1497. X/*  This file is part of REMIND.                               */
  1498. X/*  Copyright (C) 1992 by David F. Skoll.                      */
  1499. X/*                                                             */
  1500. X/***************************************************************/
  1501. X
  1502. Xchar *PSProlog[] =
  1503. X{
  1504. X   "% L - Draw a line",
  1505. X   "/L {",
  1506. X   "   newpath moveto lineto stroke",
  1507. X   "} bind def",
  1508. X   "% string1 string2 strcat string",
  1509. X   "% Function: Concatenates two strings together.",
  1510. X   "/strcat {",
  1511. X   "         2 copy length exch length add",
  1512. X   "         string dup",
  1513. X   "         4 2 roll",
  1514. X   "         2 index 0 3 index",
  1515. X   "         putinterval",
  1516. X   "         exch length exch putinterval",
  1517. X   "} bind def",
  1518. X   "% string doheading",
  1519. X   "/doheading",
  1520. X   "{",
  1521. X   "   /monthyr exch def",
  1522. X   "   ",
  1523. X   "   HeadFont findfont",
  1524. X   "   HeadSize scalefont setfont   ",
  1525. X   "   monthyr stringwidth",
  1526. X   "   pop",
  1527. X   "   2 div MaxX MinX add 2 div exch sub /x exch def",
  1528. X   "   MaxY HeadSize 1.5 mul sub /y exch def",
  1529. X   "   newpath x y moveto monthyr show",
  1530. X   "   y HeadSize 0.5 mul sub /y exch def",
  1531. X   "   MinX y MaxX y L",
  1532. X   "   /topy y def",
  1533. X   "% Do the days of the week",
  1534. X   "   MaxX MinX sub 7 div /xincr exch def",
  1535. X   "   /x MinX def",
  1536. X   "  [(Sunday) (Monday) (Tuesday) (Wednesday) (Thursday) (Friday) (Saturday)]",
  1537. X   "  {",
  1538. X   "     HeadSize x y HeadSize 2 mul sub x xincr add y CenterText",
  1539. X   "     x xincr add /x exch def",
  1540. X   "  } forall",
  1541. X   "  y HeadSize 2 mul sub /y exch def",
  1542. X   "  MinX y MaxX y L",
  1543. X   "  /ytop y def /ymin y def",
  1544. X   "}",
  1545. X   "def",
  1546. X   "/CenterText",
  1547. X   "{",
  1548. X   "   /maxy exch def",
  1549. X   "   /maxx exch def",
  1550. X   "   /miny exch def",
  1551. X   "   /minx exch def",
  1552. X   "   /sz exch def",
  1553. X   "   /str exch def",
  1554. X   "   str stringwidth pop",
  1555. X   "   2 div maxx minx add 2 div exch sub",
  1556. X   "   sz 2 div maxy miny add 2 div exch sub",
  1557. X   "   moveto str show",
  1558. X   "} def",
  1559. X   "% Variables:",
  1560. X   "% curline - a string holding the current line",
  1561. X   "% y - current y pos",
  1562. X   "% yincr - increment to next line",
  1563. X   "% xleft - left margin",
  1564. X   "% width - max width.",
  1565. X   "% EnterOneWord - given a word, enter it into the box.",
  1566. X   "% string EnterOneWord",
  1567. X   "/EnterOneWord {",
  1568. X   "   { EnterOneWordAux",
  1569. X   "     {exit} if }",
  1570. X   "   loop",
  1571. X   "} bind def",
  1572. X   "% EnterOneWordAux - if the word fits, enter it into box and return true.",
  1573. X   "% If it doesn't fit, put as much as will fit and return the string and false.",
  1574. X   "/EnterOneWordAux {",
  1575. X   "   /word exch def",
  1576. X   "   /tmpline curline word strcat def",
  1577. X   "   tmpline stringwidth pop width gt",
  1578. X   "   {MoveToNewLine}",
  1579. X   "   {/curline tmpline ( ) strcat def /word () def}",
  1580. X   "   ifelse",
  1581. X   "   word () eq",
  1582. X   "   {true}",
  1583. X   "   {word false}",
  1584. X   "   ifelse",
  1585. X   "} bind def",
  1586. X   "% MoveToNewLine - move to a new line, resetting word as appropriate",
  1587. X   "/MoveToNewLine {",
  1588. X   "   curline () ne",
  1589. X   "   {newpath xleft y moveto curline show /curline () def /y y yincr add def}   ",
  1590. X   "   {ChopWord}",
  1591. X   "   ifelse",
  1592. X   "} bind def",
  1593. X   "% ChopWord - word won't fit.  Chop it and find biggest piece that will fit",
  1594. X   "/ChopWord {",
  1595. X   "   /curline () def",
  1596. X   "   /len word length def",
  1597. X   "   /Fcount len 1 sub def",
  1598. X   "   ",
  1599. X   "   {",
  1600. X   "     word 0 Fcount getinterval stringwidth pop width le",
  1601. X   "     {exit} if",
  1602. X   "     /Fcount Fcount 1 sub def",
  1603. X   "   } loop",
  1604. X   "% Got the count.  Display it and reset word",
  1605. X   "   newpath xleft y moveto word 0 Fcount getinterval show",
  1606. X   "   /y y yincr add def",
  1607. X   "   /word word Fcount len Fcount sub getinterval def",
  1608. X   "} bind def",
  1609. X   "/FinishFormatting {",
  1610. X   "   word () ne",
  1611. X   "   {newpath xleft y moveto word show /word () def",
  1612. X   "    /curline () def /y y yincr add def}",
  1613. X   "   {curline () ne",
  1614. X   "     {newpath xleft y moveto curline show /word () def",
  1615. X   "      /curline () def /y y yincr add def} if}",
  1616. X   "   ifelse",
  1617. X   "} bind def",
  1618. X   "% FillBoxWithText - fill a box with text",
  1619. X   "% text-array xleft width yincr y FillBoxWithText new-y",
  1620. X   "% Returns the new Y-coordinate.",
  1621. X   "/FillBoxWithText {",
  1622. X   "   /y exch def",
  1623. X   "   /yincr exch def",
  1624. X   "   /width exch def",
  1625. X   "   /xleft exch def",
  1626. X   "   /curline () def",
  1627. X   "   {EnterOneWord} forall",
  1628. X   "   FinishFormatting",
  1629. X   "   y",
  1630. X   "} bind def",
  1631. X   "% Variables for calendar boxes:",
  1632. X   "% ytop - current top position",
  1633. X   "% ymin - minimum y reached for current row",
  1634. X   "% border ytop xleft width textarray daynum DoCalBox ybot",
  1635. X   "% Do the entries for one calendar box.  Returns lowest Y-coordinate reached",
  1636. X   "/DoCalBox {",
  1637. X   "   /daynum exch def",
  1638. X   "   /textarr exch def",
  1639. X   "   /wid exch def",
  1640. X   "   /xl exch def",
  1641. X   "   /yt exch def",
  1642. X   "   /border exch def",
  1643. X   "% Do the day number",
  1644. X   "   DayFont findfont DaySize scalefont setfont",
  1645. X   "   xl wid add border sub daynum stringwidth pop sub",
  1646. X   "   yt border sub DaySize sub moveto daynum show",
  1647. X   "% Do the text entries.  Precharge the stack with current y pos.",
  1648. X   "   /ycur yt border sub DaySize sub DaySize sub 2 add def",
  1649. X   "   EntryFont findfont EntrySize scalefont setfont",
  1650. X   "   ycur",
  1651. X   "   textarr",
  1652. X   "   { exch 2 sub /ycur exch def xl border add wid border sub border sub EntrySize 2 add neg",
  1653. X   "     ycur FillBoxWithText }",
  1654. X   "    forall",
  1655. X   "} bind def",
  1656. X   "2 setlinecap",
  1657. X   NULL
  1658. X};
  1659. END_OF_FILE
  1660.   if test 5685 -ne `wc -c <'rem2ps.h'`; then
  1661.     echo shar: \"'rem2ps.h'\" unpacked with wrong size!
  1662.   fi
  1663.   # end of 'rem2ps.h'
  1664. fi
  1665. echo shar: End of archive 2 \(of 2\).
  1666. cp /dev/null ark2isdone
  1667. MISSING=""
  1668. for I in 1 2 ; do
  1669.     if test ! -f ark${I}isdone ; then
  1670.     MISSING="${MISSING} ${I}"
  1671.     fi
  1672. done
  1673. if test "${MISSING}" = "" ; then
  1674.     echo You have unpacked both archives.
  1675.     rm -f ark[1-9]isdone
  1676. else
  1677.     echo You still must unpack the following archives:
  1678.     echo "        " ${MISSING}
  1679. fi
  1680. exit 0
  1681. exit 0 # Just in case...
  1682.