summaryrefslogtreecommitdiffstats
path: root/usr.bin/calendar/calendar.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/calendar/calendar.c')
-rw-r--r--usr.bin/calendar/calendar.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/calendar/calendar.c b/usr.bin/calendar/calendar.c
index c6e60dd..deb4cfc 100644
--- a/usr.bin/calendar/calendar.c
+++ b/usr.bin/calendar/calendar.c
@@ -55,7 +55,6 @@ static char sccsid[] = "@(#)calendar.c 8.3 (Berkeley) 3/25/94";
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <tzfile.h>
#include <unistd.h>
#include "pathnames.h"
@@ -72,6 +71,7 @@ int isnow __P((char *));
FILE *opencal __P((void));
void settime __P((void));
void usage __P((void));
+#define isleap(y) (((y) % 4) == 0 && ((y) % 100) != 0 || ((y) % 400) == 0)
int
main(argc, argv)
@@ -172,10 +172,10 @@ settime()
(void)time(&now);
tp = localtime(&now);
if (isleap(tp->tm_year + 1900)) {
- yrdays = DAYSPERLYEAR;
+ yrdays = 366;
cumdays = daytab[1];
} else {
- yrdays = DAYSPERNYEAR;
+ yrdays = 365;
cumdays = daytab[0];
}
/* Friday displays Monday's events */
OpenPOWER on IntegriCloud