CAL is a nicely-enhanced version of the unix `cal' command for MSDOS.
Features:

 * Hilights today's date when displaying a monthly calendar.

 * Displays an optional user-definable list of `special day'
   descriptions (like appointments) to the right of the monthly
   calendar display.  Cal can be set optionally to ignore appointments
   older than the current day.  Next month's appointments are shown if
   there is room to do so.  Multiple appointment data files may also
   be specified on the commandline.
   
 * You can specify your own appointment and color definition files on the
   commandline, or use the defaults.

 * Date descriptions can display "years since" a given year, useful for
   birthdays and anniversaries.

 * Completely configurable colors -- eight separate color attributes.

 * No ANSI driver needed for colors, and the output may be redirected
   anywhere, just like the unix version.  However, ANSI color control may
   be enabled (e.g. for unix) with a #define in the source code.

 * Commandline-compatible with unix `cal' command, but with several
   enhanced switch settings.

 * Source code included.

This archived collection of files is placed into the Public Domain.
Feel free to redistribute the this archive, but PLEASE make sure the
archive contains all the original files, namely:

        readme.cal        - this file
        cal.exe           - the MSDOS executable program
        cal.doc           - documentation for cal.exe
        cal.dat           - optional sample data file of appointment dates
        cal.col           - optional sample file of color attributes
        source/*.os2      - files about compiling the source for OS/2
        source/*.unx      - unix-related information
        source/cal.1      - unix man page for cal with formatting codes
        source/cal.c      - source code for cal
        source/makefile.* - makefiles

Note:  _I_ think the colors defined in the color definition file
cal.col are ugly!  If you want to use the more attractive (in my
opinion) default colors, just delete or rename cal.col.  This file
is only included to show you how it works.

The source code should be compilable for any OS.  No guarantees are made
in this regard, however.

Requests, bug reports, suggestions, donations, proposals for
contract work, and so forth may be sent to:

        Attn:  Alex Matulich
        Unicorn Research Corporation
        4621 N. Landmark Drive
        Orlando, FL 32817-1235
        USA
        407-657-4974  FAX 407-657-6149

or send e-mail to alex@unicorn.us.com.

Unicorn Research is now on the World Wide Web!  http://unicorn.us.com


Version history:

1.0
Port to MSDOS of original unix-to-Amiga port by Gary L. Brant.

2.0
Modified to display calendar in colors without ANSI.SYS, while retaining
output redirectability.  Added current day indicator in monthly display.
Made all code compatible with unix and ANSI C by putting all MSDOS-specific
code into blocks activated by #define MSDOS at beginning of source file.

2.1
Added display of special date descriptions to monthly calendar.  Re-wrote
some code sections to accommodate this feature.  All arrays are now
dynamic to reduce the size of the executable.

2.2
Fixed an intermittent pointer-trashing bug in the date description section
that caused the monthly display to display garbage at times.

2.3
Removed hardcoded color settings, and added capability to read external
color file.

2.4
Added -d switch to inhibit the display of outdated date descriptions
(changed to --f in version 2.7).

2.5
Fixed two bugs reported by J"urgen Koslowski.  The "last weekday of month"
function in the cal.dat file now works, and the single-month display now
looks fine if the year doesn't have 4 digits.  Also re-wrote the section
that processes command-line arguments.

2.6
Fixed a bug reported by Paul Beam.  Date descriptions longer than 50
characters now do not blank out the next line in the calendar.

2.7
Other contributors added improved commandline switches, allowing the
appointment file and color file to be specified on the commandline, and
also the ability to display next month's appointments on the current
month if there is room to do so.  Processing of commandline arguments
has been completely replaced by the GNU getopt.c library functions.  The
source will now use colors if compiled under OS/2, also, and search PATH
and DPATH for data files.  A potentially serious bug pertaining to path
concatenation was caught.

2.8
Added --europe switch, so that the calendar display has Monday as the
first day of the week, which is a more familiar format in Europe.

2.9
A contributor sent code with several fine modifications, but it was useful
only for the Borland compiler.  I have re-done it for ANSI compatibility.
The maximum number of appointments to be displayed now defaults to 24, and
is adjustable on the commandline.  Multiple data files may be specified.
Cal no longer stops reading a data file when it has filled up its maximum
number of descriptions; it now reads through the whole file so that it can
sort out all dates to be displayed.

2.9a&b
a: Fixed a bug in 2.8 and 2.9 that caused cal to attempt to read its color
file before determining its home directory.  Also added a contributor's
suggestion to detect the number of columns for MSDOS displays wider than 
80 columns, so that appointments won't be truncated if they really can fit.
b: Minor changes made for greater compatibility with other compilers.

3.0(a)
(Not significantly new, just the next number in the sequence)
Replaced tabs with spaces, for systems with tab stops other than every 8
characters.  Added an "anniversaries and birthdays" feature whereby if a
date description contains a year in brackets or braces, this number is
converted to the number of years since the year indicated.  3.0a fixes
a problem when the 0th anniversary was displayed as blank.

3.1
Fixed trashed memory pointer when the number of appointments exceeded the
maximum specified number of lines.  Fixed ordinal suffixes for anniversary
dates between 11 and 13.  Added weekly reminder feature (specify a negative
day-of-week number in NW field in cal.dat).  Added daily reminder feature
(specify -9 for DY field in cal.dat).  Fixed problem with January
anniversaries being 1 year off if displayed with December calendar.

3.2
Fixed display problem causing garbage to appear when changing maximum
displayable appointments.  Rewrote commandline argument parsing to be more
efficient.  Commandline arguments can now be preceded with a single '-'
and also a '/' if using MSDOS or OS/2 (the old '--' method still works
for compatibility with previous versions).  Next-month birthdays and
anniversaries are no longer displayed a year older than they should be.

3.3
Fixed a problem where the "next month" appointment descriptions displayed
during December were those of January that same year, instead of next year.
Fixed problem that sometimes caused weekly reminders to be duplicated.

3.4
Chris Bagwell modified the source extensively to use ANSI color control
instead of hardware control, and made other unix-related changes.  Added
support for periodic reminders (e.g. payday every 14 days).  Added -p flag.

3.5
Dan Fandrich added support for unix "reminder(1)" date file.  Cleaned up
source code.  Fixed a bug in periodic reminders that caused all periodic
dates for that month to have todays date on the day of the event.  Added
support for reading an environment variable CALOPT.  If this variable is
set then it will be read in and any command line options will be used.
Cal will now return an error code if it did not successfully run.  Dates
calculated in description text changed.  It now never displays the [] or
{}'s.  If you need them then you can add it to the text by escaping them
with a '\' (such as "\[").  Added -thismonth option to disable appointment
display for next month; this also now requires the -today option to be
specified with more than just -t.

3.5b/c
Added FreeBSD compatibility.  Added PREFIX definition for specifying
default directory for color and data files.  Fixed broken Sep 1752 display
when using -europe switch.  Fixed ANSI-color end-of-line problem when
scrolling a yearly calendar.  3.5c - fixed strok() NULL bug.

4.0 - April 18, 2001
Alex Matulich - Fixed cal to work with DJGPP while maintaining the
direct screen write capability for colors.  Added new --continue
option that will print multiple months with special day decriptions
one after another.

4.0 - December 13, 2000
Chris Bagwell - Added locale support.  Renamed date and color files to
match those under dos.  Moved default location to /etc/cal for these
files.  Removed almost never used -8bit option.  When displaying a
full year, months are now labeled with complete month name instead
of the short version.  Changed reference of options from "-option"
to "--option" (It still works both ways).  Changed layout of file package.
Updated docs.  Changed default option under unix to not use colors.
Cleaned up the internal code that drew the calendar in a buffer; This
corrected a few ANSI drawing bugs and allowed adding Julian date support.
Changed internal routines to calculate day-of-week to a self-documenting
format.  Added --month option as a duplicate of --europe option to
match Linux style commandline.  Added --3months options to display
previous/current/next month at once.  Added --year option to display
the current year calendar without having to specify the year number.
