Fix leap year calculation. Bump PORTREVISION.

PR:		ports/64871
Submitted by:	Johannes Groedem
This commit is contained in:
Bruce M Simpson 2004-06-16 07:35:59 +00:00
parent 4e3925c125
commit dab5e5b989
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=111573
2 changed files with 12 additions and 1 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= cvstrac
PORTVERSION= 1.1.2
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= devel
MASTER_SITES= ftp://ftp.cvstrac.org/cvstrac/

View File

@ -0,0 +1,11 @@
--- history.c 5 Apr 2003 16:04:21 -0000 1.28
+++ history.c 28 Mar 2004 21:01:11 -0000
@@ -155,7 +155,7 @@
p->tm_year += p->tm_mon/12;
p->tm_mon %= 12;
}
- isLeapYr = p->tm_year/4==0 && (p->tm_year/100!=0 || (p->tm_year+300)/400==0);
+ isLeapYr = p->tm_year%4==0 && (p->tm_year%100!=0 || p->tm_year%400==0);
p->tm_yday = priorDays[p->tm_mon] + p->tm_mday - 1;
if( isLeapYr && p->tm_mon>1 ) p->tm_yday++;
nDay = (p->tm_year-70)*365 + (p->tm_year-69)/4 -p->tm_year/100 +