From starkhome!gene@sbstark.cs.sunysb.edu  Sat Dec 31 03:46:41 1994
Received: from sbstark.cs.sunysb.edu (sbstark.cs.sunysb.edu [130.245.1.47]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id DAA27773 for <FreeBSD-gnats-submit@freebsd.org>; Sat, 31 Dec 1994 03:46:40 -0800
Received: from starkhome.UUCP (root@localhost) by sbstark.cs.sunysb.edu (8.6.9/8.6.9) with UUCP id GAA01675 for FreeBSD-gnats-submit@freebsd.org; Sat, 31 Dec 1994 06:44:10 -0500
Received: by starkhome.cs.sunysb.edu (8.6.9/1.34)
	id GAA09598; Sat, 31 Dec 1994 06:45:43 -0500
Message-Id: <199412311145.GAA09598@starkhome.cs.sunysb.edu>
Date: Sat, 31 Dec 1994 06:45:43 -0500
From: starkhome!gene@sbstark.cs.sunysb.edu (Gene Stark)
Reply-To: starkhome!gene@sbstark.cs.sunysb.edu
To: FreeBSD-gnats-submit@freebsd.org
Subject: Bogus lines output by "calendar"
X-Send-Pr-Version: 3.2

>Number:         91
>Category:       bin
>Synopsis:       "calendar" outputs bogus line on 1st of year
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    core
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 31 03:50:00 1994
>Closed-Date:    Sat Dec 31 03:50:00 1994
>Last-Modified:  Thu Sep 13 12:54:15 GMT 2007
>Originator:     Gene Stark
>Release:        FreeBSD 2.1.0-Development i386
>Organization:
>Environment:

>Description:

"Calendar" outputs a line like the following when the date is near the
first of the year:

	# 1 ""

This line does not appear in the user's calendar file.

This is a combination of problems.  "Calendar" assumes that if a line
of the calendar file contains no recognizable date, then the first of the
year is assumed.  "Calendar" calls "cpp" to preprocess the calendar file.
"Cpp" always outputs the line above.  When "calendar" sees this line,
it believes it matches the first of the year and includes it in the output.

It is not clear to me whether this is a bug in "calendar", "cpp", or both.
It seems to me that "cpp" is supposed to output legal C without preprocessor
directives.  The line shown above is not.  The problem apparently arose out
of recent changes to "cpp", so perhaps someone should look into whether
the line above is appropriate output from "cpp".  On the other hand, "calendar"
should probably be smarter about matching dates.

>How-To-Repeat:

Do "calendar" when the date is just before the first of the year.

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



