home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Source Code 1992 March
/
Source_Code_CD-ROM_Walnut_Creek_March_1992.iso
/
usenet
/
altsrcs
/
1
/
1813
/
pcal.hlp
< prev
next >
Wrap
Text File
|
1990-12-28
|
7KB
|
179 lines
1 PCAL
Pcal generates PostScript to produce landscape or portrait
orientated calendars for any month and year. The defaults for
month and year are the current month and year.
VMS Version
Execution format:
pcal [options] [mm yy] [n]
If a file named CALENDAR.DAT resides in the caller's home
directory (or in a directory defined by the logical name PCAL_DIR,
if it exists), it will be searched for lines with leading dates
matching the requested month and year (current by default). Any
text following the date will be printed on the calendar under the
appropriate day of the month. Dates in the CALENDAR.DAT file may
consist of a numeric or alpha month (at least the first 3
characters for month names) followed by a numeric day and
optionally followed by a year. Any non-numeric character may
separate numeric dates. Holidays may be flagged by following the
date immediately with '*'; this will cause the date to be printed
in gray. Lines in the CALENDAR.DAT file consisting of "year xxxx"
(where xxxx is a numeric year) can be used to set the year for
following entries. This assumes that the following entries do not
contain a year; any date entries containing year information will
set the remembered year to that year. Lines consisting of
"opt <options>" can be used to override defaults for all command-
line flags except -e, -f, -D, and -U; any flags set in this manner
are themselves overridden by flags specified explicitly on the
command line. Comments ('#' through end-of-line) are permitted.
Example:
# sample CALENDAR.DAT file - Raytheon holidays and exempt paydays, 1990
opt -t Helvetica-Bold -d Helvetica-Bold # override default fonts
year 1990 # set default year
7/4* Independence Day # '*' flags 7/4 as holiday
7/12/90 Exempt payday # full numeric date
Aug 16 Exempt payday # alternate date format
9/3* Labor Day
9/20 Exempt payday
10/8* Columbus Day (observed)
10/25 Exempt payday
11/20 Exempt payday
11/22* Thanksgiving
11/23*
12/13 Exempt payday
12/24*
12/25* Christmas
Release 2.1 of pcal adds rudimentary cpp-like functionality to the
date file, supporting define|undef, if{n}def ... {else ...} endif,
and include:
define meetings
ifdef meetings
include meetings.dat
undef meetings
endif
Symbol names are case-insensitive. It is not an error to "undef"
an undefined symbol, nor to "define" a previously-defined one.
"ifdef" alone is always false; "ifndef" alone is always true.
The name of the file in the "include" directive may optionally be
surrounded by either "" or <>, both of which are ignored. If the
name is not an absolute path, it is taken to be relative to the
directory where the file containing the directive is located.
Release 2.1 also looks for global symbol PCAL_OPTS; if defined,
its contents are parsed as command-line flags. These override the
program defaults, but are overridden by any specified via "opt"
lines in the date file or on the command line. Example:
$ define PCAL_OPTS "-n Helvetica -D meetings" ! login.com
$ pcal -"U" meetings 9 90 ! un-define symbol at runtime
2 parameters
mm yy n
"mm" and "yy" are numeric values of the month (1-12) and year
(0-99) (i.e., July 1990 would be 7 90). If you just include the
"yy" option, an entire 12 months of calendars will be generated.
A specific month can be produced by including the "mm" parameter.
The "n" parameter will produce the "n" consecutive months of
calendars starting with the requested month.
The following flags may be specified (in increasing order of
precedence) in global symbol PCAL_OPTS, in "opt" lines in the date
file (all but -e, -f, -D, -U), or on the command line. Any flag
which normally takes an argument may be specified without the
argument; this resets its value to the program default. (-D
alone thus clears all defined symbols; -U alone has no effect.)
The '-' flag has been added to disambiguate cases where an
argument-less flag has been specified immediately before a numeric
parameter:
$ pcal -t - 9 90
2 -e
Print an empty calendar (i.e., do not print entries from a
CALENDAR.DAT file.)
2 -f <FILE>
Directs pcal to use the file name <FILE> as the input file in
place of the default CALENDAR.DAT file in the callers home
directory or in the directory specified by logical name PCAL_DIR.
2 -o <FILE>
Directs pcal to write the PostScript calendar into FILE
(default: CALENDAR.PS in the current directory.)
2 -l
This will cause the output to come out in landscape mode
(default).
2 -p
This will cause the output to come out in portrait mode
instead of landscape mode.
2 -b <DAY> | all
This will cause all dates on weekday DAY to be printed in
black; "-b all" causes all dates to be printed in black unless
explicitly flagged as a holiday.
2 -g <DAY> | all
This will cause all dates on weekday DAY to be printed in
gray; "-g all" causes all dates to be printed in gray. Default is
to print Saturdays and Sundays in gray and other dates in black.
2 -t <FONT>
This option can be used to change the font used to print the
title (i.e. $ pcal -t "Times-Roman"). The default is Times-Bold.
2 -d <FONT>
This option is the same as -t except that the font used to
print the day numbers is changed. The default is Times-Bold.
2 -n <FONT>
This option is the same as -n except that the font used to
print the notes in the calendar boxes is changed. The default is
Helvetica-Narrow.
2 -"L" <STRING>
This will cause STRING to be printed as a left footer.
2 -"C" <STRING>
This will cause STRING to be printed as a center footer.
2 -"R" <STRING>
This will cause STRING to be printed as a right footer.
2 -"D" <SYM>
This will define symbol SYM prior to reading the date file;
-D alone clears all defined symbols.
2 -"U" <SYM>
This will undefine symbol SYM prior to reading the date file.
2 CREDITS
The original PostScript code to generate the calendars was
written by Patrick Wood (Copywrite (c) 1987 by Patrick Wood of
Pipeline Associates, Inc.), and authorized for modification and
redistribution. The CALENDAR.DAT file inclusion code was
originally written in "bs(1)" by Bill Vogel of AT&T. Patrick's
original PostScript was modified and enhanced several times by
others whose names have regrettably been lost. Ken Keirnan of
Pacific Bell assembled the original "C" version upon which this is
based; additional modifications and enhancements were the work of
Joseph P. Larson, Ed Hand, Andrew W. Rogers, Mark Kantrowitz, Joe
Brownlee, and Eric Hammond. This VMS HELP file was written by
Richard Dyson and updated by Andrew W. Rogers.