Subject: misc/5547: calendar(1) format extensions
To: None <gnats-bugs@gnats.netbsd.org>
From: Mason Loring Bliss <mason@acheron.middleboro.ma.us>
List: netbsd-bugs
Date: 06/06/1998 10:58:04
>Number:         5547
>Category:       misc
>Synopsis:       calendar(1) format extensions
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people (Misc Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Jun  6 08:05:00 1998
>Last-Modified:
>Originator:     Mason Loring Bliss
>Organization:
>Release:        unknown
>Environment:
System: NetBSD acheron.middleboro.ma.us 1.3.1 NetBSD 1.3.1 (MLB) #7: Wed May 27 02:22:23 EDT 1998 mason@acheron.middleboro.ma.us:/usr/src/sys/arch/i386/compile/MLB i386


>Description:

The enclosed diff patches calendar(1) so that it handles two directives that
may appear in calendar files.

Each line in a calendar file may include the following:

+n

where n is the number of days in advance the line should be displayed, which,
if it's longer than the global "look ahead" number, supercedes the global
"look ahead" number for this entry only.

Each line may also include:

@n

where n in this case is a year which denotes when an event took place.

The placement of these directives in any particular line is generally
unimportant, as long as they don't come before the date at the beginning
of the line.

An example of calendar(1) output using both directives:

In 6 days: 06/12 Dad's Birthday (1932: 66 years ago)

Note that the change is completely backwards-compatible. Existing calendar
files do not need to be modified, and will work fine with the new version
of calendar(1).

>How-To-Repeat:



>Fix:

Here's a gzipped and uuencoded file containing a context diff that applies
to the calendar.c file as it existed on April 4th, 1998. If the file has
changed since I snagged a copy, I can update my patch accordingly.

begin 600 calendar.diff.gz
M'XL(".E5>34"`V-A;&5N9&%R+F1I9F8`Y5AM3]M*%O[L_HK3]+;8B1/L!,@+
MI7=I"[NL:'MU::7>I0@9>YR,\)MLAQ!5_/<]Y\S8<4)8]6ZEW96V*I"9.7->
MGWEF3MKM-OA>))+`RWM^+XT"X_-L#L=9#M`'9SCINY/!&-SQ>/2LV^TV9(T+
MKX2_SQ.``W"=R=[>9.`JN?;Z/QK#WH&][P(/20T-!X"?NL\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