diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 1996-05-10 19:31:02 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 1996-05-10 19:31:02 +0000 |
commit | 9d0a521e31a7492f1469af85891013437e005007 (patch) | |
tree | abe9257e02c1969caec23509a68972ff6d675699 /usr.bin/calendar/day.c | |
parent | cb7545a995cef590cc07723aaedb1228b2ef51a9 (diff) | |
download | src-9d0a521e31a7492f1469af85891013437e005007.tar.gz src-9d0a521e31a7492f1469af85891013437e005007.zip |
Localize even more.
FIx Orthodox Easter calculation
Better debug output
Notes
Notes:
svn path=/head/; revision=15723
Diffstat (limited to 'usr.bin/calendar/day.c')
-rw-r--r-- | usr.bin/calendar/day.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/usr.bin/calendar/day.c b/usr.bin/calendar/day.c index 0a5ff8f816b9..210e8d37fa76 100644 --- a/usr.bin/calendar/day.c +++ b/usr.bin/calendar/day.c @@ -101,10 +101,6 @@ void setnnames(void) free(fndays[i].name); fndays[i].name = strdup(buf); fndays[i].len = strlen(buf); -#ifdef DEBUG - printf("ndays[%d] = %s, fndays[%d] = %s\n", - i, ndays[i].name, i, fndays[i].name); -#endif } for (i = 0; i < 12; i++) { @@ -130,10 +126,6 @@ void setnnames(void) free(fnmonths[i].name); fnmonths[i].name = strdup(buf); fnmonths[i].len = strlen(buf); -#ifdef DEBUG - printf("nmonths[%d] = %s, fnmonths[%d] = %s\n", - i, nmonths[i].name, i, fnmonths[i].name); -#endif } } @@ -177,6 +169,7 @@ time_t Mktime (date) tm.tm_sec = 0; tm.tm_min = 0; tm.tm_hour = 0; + tm.tm_wday = 0; tm.tm_mday = tp->tm_mday; tm.tm_mon = tp->tm_mon; tm.tm_year = tp->tm_year; @@ -356,9 +349,6 @@ isnow(endp, monthp, dayp, varp) } } -#if DEBUG - fprintf(stderr, "day2: day %d yday %d\n", day, tp->tm_yday); -#endif if (!(flags & F_EASTER)) { *monthp = month; *dayp = day; @@ -372,6 +362,9 @@ isnow(endp, monthp, dayp, varp) *varp = 1; } +#if DEBUG + fprintf(stderr, "day2: day %d(%d) yday %d\n", *dayp, day, tp->tm_yday); +#endif /* if today or today + offset days */ if (day >= tp->tm_yday - f_dayBefore && day <= tp->tm_yday + offset + f_dayAfter) |