home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
c
/
cal26.zoo
/
cal.doc
< prev
next >
Wrap
Text File
|
1992-11-17
|
6KB
|
139 lines
CAL display a calendar version 2.6
SYNOPSIS
cal [-d] [[num_month] year] (numerical arguments)
cal [-d] [word_month] [year] (verbal month argument)
DESCRIPTION
Cal is an enhanced version of the unix cal command. It is compatible to
the unix version in that it uses the same input arguments and its output
may be piped or redirected anywhere.
Cal displays a calendar for a specified year, a specified month and year,
or for the current date. By default, it displays a calendar for the current
month, with the current day hilighted. It correctly handles the transition
from the Julian to Gregorian calendars in September 1752.
ARGUMENTS
A verbally-specified month may be entered without specifying a year in the
argument list; however, a single numerical argument will be interpreted as
a year. Only the first 3 characters of the month name are significant for
a verbally-specified month. The command 'cal 10' refers to 10 AD, not
October, and not 1910.
The -d switch is explained in the ENHANCEMENTS section below.
COMMAND EXAMPLES
cal display the current month
cal 1996 display the year of 1996
cal 9 1752 display the month of September 1752
cal sep 1752 same as above
cal January display January of the current year
cal help help message displayed for unrecognized arguments
ENHANCEMENTS OVER STANDARD 'CAL' COMMAND
If displaying the single-month format, cal will look for a file called
cal.dat in the current directory and then in its own directory. If found,
cal will read the file, looking for special date descriptions for that month
which will be displayed to the right of the calendar. Up to eight special
dates may be displayed per month. If the current date happens to fall on
one of these special dates, it will be flagged by an asterisk. The special
date descriptions specified in cal.dat are single lines, formatted so:
YYYY MM DD NW xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Where
YYYY is the year,
MM is the month (01 - 12),
DD is the day (00 if the NW field is used),
NW is the weekday-of-month code (00 if the DD field is used)
xxxx... is the message, if longer than 50 characters it will be truncated.
The data MUST occupy the character fields as shown. If YYYY is specified
as -999, the month and day are assumed to be annual events such as holidays,
and the description will be displayed for any year. If MM is specified as
-9, the day is assumed to be a monthly event for the specified year. In the
weekday-of-month code NW, N signifies on which weekday W the special date
occurs. For example, 31 indicates the third sunday. Values of W range from
1 to 7, for Sunday to Saturday, respectively. A value of 9 for N indicates
"last" as in 95 for "last thursday."
A line in cal.dat must start with -999 or a 4-digit number to be considered
as data. The data lines may be in any order, but cal will stop reading the
file once it finds eight dates for the month being displayed. All special
dates will be displayed in chronological order.
The -d commandline switch provides a way for MORE than eight date
descriptions to be displayed. This switch causes any date description older
than today's date to be ignored, thereby giving room for other descriptions
with future dates to be displayed. As time progresses through the month,
old descriptions are discarded and newer ones are used. The -d switch
affects only the current month display.
MS-DOS ENHANCEMENTS
Cal modifies the display attributes behind its output in order to display
the calendar in attractive colors. Display manipulation is not done if
cal's output is redirected somewhere else. When cal starts up, it looks
for a file called cal.col, first in the current directory, and then in
cal's originating directory. The colors have defaults if the file is not
found.
Example of a color definition file:
15 02 video colors for month name
01 03 video colors for weekday header
07 01 video colors for normal calendar days
13 01 video colors for sundays
14 02 video colors for current day
07 06 background color for yearly calendar (the space between months)
11 00 video colors for special day descriptions
12 08 video colors for asterisk indicating that a description=today
FG BG
Color definitions must appear as above, as a two-character field for the
foreground color, followed by a space, folowed by a two-character field for
the background color. The color definitions must start on the first line,
and must not contain blank lines. Comments may appear after the second
field, provided that the total line length does not exceed 80 characters.
Possible colors:
black 0
blue 1
green 2
cyan 3
red 4
violet 5
orange 6
light gray 7
dark gray 8
bright blue 9
bright green 10
bright cyan 11
bright red 12
bright violet 13
yellow 14
white 15
Specifying a background color from 8 to 15 will result in a background
color of 0 to 7, with flashing text.
AUTHOR
Alex Matulich - uucp: alex@bilver.uucp
internet: alex%bilver@peora.sdc.ccur.com
alex@bilver.oau.org
alex.matulich@oau.org
fidonet: 1:363/140, Alex Matulich
(c) 1992 by Unicorn Research Corporation. All rights reserved.
Inspired by an Amiga program by Gary L. Brant.