File: readme.cal

package info (click to toggle)
cal 3.5-7
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny, sarge, squeeze
  • size: 284 kB
  • ctags: 120
  • sloc: ansic: 1,116; makefile: 41
file content (183 lines) | stat: -rw-r--r-- 8,023 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
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.

The executable distributed in the archive was compiled using Zortech C++
3.1 (resulting in an executable half the size of Borland's), and then
compressed with LZEXE.

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.man    - unix man page in text format
        source/cal.c      - source code for cal

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 matulich_a@seaa.navsea.navy.mil.


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.  
Clean up of 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 and any valid 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 "\[").
Minor fix to MK_FP to compile under Microsoft C.