home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 3 / 3861 < prev    next >
Encoding:
Internet Message Format  |  1991-08-22  |  42.0 KB

  1. Path: wupost!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnews!jbr0
  2. From: jbr0@cbnews.cb.att.com (joseph.a.brownlee)
  3. Newsgroups: alt.sources
  4. Subject: Pcal v4.1, part 1 of 6
  5. Keywords: pcal calendar postscript
  6. Message-ID: <1991Aug19.121007.212@cbnews.cb.att.com>
  7. Date: 19 Aug 91 12:10:07 GMT
  8. Organization: AT&T Bell Laboratories
  9. Lines: 1129
  10.  
  11. "Pcal" Version 4.1
  12.  
  13. This is an intermediate release of "Pcal", the PostScript calendar making
  14. program.  For those not familiar with this pcakage, "pcal" generates calendars
  15. in various formats and generates Postscript.  You can keep "events" in a file
  16. and "pcal" will place them in the appropriate day in the calendar.
  17.  
  18. Major changes since v4.0:
  19.  
  20.     1) Of interest to Pcal hackers and installers:
  21.  
  22.     .    The Un*x flavor of Pcal is now considerably smarter about finding
  23.     the date file, using the PATH environment variable to identify
  24.     the directory where the executable lives.  (This is so system-
  25.     dependent that it exists only for Un*x; in fact, it may require
  26.     some tweaking for your particular system.  See the comments in
  27.     pcalutil.c regarding X_OK.)
  28.  
  29.  
  30.     2) New command-line options:
  31.  
  32.     .    The "-v" option has been added to print version information without
  33.     the entire usage message.
  34.  
  35.     .    The "-G" option has been added to print "gray" dates as filled
  36.     outlines (thanks to Richard Dyson for the idea).
  37.  
  38.  
  39.     3) New date file functionality:
  40.  
  41.     .    Pcal now supports format specifiers (derived mostly from strftime())
  42.     which allow the user to substitute the current month, day, weekday,
  43.     year, etc. into a text or foot string.  For further information,
  44.     refer to the manual page and/or the comments in "pcal.c".
  45.  
  46.  
  47.     4) Other new functionality:
  48.  
  49.     .    The default moon phase algorithm has been replaced with an
  50.     astronomer-quality version; moon file ".moonXX" will continue
  51.     to be supported for now.
  52.  
  53.     5) Portability:
  54.  
  55.     .   Some VMS-specific files have been updated.  Also, a TeX style sheet
  56.     is now included in the distribution.
  57.  
  58.  
  59. Credit where credit is due:
  60.  
  61. The following people contributed to Pcal v4.1:
  62.  
  63.     Overall coordinator, troff manual page:        Joe Brownlee
  64.     VMS/TeX support, moon phase algorithm:        Richard Dyson
  65.     Other C and PostScript code:            Andrew Rogers
  66.  
  67. Although they probably wouldn't recognize the current version, countless
  68. others worked on Pcal long before any of us ever heard of it; see the
  69. Orig.ReadMe file and topline comments in pcal.c.
  70.  
  71.    ^      _   Joe Brownlee, Analysts International Corporation @ AT&T Bell Labs
  72.   /_\  @ / `  471 E Broad St, Suite 2001, Columbus, Ohio 43215   (614) 860-7461
  73.  /   \ | \_,  E-mail: jbr@cblph.att.com     Who pays attention to what _I_ say?
  74.  "Scotty, we need warp speed in 3 minutes or we're all dead!" --- James T. Kirk
  75.  
  76. ------------------------------- 8<  cut here  >8 -------------------------------
  77. #!/bin/sh
  78. # This is a shell archive (produced by shar 3.49)
  79. # To extract the files from this archive, save it to a file, remove
  80. # everything above the "!/bin/sh" line above, and type "sh file_name".
  81. #
  82. # existing files will NOT be overwritten unless -c is specified
  83. #
  84. # This shar contains:
  85. # length  mode       name
  86. # ------ ---------- ------------------------------------------
  87. #   1849 -rw-r--r-- ReadMe
  88. #   2923 -rw-r--r-- Make_Pcal.com
  89. #   1159 -rw-r--r-- Makefile
  90. #   1010 -rw-r--r-- Makefile.Amiga
  91. #   1023 -rw-r--r-- Makefile.DOS
  92. #   2505 -rw-r--r-- Makefile.VMS
  93. #    984 -rw-r--r-- Orig.ReadMe
  94. #  23366 -rw-r--r-- Pcal.TeX
  95. #  24613 -rw-r--r-- Pcal.hlp
  96. #    670 -rw-r--r-- SetUp.com
  97. #     31 -rw-r--r-- VaxCrtl.opt
  98. #   9144 -rw-rw-rw- calendar
  99. #   8311 -rw-rw-rw- exprpars.c
  100. #   2504 -rw-rw-rw- moon91
  101. #  14863 -rw-rw-rw- moonphas.c
  102. #   2051 -rw-rw-rw- noprotos.h
  103. #  36344 -rw-rw-rw- pcal.c
  104. #  20376 -rw-r--r-- pcal.man
  105. #  14846 -rw-rw-rw- pcaldefs.h
  106. #   3549 -rw-rw-rw- pcalglob.h
  107. #   3975 -rw-r--r-- pcalinit.c
  108. #  13642 -rw-rw-rw- pcalinit.ps
  109. #  27444 -rw-rw-rw- pcallang.h
  110. #  16402 -rw-r--r-- pcalutil.c
  111. #   3511 -rw-rw-rw- protos.h
  112. #  27599 -rw-r--r-- readfile.c
  113. #   3609 -rw-r--r-- troffman.sty
  114. #  13864 -rw-r--r-- writefil.c
  115. #
  116. # ============= ReadMe ==============
  117. if test -f 'ReadMe' -a X"$1" != X"-c"; then
  118.     echo 'x - skipping ReadMe (File already exists)'
  119. else
  120. echo 'x - extracting ReadMe (Text)'
  121. sed 's/^X//' << 'SHAR_EOF' > 'ReadMe' &&
  122. "Pcal" Version 4.1
  123. X
  124. This is an intermediate release of "Pcal", the PostScript calendar making
  125. program.
  126. X
  127. Major changes:
  128. X
  129. X    1) Of interest to Pcal hackers and installers:
  130. X
  131. X    .    The Un*x flavor of Pcal is now considerably smarter about finding
  132. X    the date file, using the PATH environment variable to identify
  133. X    the directory where the executable lives.  (This is so system-
  134. X    dependent that it exists only for Un*x; in fact, it may require
  135. X    some tweaking for your particular system.  See the comments in
  136. X    pcalutil.c regarding X_OK.)
  137. X
  138. X
  139. X    2) New command-line options:
  140. X
  141. X    .    The "-v" option has been added to print version information without
  142. X    the entire usage message.
  143. X
  144. X    .    The "-G" option has been added to print "gray" dates as filled
  145. X    outlines (thanks to Richard Dyson for the idea).
  146. X
  147. X
  148. X    3) New date file functionality:
  149. X
  150. X    .    Pcal now supports format specifiers (derived mostly from strftime())
  151. X    which allow the user to substitute the current month, day, weekday,
  152. X    year, etc. into a text or foot string.  For further information,
  153. X    refer to the manual page and/or the comments in "pcal.c".
  154. X
  155. X
  156. X    4) Other new functionality:
  157. X
  158. X    .    The default moon phase algorithm has been replaced with an
  159. X    astronomer-quality version; moon file ".moonXX" will continue
  160. X    to be supported for now.
  161. X
  162. X    5) Portability:
  163. X
  164. X    .   Some VMS-specific files have been updated.  Also, a TeX style sheet
  165. X    is now included in the distribution.
  166. X
  167. X
  168. Credit where credit is due:
  169. X
  170. The following people contributed to Pcal v4.1:
  171. X
  172. X    Overall coordinator, troff manual page:        Joe Brownlee
  173. X    VMS/TeX support, moon phase algorithm:        Richard Dyson
  174. X    Other C and PostScript code:            Andrew Rogers
  175. Although they probably wouldn't recognize the current version, countless
  176. others worked on Pcal long before any of us ever heard of it; see the
  177. Orig.ReadMe file and topline comments in pcal.c.
  178. SHAR_EOF
  179. chmod 0644 ReadMe ||
  180. echo 'restore of ReadMe failed'
  181. Wc_c="`wc -c < 'ReadMe'`"
  182. test 1849 -eq "$Wc_c" ||
  183.     echo 'ReadMe: original size 1849, current size' "$Wc_c"
  184. fi
  185. # ============= Make_Pcal.com ==============
  186. if test -f 'Make_Pcal.com' -a X"$1" != X"-c"; then
  187.     echo 'x - skipping Make_Pcal.com (File already exists)'
  188. else
  189. echo 'x - extracting Make_Pcal.com (Text)'
  190. sed 's/^X//' << 'SHAR_EOF' > 'Make_Pcal.com' &&
  191. $ If F$Mode () .eqs. "INTERACTIVE"
  192. $   Then
  193. $       VERIFY = F$Verify (0)
  194. $   Else
  195. $       VERIFY = F$Verify (1)
  196. $ EndIf
  197. $!========================================================================
  198. $!
  199. $!  Name      : MAKE_PCAL.COM
  200. $!
  201. $!  Purpose   : Compile and Link pcal under VMS
  202. $!
  203. $!  Arguments : P1/P2 = DATE_DEBUG: compile with DEBUG info
  204. $!              P1/P2 = LINK : link only
  205. $!
  206. $!  Created: 13-SEP-1990 Rick Dyson
  207. $!  Updated: 20-SEP-1990 pcal v2.3
  208. $!  Updated:  2-OCT-1990 pcal v2.4
  209. $!  Updated:  8-OCT-1990 pcal v2.5
  210. $!  Updated:  2-JAN-1991 pcal v3.0
  211. $!  Updated: 15-FEB-1991 pcal v3.1
  212. $!  Updated:  1-MAR-1991 pcal v4.0
  213. $!  Updated: 15-AUG-1991 pcal v4.1
  214. $!
  215. $!========================================================================
  216. $   THIS_PATH = F$Element (0, "]", F$Environment ("PROCEDURE")) + "]"
  217. $   Set Default 'THIS_PATH'
  218. $   On Error     Then GoTo FINISH
  219. $   On Control_Y Then GoTo FINISH
  220. $   If P1 .eqs. "DATE_DEBUG" .or. P2 .eqs. "DATE_DEBUG"
  221. $       Then
  222. $           DEFINE = "/Define = (""VMS"", ""DATE_DEBUG"")"
  223. $       Else
  224. $           DEFINE = "/Define = (""VMS"")"
  225. $   EndIf
  226. $   If P1 .eqs. "LINK" .or. P2 .eqs. "LINK" Then GoTo LINK
  227. $   Write Sys$Output "Making pcalinit..."
  228. $   Cc /NoList 'DEFINE' PCALINIT
  229. $   Link /NoMap PCALINIT,VAXCRTL.OPT /Option
  230. $   PCALINIT := $ 'THIS_PATH'PCALINIT.EXE
  231. $   Write Sys$Output "Executing pcalinit..."
  232. $   PCALINIT PCALINIT.PS PCALINIT.H
  233. $   Write Sys$Output "Compiling pcal programs..."
  234. $   Cc /NoList 'DEFINE' PCAL.C
  235. $   Cc /NoList 'DEFINE' EXPRPARS.C
  236. $   Cc /NoList 'DEFINE' MOONPHAS.C
  237. $   Cc /NoList 'DEFINE' PCALUTIL.C
  238. $   Cc /NoList 'DEFINE' READFILE.C
  239. $   Cc /NoList 'DEFINE' WRITEFIL.C
  240. $LINK:
  241. $   Write Sys$Output "Linking pcal..."
  242. $   Link /NoMap PCAL,EXPRPARS,MOONPHAS,PCALUTIL,READFILE,WRITEFIL,VAXCRTL/Option
  243. $EXIT:
  244. $   If .not. $Status Then GoTo FINISH
  245. $   Set NoOn
  246. $   Set Protection = Owner:RWED *.OBJ;*,*.EXE;-1
  247. $   Purge /Log /NoConfirm *.OBJ,*.EXE
  248. $   If F$Search ("PCAL.HLB") .eqs. ""
  249. $       Then
  250. $           Write Sys$Output "Creating a help library for Pcal..."
  251. $           Library /Log /Help /Create PCAL PCAL
  252. $       Else
  253. $           Write Sys$Output "Updating help library for Pcal..."
  254. $           Library /Log /Help PCAL PCAL
  255. $   EndIf
  256. $   If F$Mode () .nes. "INTERACTIVE" Then GoTo FINISH
  257. $   Set File /Truncate PCAL.HLB
  258. $   LIB = "Hlp$Library"
  259. $   X = F$Trnlnm (LIB, "Lnm$Process")
  260. $   If X .eqs. "" Then GoTo INSERT
  261. $   If X .eqs. "''THIS_PATH'PCAL.HLB" Then GoTo FINISH
  262. $   BASE = LIB + "_"
  263. $   N = 1
  264. $NEXTLIB:
  265. $   LIB := 'BASE''N'
  266. $   X = F$Trnlnm (LIB, "Lnm$Process")
  267. $   If X .eqs. "" Then GoTo INSERT
  268. $   If X .eqs. "''THIS_PATH'PCAL.HLB" Then GoTo FINISH
  269. $   N = N + 1
  270. $   GoTo NEXTLIB
  271. $INSERT:
  272. $   Define 'LIB' 'THIS_PATH'PCAL.HLB
  273. $FINISH:
  274. $   Set Protection = (System:RWE, Owner:RWED, Group:RE, World:RE) *.*;*
  275. $   Purge /Log /NoConfirm *.*
  276. $   Set Protection = Owner:RWE *.*
  277. $   VERIFY = F$Verify (VERIFY)
  278. $   Exit
  279. SHAR_EOF
  280. chmod 0644 Make_Pcal.com ||
  281. echo 'restore of Make_Pcal.com failed'
  282. Wc_c="`wc -c < 'Make_Pcal.com'`"
  283. test 2923 -eq "$Wc_c" ||
  284.     echo 'Make_Pcal.com: original size 2923, current size' "$Wc_c"
  285. fi
  286. # ============= Makefile ==============
  287. if test -f 'Makefile' -a X"$1" != X"-c"; then
  288.     echo 'x - skipping Makefile (File already exists)'
  289. else
  290. echo 'x - extracting Makefile (Text)'
  291. sed 's/^X//' << 'SHAR_EOF' > 'Makefile' &&
  292. #
  293. # Makefile for Pcal v4.0 under UNIX
  294. #
  295. X
  296. # Set the configuration variables below to taste.
  297. X
  298. CC    = /bin/cc
  299. MANDIR    = /usr/man
  300. COPTS    =
  301. OBJECTS = pcal.o exprpars.o moonphas.o pcalutil.o readfile.o writefil.o
  302. X
  303. pcal:    $(OBJECTS)
  304. X    $(CC) $(LDFLAGS) -o pcal $(OBJECTS) -lm
  305. X    @ echo "Build of pcal complete"
  306. X
  307. exprpars.o:    exprpars.c pcaldefs.h
  308. X    $(CC) $(CFLAGS) $(COPTS) -c exprpars.c
  309. X
  310. moonphas.o:    moonphas.c pcaldefs.h pcalglob.h
  311. X    $(CC) $(CFLAGS) $(COPTS) -c moonphas.c
  312. X
  313. pcal.o:        pcal.c pcaldefs.h pcalglob.h pcallang.h
  314. X    $(CC) $(CFLAGS) $(COPTS) -c pcal.c
  315. X
  316. pcalutil.o:    pcalutil.c pcaldefs.h pcalglob.h pcallang.h
  317. X    $(CC) $(CFLAGS) $(COPTS) -c pcalutil.c
  318. X
  319. readfile.o:    readfile.c pcaldefs.h pcalglob.h pcallang.h
  320. X    $(CC) $(CFLAGS) $(COPTS) -c readfile.c
  321. X
  322. writefil.o:    writefil.c pcaldefs.h pcalglob.h pcallang.h pcalinit.h
  323. X    $(CC) $(CFLAGS) $(COPTS) -c writefil.c
  324. X
  325. pcalinit: pcalinit.c
  326. X    $(CC) $(CFLAGS) $(LDFLAGS) $(COPTS) -o pcalinit pcalinit.c
  327. X
  328. pcalinit.h: pcalinit pcalinit.ps
  329. X    pcalinit pcalinit.ps pcalinit.h
  330. X
  331. pcalglob.h: protos.h noprotos.h
  332. X
  333. clean:
  334. X    rm -f $(OBJECTS) pcal pcalinit pcalinit.h
  335. X
  336. man:    pcal.man
  337. X    nroff -man pcal.man > pcal.1
  338. X    pack pcal.1
  339. #    mv pcal.1.z $(MANDIR)
  340. SHAR_EOF
  341. chmod 0644 Makefile ||
  342. echo 'restore of Makefile failed'
  343. Wc_c="`wc -c < 'Makefile'`"
  344. test 1159 -eq "$Wc_c" ||
  345.     echo 'Makefile: original size 1159, current size' "$Wc_c"
  346. fi
  347. # ============= Makefile.Amiga ==============
  348. if test -f 'Makefile.Amiga' -a X"$1" != X"-c"; then
  349.     echo 'x - skipping Makefile.Amiga (File already exists)'
  350. else
  351. echo 'x - extracting Makefile.Amiga (Text)'
  352. sed 's/^X//' << 'SHAR_EOF' > 'Makefile.Amiga' &&
  353. #   Makefile for the Amiga.
  354. #
  355. #   Set the configuration variables below to taste.
  356. X
  357. CC    = lc:lc
  358. LDFLAGS = -cufirst -v -d0 -m3s -O
  359. OBJECTS = pcal.o exprpars.o moonphas.o pcalutil.o readfile.o writefil.o
  360. X
  361. pcal:    $(OBJECTS)
  362. X    blink from lib:c.o $(OBJECTS) to pcal lib lib:lcm.lib lib:lc.lib SC SD VERBOSE ND
  363. X    @ echo "+ Build of pcal complete!"
  364. X
  365. exprpars.o:    exprpars.c pcaldefs.h
  366. X    $(CC) $(LDFLAGS) >bugs-$> exprpars.c
  367. X
  368. moonphas.o:    moonphas.c pcaldefs.h pcalglob.h
  369. X    $(CC) $(LDFLAGS) >bugs-$> moonphas.c
  370. X
  371. pcal.o:        pcal.c pcaldefs.h pcalglob.h pcallang.h
  372. X    $(CC) $(LDFLAGS) >bugs-$> pcal.c
  373. X
  374. pcalutil.o:    pcalutil.c pcaldefs.h pcalglob.h pcallang.h
  375. X    $(CC) $(LDFLAGS) >bugs-$> pcalutil.c
  376. X
  377. readfile.o:    readfile.c pcaldefs.h pcalglob.h pcallang.h
  378. X    $(CC) $(LDFLAGS) >bugs-$> readfile.c
  379. X
  380. writefil.o:    writefil.c pcaldefs.h pcalglob.h pcallang.h 
  381. X    $(CC) $(LDFLAGS) >bugs-$> writefil.c
  382. X
  383. pcalinit: pcalinit.c
  384. X    $(CC) $(LDFLAGS) >bugs-$> -Lscsdndver pcalinit pcalinit.c
  385. X
  386. pcalinit.h: pcalinit pcalinit.ps
  387. X    DH0:pcal/pcalinit pcalinit.ps
  388. SHAR_EOF
  389. chmod 0644 Makefile.Amiga ||
  390. echo 'restore of Makefile.Amiga failed'
  391. Wc_c="`wc -c < 'Makefile.Amiga'`"
  392. test 1010 -eq "$Wc_c" ||
  393.     echo 'Makefile.Amiga: original size 1010, current size' "$Wc_c"
  394. fi
  395. # ============= Makefile.DOS ==============
  396. if test -f 'Makefile.DOS' -a X"$1" != X"-c"; then
  397.     echo 'x - skipping Makefile.DOS (File already exists)'
  398. else
  399. echo 'x - extracting Makefile.DOS (Text)'
  400. sed 's/^X//' << 'SHAR_EOF' > 'Makefile.DOS' &&
  401. # PCAL v4.0 MAKEFILE for MS-DOS.
  402. # Uses TurboC command line compiler.
  403. X
  404. CC    = tcc
  405. CFLAGS    = -DDOS
  406. OBJECTS = pcal.obj exprpars.obj moonphas.obj pcalutil.obj readfile.obj writefil.obj
  407. X
  408. pcal.exe:    $(OBJECTS)
  409. X    $(CC) $(LDFLAGS) $(OBJECTS)
  410. X    @ echo + Build of pcal complete!
  411. X
  412. exprpars.obj:    exprpars.c pcaldefs.h
  413. X    $(CC) $(CFLAGS) $(COPTS) -c exprpars.c
  414. X
  415. moonphas.obj:    moonphas.c pcaldefs.h pcalglob.h
  416. X    $(CC) $(CFLAGS) $(COPTS) -c moonphas.c
  417. X
  418. pcal.obj:        pcal.c pcaldefs.h pcalglob.h pcallang.h
  419. X    $(CC) $(CFLAGS) $(COPTS) -c pcal.c
  420. X
  421. pcalutil.obj:    pcalutil.c pcaldefs.h pcalglob.h pcallang.h
  422. X    $(CC) $(CFLAGS) $(COPTS) -c pcalutil.c
  423. X
  424. readfile.obj:    readfile.c pcaldefs.h pcalglob.h pcallang.h
  425. X    $(CC) $(CFLAGS) $(COPTS) -c readfile.c
  426. X
  427. writefil.obj:    writefil.c pcaldefs.h pcalglob.h pcallang.h pcalinit.h
  428. X    $(CC) $(CFLAGS) $(COPTS) -c writefil.c
  429. X
  430. pcalinit.exe: pcalinit.c
  431. X    $(CC) $(CFLAGS) $(LDFLAGS) $(COPTS) pcalinit.c
  432. X
  433. pcalinit.h: pcalinit.exe pcalinit.ps
  434. X    pcalinit pcalinit.ps pcalinit.h
  435. X
  436. clean:
  437. X    del *.obj
  438. X    del pcalinit.exe
  439. X    del pcalinit.h
  440. SHAR_EOF
  441. chmod 0644 Makefile.DOS ||
  442. echo 'restore of Makefile.DOS failed'
  443. Wc_c="`wc -c < 'Makefile.DOS'`"
  444. test 1023 -eq "$Wc_c" ||
  445.     echo 'Makefile.DOS: original size 1023, current size' "$Wc_c"
  446. fi
  447. # ============= Makefile.VMS ==============
  448. if test -f 'Makefile.VMS' -a X"$1" != X"-c"; then
  449.     echo 'x - skipping Makefile.VMS (File already exists)'
  450. else
  451. echo 'x - extracting Makefile.VMS (Text)'
  452. sed 's/^X//' << 'SHAR_EOF' > 'Makefile.VMS' &&
  453. #   This is a makfile for the public domain VMS version of MAKE by Nelson
  454. #   H.F. Beebe dated 20-Feb-88.  Below you will find a paragraph cut out
  455. #   of the MAKE.DOC file.  If you have this program and want to use it
  456. #   instead of the MAKE_PCAL.COM, rename this file from MAKEFILE.VMS to
  457. #   MAKEFILE.  and type
  458. #       MAKE pcal               ! for the program
  459. #       MAKE help               ! for the help library
  460. #       MAKE clean              ! to clean up the directory
  461. #
  462. #   The original version of MAKE  was done by Stuart Feldman  in
  463. #   1978.  This  multi-operating-system version  is based  on  a
  464. #   public-domain posting  of 3-Dec-86  to the  Usenet  bulletin
  465. #   board  mod.sources,  its  author  known  only  by  an  EMAIL
  466. #   address: Caret@FAIRLIGHT.OZ.  It contained support for Unix,
  467. #   OS9, and  EON  operating  systems.  The  TOPS-20,  VMS,  and
  468. #   MS-DOS   support   was   added   by   Nelson   H.F.    Beebe
  469. #   (BEEBE@UTAH-SCIENCE).
  470. #
  471. X
  472. # Set the configuration variables below to taste.
  473. X
  474. CFLAGS    = /NoList
  475. COPTS    = VAXCRTL.OPT /Option
  476. OBJECTS = exprpars.obj moonphas.obj pcalutil.obj readfile.obj writefil.obj
  477. OBJLIST = exprpars,moonphas,pcalutil,readfile,writefil
  478. X
  479. pcal:    pcal.exe
  480. X
  481. pcal.exe:    pcal.obj $(OBJECTS)
  482. X    $(CC) $(CFLAGS) pcal
  483. X    Link pcal,$(OBJLIST),$(COPTS)
  484. X    Set Protection = (System:RWE, Owner:RWE, Group:RE, World:RE) *.*
  485. X
  486. exprpars.obj:    exprpars.c pcaldefs.h
  487. X    $(CC) $(CFLAGS) exprpars.c
  488. X
  489. moonphas.obj:    moonphas.c pcaldefs.h pcalglob.h
  490. X    $(CC) $(CFLAGS) moonphas.c
  491. X
  492. pcal.obj:    pcal.c pcaldefs.h pcalglob.h pcallang.h
  493. X    $(CC) $(CFLAGS) pcal.c
  494. X
  495. pcalutil.obj:    pcalutil.c pcaldefs.h pcalglob.h pcallang.h
  496. X    $(CC) $(CFLAGS) pcalutil.c
  497. X
  498. readfile.obj:    readfile.c pcaldefs.h pcalglob.h pcallang.h
  499. X    $(CC) $(CFLAGS) readfile.c
  500. X
  501. writefil.obj:    writefil.c pcaldefs.h pcalglob.h pcallang.h pcalinit.h
  502. X    $(CC) $(CFLAGS) writefil.c
  503. X
  504. pcalinit:    pcalinit.exe
  505. X
  506. pcalinit.exe:    pcalinit.c
  507. X    $(CC) $(CFLAGS) pcalinit.c
  508. X    Link $(LDFLAGS) pcalinit,$(COPTS)
  509. X
  510. pcalinit.h:    pcalinit.exe pcalinit.ps
  511. X    MCR Sys$$Disk:[]pcalinit pcalinit.ps pcalinit.h
  512. X
  513. help:    pcal.hlb
  514. X
  515. pcal.hlb:    pcal.hlp
  516. X    Library /Log /Create /Help PCAL.HLB PCAL.HLP
  517. X    Set Protection = (System:RWE, Owner:RWE, Group:RE, World:RE) PCAL.HLB
  518. X    Set File /Truncate PCAL.HLB
  519. X
  520. clean:
  521. X    Set Protection = Owner:RWED *.*;-1
  522. X    Purge /Log /NoConfirm pcal.exe,pcalinit.exe
  523. X    Set Protection = Owner:RWED *.obj
  524. X    Delete /Log /NoConfirm *.obj;*
  525. X    Set Protection = Owner:RWED pcalinit.h
  526. X    Delete /Log /NoConfirm pcalinit.h;
  527. X    Set Protection = (System:RWE, Owner:RWE) *.*
  528. SHAR_EOF
  529. chmod 0644 Makefile.VMS ||
  530. echo 'restore of Makefile.VMS failed'
  531. Wc_c="`wc -c < 'Makefile.VMS'`"
  532. test 2505 -eq "$Wc_c" ||
  533.     echo 'Makefile.VMS: original size 2505, current size' "$Wc_c"
  534. fi
  535. # ============= Orig.ReadMe ==============
  536. if test -f 'Orig.ReadMe' -a X"$1" != X"-c"; then
  537.     echo 'x - skipping Orig.ReadMe (File already exists)'
  538. else
  539. echo 'x - extracting Orig.ReadMe (Text)'
  540. sed 's/^X//' << 'SHAR_EOF' > 'Orig.ReadMe' &&
  541. "Pcal" is a program to print PostScript calendars for any month and year.
  542. By default, it looks for a file in the home directory named "calendar"
  543. for entries with leading dates matching dates on the calendar, and prints
  544. any following text under the appropriate day.
  545. X
  546. The program may be a little System V flavored (getopt, time routines)
  547. but should be easily portable to other vintages of UNIX.
  548. X
  549. Pcal is the combined effort of several people, most notably Patrick Wood
  550. of Pipeline Associates, Inc. for the original PostScript code and Bill
  551. Vogel of AT&T for the calendar file mechanism.  My part was simple
  552. translation to a "C" program, the addition of a couple options and a more
  553. generalized date searching routine (oh yes, and a manual page :-).
  554. X
  555. The original calendar PostScript was Copyright (c) 1987 by Patrick Wood
  556. and Pipeline Associates, Inc. with permission to modify and redistribute.
  557. Please retain this README file with the package.
  558. X
  559. X
  560. Ken Keirnan
  561. Pacific Bell
  562. San Ramon, CA.
  563. SHAR_EOF
  564. chmod 0644 Orig.ReadMe ||
  565. echo 'restore of Orig.ReadMe failed'
  566. Wc_c="`wc -c < 'Orig.ReadMe'`"
  567. test 984 -eq "$Wc_c" ||
  568.     echo 'Orig.ReadMe: original size 984, current size' "$Wc_c"
  569. fi
  570. # ============= Pcal.TeX ==============
  571. if test -f 'Pcal.TeX' -a X"$1" != X"-c"; then
  572.     echo 'x - skipping Pcal.TeX (File already exists)'
  573. else
  574. echo 'x - extracting Pcal.TeX (Text)'
  575. sed 's/^X//' << 'SHAR_EOF' > 'Pcal.TeX' &&
  576. % -*-LaTeX-*-
  577. % Converted automatically from troff to LaTeX
  578. % by tr2latex (version 1.04, July 15, 1991)
  579. % on Thu Aug 15 10:28:35 1991
  580. % tr2latex was written by Kamal Al-Yahya at Stanford University
  581. % (Kamal%Hanauma@SU-SCORE.ARPA)
  582. X
  583. \documentstyle[troffman]{article}
  584. \begin{document}
  585. %
  586. % input file: [-]pcal.man
  587. %
  588. \phead{PCAL}{4.1}{}{}{}
  589. X
  590. \shead{NAME}
  591. pcal -- generate PostScript calendars
  592. X
  593. \shead{SYNOPSIS}
  594. {\bf pcal} [{\bf --e} $|$\ {\bf --f} {\it cal\/}] [{\bf --o}
  595. {\it \ file\/}] [{\bf --j} $|$ {\bf --J}] [{\bf --l}
  596. $|$ {\bf --p}] [{\bf --m} $|$ {\bf --M}] [{\bf --b}{\it \ day\/}
  597. $|$ all ][{\bf --g}{\it \ day\/}$|$ all \/]\hfil\break
  598. [{\bf --O}] [{\bf --G}] [{\bf --F}{\it \ day\/}] [{\bf --A} $|$ {\bf --E}]
  599. [{\bf --t}{\it \ title\_font\/}] [{\bf --d}{\it \ day\_font\/}]
  600. [{\bf --n}{\it \ text\_font\/}] [{\bf --L}{\it \ footer\_string\/}]\hfil\break
  601. [{\bf --C}{\it \ footer\_string\/}] [{\bf --R}{\it \ footer\_string\/}]
  602. [{\bf --D}{\it \ symbol\/}] [{\bf --U}{\it \ symbol\/}] [{\bf --x}{\it \
  603. xscale\/}] [{\bf --y}{\it \ yscale\/}]\hfil\break
  604. [{\bf --X}{\it \ xtrans\/}] [{\bf --Y}{\it \ ytrans\/}][{\bf --I}] [{\bf --B}]
  605. [{\bf --w}] [{\bf --h}{\rm \ $|$\ }{\bf --v}]\hfil\break
  606. [{\bf month}] [{\bf year}] [{\bf nmonths}]
  607. X
  608. \shead{DESCRIPTION}
  609. {\it Pcal} generates PostScript to produce landscape or portrait
  610. calendars for any month and year.  The arguments {\bf month}, {\bf year},
  611. and {\bf nmonths}, if provided, should be numeric.  The {\bf month} value
  612. should be in the range 1 -- 12, and the {\bf year} value should be
  613. specified as 1 or 2 digits or as the full 4 digit year.  If no numeric
  614. arguments are provided, the calendar for the current month and year will
  615. be generated.
  616. X
  617. If one numeric argument is provided, it is interpreted as the {\bf year}
  618. value, and calendars for the entire year will be generated.  Otherwise,
  619. {\bf nmonth} months, starting with {\bf month} and {\bf year}, will be
  620. generated.
  621. X
  622. For whole-year calendars ({\it i.e.}, the {\bf --w} option is given), the
  623. command line arguments are interpreted somewhat differently.  By default,
  624. all months in the current year are printed, starting with January.  If
  625. the {\bf month} argument alone is given, it is expected to be the desired
  626. {\bf year} to print, and prints all of the months in the given year.  If
  627. both {\bf month} and {\bf year} are given, then 12 consecutive months are
  628. printed starting at the given month and year.  If the {\bf month}, {\bf
  629. year}, and {\bf nmonths} arguments are all present, printing begins with
  630. the given month and year and {\bf nmonths} months are printed, rounded up
  631. to the nearest multiple of 12.
  632. X
  633. {\bf The Date File}
  634. X
  635. By default, {\it pcal} simply prints an empty calendar.  Its real power
  636. is in its ability to place ``events'' in appropriate days on the
  637. calendar, thus allowing the user to create personalized calendars.  This
  638. is achieved through the use of the ``date file''.
  639. X
  640. The date file is named {\it calendar} ({\it pcal.dat} under MS-DOS), or
  641. {\it calendar} for compatibility with older versions.  {\it Pcal} will
  642. look in several places for such a file.  First, if a file called {\it
  643. calendar} exists in the caller's home directory, it is used.  Next, if
  644. such a file exists in the directory indicated by environment variable
  645. {\bf PCAL\_DIR} (or the current directory if no such variable is
  646. defined), it is used.  Finally, the directory where the {\it pcal}
  647. executable resides will be checked.  If no date file is found, an empty
  648. calendar is printed.
  649. X
  650. If a date file is found, it will be searched for lines with leading dates
  651. matching the requested month and year.  Any text following the dates
  652. found will be printed on the calendar under the appropriate day of the
  653. month.  Dates in the {\it calendar} file may be expressed in any of
  654. several formats:
  655. X
  656. %.ft CW
  657. {\tt\nofill
  658. X      $<$ordinal$>$ $<$day\_spec$>$ in $<$month\_spec$>$\{$\ast$\} \{$<$text$>$\}
  659. X      $<$day\_spec$>$ $<$prep$>$ $<$date\_spec$>$\{$\ast$\} \{$<$text$>$\}
  660. X      $<$date\_spec$>$\{$\ast$\} \{$<$text$>$\}
  661. \fill}
  662. %.ft
  663. X
  664. Where:
  665. X
  666. {\tt\nofill
  667. X      $<$month\_name$>$        := first 3+ characters of name of month, or ``all''
  668. X      $<$month\_spec$>$        := $<$month\_name$>$, or ``year''
  669. X      $<$day\_spec$>$          := first 3+ characters of name of weekday, ``day'',
  670. X                              ``weekday'', ``workday'', ``holiday'', ``nonweekday'',
  671. X                              ``nonworkday'', or ``nonholiday''
  672. X      $<$ordinal$>$           := any ordinal number (``1st'', ``2nd'', {\it etc.}),
  673. X                              ``first'' $\ldots$ ``fifth'', ``last'', ``odd'', ``even'',
  674. X                              or ``all''
  675. X      $<$prep$>$              := ``before'', ``preceding'', ``after'', ``following'',
  676. X                              ``on\_or\_before'' (``oob''), or ``on\_or\_after'' (``ooa'')
  677. X      $<$sep$>$               := one or more non-numeric, non-space, non-`$\ast$' characters
  678. X      $<$month$>$             := a numeric month (1-12)
  679. X      $<$day$>$               := day of month (1-31)
  680. X      $<$year$>$              := a numeric year
  681. \fill}
  682. %.ft
  683. X
  684. If the {\bf --A} option (American date formats, the default) is given:
  685. X
  686. {\tt\nofill
  687. X   $<$date\_spec$>$    := [$<$month\_name$>$ $<$day$>$ $|$ $<$month$>$$<$sep$>$$<$day$>$\{$<$sep$>$$<$year$>$\}]
  688. \fill}
  689. X
  690. If the {\bf --E} option (European date formats) is given:
  691. X
  692. {\tt\nofill
  693. X   $<$date\_spec$>$    := [$<$day$>$ $<$month\_name$>$ $|$ $<$day$>$$<$sep$>$$<$month$>$\{$<$sep$>$$<$year$>$\}]
  694. \fill}
  695. X
  696. {\it Pcal} also allows format specifiers in both the text and foot
  697. strings (see the {\bf --L}, {\bf --C}, and {\bf --R} options below); each
  698. will be replaced by a corresponding string as outlined in the table
  699. below.  Most of these are derived from the
  700. %.ft CW
  701. {\it strftime()}
  702. %.ft
  703. function; the {\bf \%l} and {\bf \%[o0+--]} format specifiers are
  704. specific to {\it pcal}:
  705. X
  706. {\tt\nofill
  707. X      \%a     abbreviated weekday
  708. X      \%A     full weekday
  709. X      \%b     abbreviated month name
  710. X      \%B     full month name
  711. X      \%d     day of month (1-31)
  712. X      \%j     day of year (1-366)
  713. X      \%l     days left in year (0-365)
  714. X      \%m     month (1-12)
  715. X      \%U     week number (0-53)
  716. X      \%W     week number (0-53)
  717. X      \%y     year w/o century (00-99)
  718. X      \%Y     year w/century
  719. X      \%\%     ``\%'' character
  720. X
  721. X      \%o     print number as ordinal
  722. X      \%0     print number with leading zeroes
  723. X      \%+     use following month or year
  724. X      \%--    use previous month or year
  725. \fill}
  726. X
  727. The {\bf \%U} format specifier considers the first logical Sunday (the
  728. first day of the week as printed; see the {\bf --F} option below) of the
  729. year as the first day of week number 1; the {\bf \%W} specifier uses the
  730. first logical Monday instead.  This is an extension of the behavior of
  731. the
  732. %.ft CW
  733. {\it strftime()}
  734. %.ft
  735. function.
  736. X
  737. The {\bf \%o} format specifier prints a number as an ordinal, with the
  738. appropriate suffix (``st'', ``nd'', ``rd'', or ``th'' in English)
  739. appended; for example, {\bf \%od} prints the day of the month as ``1st'',
  740. ``2nd'', ``3rd'', {\it etc.}
  741. X
  742. Unlike
  743. %.ft CW
  744. {\it strftime(),}
  745. %.ft
  746. {\it pcal}'s default is to print numbers (except {\bf \%y}{\rm )} without
  747. leading zeroes.  If leading zeroes are desired, the ``0'' prefix may be
  748. used; for example, {\bf \%0j} prints the day of year as 001-365.
  749. X
  750. The {\bf \%+} and {\bf \%--} format specifiers direct {\it pcal} to
  751. substitute the following or previous month or year for the following {\bf
  752. [bBmyY]} specifier; for example, {\bf \%+B} prints the name of the
  753. following month.
  754. X
  755. Examples:
  756. X
  757. %.ft CW
  758. {\tt\nofill
  759. X      last Monday in May$\ast$         Memorial Day Holiday
  760. \par\vspace{1.0\baselineskip}
  761. X      all Fridays in Oct          Status Meeting, 11 AM
  762. X      first workday in all        \%-B progress report due
  763. X      all Fri in all              Time card due, 3 PM
  764. X      all Monday in all           Fiscal week \%0W
  765. X      -2nd workday in all         Schedule for \%+B due
  766. X      Fri on\_or\_before all 15      Pay Day
  767. X      even Fridays in year        Pay Day
  768. X      183rd day of year           mid-year (\%l days left)
  769. \par\vspace{1.0\baselineskip}
  770. X      Tue after first Mon in Nov  Election Day (USA)
  771. \par\vspace{1.0\baselineskip}
  772. X      4th Thu in Nov$\ast$             Thanksgiving
  773. X      Fri after 4th Thu in Nov$\ast$   Day after Thanksgiving
  774. \par\vspace{1.0\baselineskip}
  775. X      12/25/90$\ast$                   Christmas     \# American
  776. X      25.12.90$\ast$                   Christmas     \# European
  777. \par\vspace{1.0\baselineskip}
  778. X      Dec 25$\ast$                     Christmas     \# American
  779. X      25 Dec$\ast$                     Christmas     \# European
  780. \fill}
  781. %.ft
  782. X
  783. Any non-numeric character may separate numeric dates.  Holidays may be
  784. flagged by following the date immediately with ``$\ast$'' as in the examples
  785. above; this will cause the date to be printed in gray.  ``Each'' and
  786. ``every'' are accepted as synonyms for ``all'', and any word may be used
  787. in place of ``in''.  The abbreviations ``oob'' and ``ooa'' may be used in
  788. place of the keywords ``on\_or\_before'' and ``on\_or\_after'',
  789. respectively.
  790. X
  791. Wildcard day names are also provided.  The keyword ``weekday'' applies to
  792. any days which are normally printed in black on the calendar.  The
  793. keyword ``workday'' is the same, but does not include any holidays.  The
  794. keyword ``holiday'' includes only those days flagged as holidays.  The
  795. keywords ``nonweekday'', ``nonworkday'', and ``nonholiday'' are also
  796. recognized as negations of the above.  See the {\bf CAVEATS} below for
  797. important notes on using these keywords.
  798. X
  799. Ordinal day numbers may be used to specify dates, either relative to the
  800. month or to the year.  Either words or numeric abbreviations may be used
  801. for ``first'' through ``fifth''; higher numbers must be given using the
  802. numeric equivalent ({\it e.g.}, 100th).  Negative ordinal numbers may
  803. even be used.  For example, ``--2nd'' means ``next to last''.
  804. X
  805. ``Odd'' and ``even'' do not refer to the actual date; instead, ``odd''
  806. means ``alternate, starting with the first'', and ``even'' means
  807. ``alternate, starting with the second''.  Thus, ``odd Fridays in March''
  808. refers to the first, third, and (if present) fifth Fridays in March - not
  809. to those Fridays falling on odd dates.
  810. X
  811. ``All'' refers to each individual month; ``year'' refers to the year as
  812. an entity.  Thus ``odd Fridays in all'' refers to the first, third, and
  813. fifth Friday of each month, while ``odd Fridays in year'' refers to the
  814. first Friday of January and every other Friday thereafter.
  815. X
  816. Text in the date file may use C-like escape sequences ({\it i.e.}, a
  817. ``\bs '' followed by a character, 1 -- 3 octal digits, or ``x'' followed
  818. by 1 -- 2 hexadecimal digits).  Escaped whitespace (including {\bf
  819. newline} ) and the standard ANSI character escapes (``\bs a'', ``\bs b'',
  820. ``\bs f'', ``\bs n'', ``\bs r'', ``\bs t'', ``\bs v'') are all replaced
  821. by a single blank.
  822. X
  823. Lines in the {\it calendar} file consisting of {\bf year \#\#\#\#} (where
  824. {\bf \#\#\#\#} is a numeric year) can be used to set the year for
  825. following entries.  This assumes that the following entries do not
  826. contain a year; any date entries containing year information will set the
  827. remembered year to that year.
  828. X
  829. Lines in the {\it calendar} file consisting of {\bf opt $<$options$>$}
  830. can be used to override the defaults for any command-line options except
  831. {\bf --e}, {\bf --f}, {\bf --h}, {\bf --v}, {\bf --D}, and {\bf --U}.
  832. Any options specified in this manner are, in turn, overridden by those
  833. specified explicitly on the command line.
  834. X
  835. Lines in the {\it calendar} file consisting of {\bf note $<$month$>$} can
  836. be used to place notes regarding the entire month is one of the unused
  837. blocks of the calendar.  The {\bf $<$month$>$} indicator may be either a
  838. number 1 through 12 or an alphabetic month name as described above;
  839. ``note all'' will place the associated text in the notes block for each
  840. month in the current year.
  841. X
  842. Comments are supported in the {\it calendar} file.  Any characters
  843. following a ``\#'' character through the end of the line are ignored.
  844. X
  845. {\it Pcal} supports rudimentary {\it cpp}-like functionality in the date
  846. file, allowing the following constructs:  {\bf define\ $|$\ undef}, {\bf
  847. if\{n\}def $\ldots$ else $\ldots$ endif}, and {\bf include}.  Note that
  848. these are not preceded by ``\#'' as they are in C.  Symbol names defined
  849. using these keywords (or via the {\bf -D} option) are case-insensitive.
  850. It is not an error to {\bf undef} an undefined symbol, nor to {\bf
  851. define} a previously-defined one.  An {\bf ifdef} alone is always {\bf
  852. false}; an {\bf ifndef} alone is always {\bf true}.
  853. X
  854. The name of the file in the {\bf include} directive may optionally be
  855. surrounded by either `` '' or $<$$>$, both of which are ignored.  If the
  856. name is not an absolute path, it is taken to be relative to the directory
  857. where the file containing the directive is located.  {\it Pcal} is smart
  858. enough to translate {\bf \~{}/} to the user's home directory.
  859. X
  860. In addition to pre-processing keywords, {\it pcal} also accepts boolean
  861. expressions in {\bf if\{n\}def} directives.  These expressions consist of
  862. symbol names joined by the boolean operators {\bf !}, {\bf \&}, {\bf
  863. \^{}}, and {\bf $|$}, in order of precedence, high to low.  Parentheses
  864. may be used to alter the precedence.  The synonyms {\bf \&\&} and {\bf
  865. $|$$|$} are accepted for {\bf \&} and {\bf $|$}.  A symbol name evaluates
  866. to {\bf true} if currently defined, {\bf false} if not; thus:
  867. X
  868. %.ft CW
  869. {\tt\nofill
  870. X      ifdef A $|$ B $|$ C
  871. \fill}
  872. %.ft
  873. X
  874. $\ldots$ is {\bf true} if any of the symbols A, B, and C is defined, and:
  875. X
  876. %.ft CW
  877. {\tt\nofill
  878. X      ifdef A \& B \& C
  879. \fill}
  880. %.ft
  881. X
  882. $\ldots$ is {\bf true} if they all are.  Note that {\bf ifndef $<$expr$>$}
  883. is equivalent to {\bf ifdef !( $<$expr$>$ ).}
  884. X
  885. {\bf The Moon File}
  886. X
  887. If a file of the name {\it .moon\#\#} ({\it moon\#\#.dat}under MS-DOS),
  888. where {\bf \#\#} is the last two digits of the calendar year, exists in
  889. the same directory as the date file, {\it pcal} uses the information
  890. contained within to calculate the phase of the moon.  If no such file
  891. exists, {\it pcal} uses an approximate algorithm.
  892. X
  893. Entries in the moon file must conform to the following syntax:
  894. X
  895. If the {\bf --A} option (American date formats, the default) is given:
  896. X
  897. %.ft CW
  898. {\tt\nofill
  899. X      $<$quarter$>$ $<$month$>$$<$sep$>$$<$day$>$ \{$<$hour$>$$<$sep$>$$<$min$>$\}
  900. \fill}
  901. %.ft
  902. X
  903. If the {\bf --E} option (European date formats) is given:
  904. X
  905. %.ft CW
  906. {\tt\nofill
  907. X      $<$quarter$>$ $<$day$>$$<$sep$>$$<$month$>$ \{$<$hour$>$$<$sep$>$$<$min$>$\}
  908. \fill}
  909. %.ft
  910. X
  911. Where:
  912. X
  913. {\tt\nofill
  914. X      $<$quarter$>$           := ``nm'', ``fq'' or ``1q'', ``fm'', ``3q'' or ``lq''
  915. X                              (new moon, first quarter, full moon, last quarter)
  916. X      $<$hour$>$              := number 0-23 (24-hour clock)
  917. X      $<$min$>$               := number 0-59
  918. \fill}
  919. X
  920. This file must contain entries for all quarter moons in the year, in
  921. chronological order; if any errors are encountered, {\it pcal} will
  922. revert to using its default algorithm.
  923. X
  924. As in the date file, comments start with `\#' and run through the end of
  925. the given line.
  926. X
  927. {\bf Options}
  928. X
  929. {\it Pcal} has many options:
  930. \begin{TPlist}{{\bf --e}}
  931. \item[{{\bf --e}}]
  932. Prints an empty calendar.  Do not print entries from a {\it calendar}
  933. file.
  934. \item[{{\bf --f}{\it \ cal}}]
  935. Directs {\it pcal} to use the file name {\it cal} as the input file in
  936. place of the default {\it calendar} file in the user's home directory (or
  937. the directory pointed to by {\bf PCAL\_DIR}.
  938. \item[{{\bf --o}{\it \ file}}]
  939. Directs {\it pcal} to write the output to {\it file} instead of to
  940. stdout.
  941. \item[{{\bf --l}}]
  942. Causes the output to be in landscape mode (default).  This also resets
  943. the x- and y-axis scaling and translation factors to the defaults for
  944. landscape mode.
  945. \item[{{\bf --p}}]
  946. Causes the output to be in portrait mode.  This also resets the x- and
  947. y-axis scaling and translation factors to the defaults for portrait mode.
  948. \item[{{\bf --j}}]
  949. Causes the Julian date (day of year) to be printed in each calendar box.
  950. \item[{{\bf --J}}]
  951. Causes the Julian date and the number of days remaining in the year to be
  952. printed in each calendar box.
  953. \item[{{\bf --m}}]
  954. Causes moon icons to be printed on dates corresponding to new, half, and
  955. full moons (the default is that no moons are printed).
  956. \item[{{\bf --M}}]
  957. Causes moon icons to be printed on all dates (the default is that no
  958. moons are printed).
  959. \item[{{\bf --b}{\it \ day}{\bf \ $|$\ all}}]
  960. Causes all dates falling on weekday {\it day} to be printed in black;
  961. {\bf --b all} causes all weekdays to be printed in black.
  962. \item[{{\bf --g}{\it \ day}{\bf \ $|$\ all}}]
  963. Causes all dates falling on weekday {\it day} to be printed in gray;
  964. {\bf --g all} causes all weekdays to be printed in gray.
  965. \begin{IPlist}
  966. \IPitem{{}}
  967. The default for the {\bf --b}{\rm \ and\ }{\bf --g} options is to print
  968. Saturdays and Sundays in gray and other days, unless flagged as holidays,
  969. in black.
  970. \end{IPlist}%
  971. \item[{{\bf --O}}]
  972. Causes pcal to print ``gray'' dates as outlined characters.
  973. \item[{{\bf --G}}]
  974. Causes pcal to print ``gray'' dates as outlined characters filled with
  975. gray.
  976. \item[{{\bf --F}{\it \ day}}]
  977. Selects weekday {\it day} as the first day of the week.  The given day
  978. will appear in the left-most column of the calendar.
  979. \item[{{\bf --A}}]
  980. Directs {\it pcal} to use American date conventions {\bf mm/dd\{/yy\}}
  981. and {\bf month dd} ) when parsing the date file (default).
  982. \item[{{\bf --E}}]
  983. Directs {\it pcal} to use European date conventions {\bf dd/mm\{/yy\}}
  984. and {\bf dd month} ) when parsing the date file.
  985. \item[{{\bf --X}{\it \ xtrans}}]
  986. Specifies the x-axis translation value for positioning the output on the
  987. page.
  988. \item[{{\bf --Y}{\it \ ytrans}}]
  989. Specifies the y-axis translation value for positioning the output on the
  990. page.
  991. \item[{{\bf --x}{\it \ xscale}}]
  992. Specifies the x-axis scaling factor for the calendar size.
  993. \item[{{\bf --y}{\it \ yscale}}]
  994. Specifies the y-axis scaling factor for the calendar size.
  995. \item[{{\bf --t}{\it \ title\_font}}]
  996. Specifies the name of a font to use to print the month name and year at
  997. the top of the calendar.  For example, {\bf pcal\ --t\ Times-Roman}.
  998. \item[{{\bf --d}{\it \ day\_font}}]
  999. Similar to the {\bf --t} option, but selects the font used to print the
  1000. day numbers.
  1001. \item[{{\bf --n}{\it \ text\_font}}]
  1002. Similar to the {\bf --t} option, but selects the font used to print the
  1003. text inside each day and in the notes block.
  1004. \item[{{\bf --D}{\it \ symbol}}]
  1005. Defines the named symbol prior to reading the date file.
  1006. \item[{{\bf --U}{\it \ symbol}}]
  1007. Un-defines the named symbol prior to reading the date file.
  1008. \item[{{\bf --L}{\it \ string}}]
  1009. Causes the accompanying string to be printed as a left-justified footer.
  1010. Format specifiers denoting the month and/or year may appear in the
  1011. string;  the appropriate values will be substituted upon printing.
  1012. \item[{{\bf --C}{\it \ string}}]
  1013. Causes the accompanying string to be printed as a centered footer.
  1014. Format specifiers denoting the month and/or year may appear in the
  1015. string;  the appropriate values will be substituted upon printing.
  1016. \item[{{\bf --R}{\it \ string}}]
  1017. Causes the accompanying string to be printed as a right-justified footer.
  1018. Format specifiers denoting the month and/or year may appear in the
  1019. string;  the appropriate values will be substituted upon printing.
  1020. \item[{{\bf --B}}]
  1021. Causes {\it pcal} to leave unused calendar boxes blank (default is gray).
  1022. \item[{{\bf --w}}]
  1023. Causes {\it pcal} to print a calendar for 12 consecutive months: 3 rows /
  1024. 4 columns in landscape mode, 4 rows / 3 columns in portrait mode.  See
  1025. the {\bf CAVEATS} section for details on the use of this option with
  1026. other options.
  1027. \item[{{\bf --I}}]
  1028. Resets all parameters to the program defaults.
  1029. \item[{{\bf --h}}]
  1030. Causes {\it pcal} to write version information, usage message, and full
  1031. explanation of options and file formats (to {\it stdout}) and terminate.
  1032. \item[{{\bf --v}}]
  1033. Causes {\it pcal} to write version information only (to {\it stdout}) and
  1034. terminate.
  1035. \end{TPlist}
  1036. X
  1037. Any option which normally takes an argument may be specified without the
  1038. argument in order to reset the value to the program default.  Note that
  1039. while the {\bf --D} option alone clears all the defined symbols, the {\bf
  1040. --U} option alone has no effect.  The {\bf --} (or {\bf --\,--} as per
  1041. System V) argument may be used to disambiguate command lines such as:
  1042. X
  1043. \begin{IPlist}
  1044. \IPitem{{}}
  1045. {\bf pcal --t 9 90}
  1046. \end{IPlist}
  1047. X
  1048. This could be written instead as one of the following:
  1049. \begin{IPlist}
  1050. \IPitem{{}}
  1051. {\bf pcal --t -- 9 90}
  1052. \nwl
  1053. {\bf pcal --t --\,-- 9 90}
  1054. \end{IPlist}
  1055. X
  1056. If the environment variable {\bf PCAL\_OPTS} is defined, its contents are
  1057. parsed as a command line.  Flags set via {\bf PCAL\_OPTS} override the
  1058. program defaults, but are overridden by options set via {\bf opt} lines
  1059. in the {\it calendar} file or explicitly on the command line.
  1060. X
  1061. \shead{CAVEATS}
  1062. The ``workday'' and ``holiday'' keywords are aware of only those holidays
  1063. which have already been flagged at the point where they appear.  For
  1064. example, consider January 1990:
  1065. X
  1066. %.ft CW
  1067. {\tt\nofill
  1068. %.ne 7
  1069. X                                January 1990
  1070. X                             S  M Tu  W Th  F  S
  1071. X                                1  2  3  4  5  6
  1072. X                             7  8  9 10 11 12 13
  1073. X                            14 15 16 17 18 19 20
  1074. X                            21 22 23 24 25 26 27
  1075. X                            28 29 30 31
  1076. \fill}
  1077. %.ft
  1078. X
  1079. If the {\it calendar} file looked like this:
  1080. X
  1081. %.ft CW
  1082. {\tt\nofill
  1083. X      workday on\_or\_before all 15   payday
  1084. X      3rd Mon in Jan$\ast$               MLK day
  1085. \fill}
  1086. %.ft
  1087. X
  1088. then {\it pcal} would mark the 15th as ``payday'' since at that point in
  1089. the {\it calendar} file it has no way of knowing that January 15th will
  1090. later be flagged as a holiday.  If the two lines were reversed, such that
  1091. the holiday preceded the ``workday'' wildcard, then {\it pcal} would work
  1092. as intended, marking instead the 12th as ``payday''.  Also, beware of
  1093. year boundaries which affect the handling of all of the day wildcard
  1094. keywords.  In general, it is best to place monthly wildcards such as the
  1095. example above at the end of each year to achieve the desired effect.
  1096. X
  1097. When the {\bf --w} and {\bf --p} options are used together, {\it pcal}
  1098. revises the y-scale factor in order to use the entire portrait page;
  1099. therefore, the user should avoid using use the {\bf --y} option when
  1100. using both the {\bf --w} and {\bf --p} options.  Use of the {\bf --w}
  1101. option in any case effectively disables the {\bf --m}, {\bf --M}, {\bf
  1102. --j} , and {\bf --J} options.
  1103. X
  1104. \shead{SEE ALSO}
  1105. cal(1)
  1106. X
  1107. \shead{VERSION}
  1108. This documentation corresponds to v4.1 dated 15-AUG-1991.
  1109. X
  1110. \shead{AUTHORS}
  1111. The original PostScript code to generate the calendars was written by
  1112. Patrick Wood (Copyright (c) 1987 by Patrick Wood of Pipeline Associates,
  1113. Inc.), and authorized for modification and redistribution.  The calendar
  1114. file inclusion code was originally written in {\it bs}(1) by Bill Vogel
  1115. of AT\&T.  Patrick's original PostScript was modified and enhanced
  1116. several times by others whose names have regrettably been lost.  Ken
  1117. Keirnan of Pacific Bell assembled the original ``C'' version upon which
  1118. this is based; additional modifications and enhancements are the work of
  1119. Joseph P. Larson, Ed Hand, Andrew W. Rogers, Mark Kantrowitz, Joe
  1120. Brownlee, Jamie Zawinski, Richard L. Dyson, Bill Hogsett, and Floyd
  1121. Miller.
  1122. X
  1123. \end{document}
  1124. SHAR_EOF
  1125. chmod 0644 Pcal.TeX ||
  1126. echo 'restore of Pcal.TeX failed'
  1127. Wc_c="`wc -c < 'Pcal.TeX'`"
  1128. test 23366 -eq "$Wc_c" ||
  1129.     echo 'Pcal.TeX: original size 23366, current size' "$Wc_c"
  1130. fi
  1131. true || echo 'restore of Pcal.hlp failed'
  1132. echo End of part 1, continue with part 2
  1133. exit 0
  1134. -- 
  1135.    ^      _   Joe Brownlee, Analysts International Corporation @ AT&T Bell Labs
  1136.   /_\  @ / `  471 E Broad St, Suite 2001, Columbus, Ohio 43215   (614) 860-7461
  1137.  /   \ | \_,  E-mail: jbr@cblph.att.com     Who pays attention to what _I_ say?
  1138.  "Scotty, we need warp speed in 3 minutes or we're all dead!" --- James T. Kirk
  1139.