Subject: Re: "BUG" in installation process?
To: None <uunet!cix.compulink.co.uk!kderrick@uunet.UU.NET>
From: Keith White <kwhite@csi.uottawa.ca>
List: netbsd-bugs
Date: 02/21/1994 06:20:02
>Number:         135
>Category:       bin
>Synopsis:       calendar entries with weekday names don't work properly
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 21 06:20:02 1994
>Originator:     Keith White
>Organization:
Keith White, Department of Computer Science, University of Ottawa
kwhite@csi.uottawa.ca [+1 613 564 5455]
>Release:        
>Environment:
System: NetBSD infox 0.9a INFOX#0 i386


>Description:
The calendar man page claims that you can have calendar entries
that begin with weekday names.  This is not true.  It certainly
*appears* that the code is making an attempt to "do the right
thing"; however, entries like

Sunday	last day of the weekend...

will only be displayed on the 1st day of the month (which may or
may not be a Sunday).  The following patch fixes this behaviour.
>How-To-Repeat:
>Fix:

% ident `which calendar`
/usr/bin/calendar:
     $Id: calendar.c,v 1.3 1994/01/05 13:13:00 cgd Exp $

*** calendar.c.orig	Sun Feb 20 21:09:58 1994
--- calendar.c	Sun Feb 20 21:38:38 1994
***************
*** 209,214 ****
--- 209,216 ----
  			day = v2 ? v2 : 1;
  		}
  	}
+ 	if (flags&F_ISDAY)
+ 		day = tp->tm_mday + (((day - 1) - tp->tm_wday + 7) % 7);
  	day = cumdays[month] + day;
  
  	/* if today or today + offset days */
>Audit-Trail:
>Unformatted:



------------------------------------------------------------------------------