Dec 112017
 
A very nice calendar display program for dos like the UNIX utility, output to screen or your choice with other extras.
File CAL28.ZIP from The Programmer’s Corner in
Category Databases and related files
A very nice calendar display program for dos like the UNIX utility, output to screen or your choice with other extras.
File Name File Size Zip Size Zip Type
CAL.COL 1126 486 deflated
CAL.DAT 2207 1030 deflated
CAL.DOC 7241 2858 deflated
CAL.EXE 10318 9991 deflated
README.CAL 4555 2033 deflated
SOURCE 0 0 stored
CAL.C 20443 6409 deflated
COPYING 18321 6637 deflated
GETOPT.C 18881 5975 deflated
GETOPT.H 4485 1772 deflated
README.OS2 1281 700 deflated

Download File CAL28.ZIP Here

Contents of the CAL.DOC file


CAL display a calendar version 2.8

SYNOPSIS

cal [options] [[num_month] year] (numerical arguments)
cal [options] [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
system-date 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 options are explained more fully in the ENHANCEMENTS sections below.
The available options are:

--nod[ata] - Do not try to read any appointment data file.
--d[ata-file]=filename - Read appointments from `filename'
(default appointment data filename is cal.dat).
--f[uture] - If current month is displayed, then show only
future appointments from the appointment file,
not appointments that are past.
NOTE: This switch was -d in previous versions.
--e[urope] - Use European format (1st weekday is Monday)
--noc[olor] - Inhibit the use of colors.
--c[olor-file]=filename - Read color definitions from `filename'
(default color filename is cal.col)

COMMAND EXAMPLES

cal --f --d=my_dates display the current month and future
appointments defined in file `my_dates'
cal 1996 display the entire 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 (or whatever you specify with the --d option) in the current
directory and then in cal's directory of origin. 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. If there is room,
appointments for the next month may also be displayed (next month's dates
having definitions like "2nd Thursday" will be skipped). 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."

NOTE: If cal is invoked with the --europe switch, then the W values 1-7
denote Monday(1) to Sunday(7) rather than Sunday(1) to Saturday(7).

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, REGARDLESS OF THE ORDERING
IN THE APPOINTMENT DATA FILE.

The --f 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 --f switch
affects only the display for the current month, and not other months.

MS-DOS / OS/2 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 (or whatever you specify with the --c option),
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: [email protected]
internet: alex%[email protected]
[email protected]
fidonet: 1:363/140, Alex Matulich

...with enhancements and modifications by other contributors.

(c) 1992 by Unicorn Research Corporation. All rights reserved.
Inspired by an Amiga program by Gary L. Brant.


 December 11, 2017  Add comments

Leave a Reply