diff options
author | tg <tg@FreeBSD.org> | 2000-03-10 20:31:34 +0800 |
---|---|---|
committer | tg <tg@FreeBSD.org> | 2000-03-10 20:31:34 +0800 |
commit | 72e132c1a311873953470630e3fc1e25169424fe (patch) | |
tree | a04aa526bb02e1df980bf1318af2073dec95cac7 /math/sc | |
parent | 0e1ef9e96c98d592b587235ade3f69d8e067869f (diff) | |
download | freebsd-ports-gnome-72e132c1a311873953470630e3fc1e25169424fe.tar.gz freebsd-ports-gnome-72e132c1a311873953470630e3fc1e25169424fe.tar.zst freebsd-ports-gnome-72e132c1a311873953470630e3fc1e25169424fe.zip |
Fix leap year handling until 2099.
PR: 17070
Submitted by: julian
Diffstat (limited to 'math/sc')
-rw-r--r-- | math/sc/files/patch-ac | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/math/sc/files/patch-ac b/math/sc/files/patch-ac index b3b30937d706..27fb2928c94a 100644 --- a/math/sc/files/patch-ac +++ b/math/sc/files/patch-ac @@ -1,5 +1,5 @@ ---- interp.c.orig Mon May 11 13:43:36 1992 -+++ interp.c Tue Apr 20 18:55:25 1999 +--- interp.c.orig Mon May 11 20:43:36 1992 ++++ interp.c Fri Mar 10 13:23:29 2000 @@ -476,7 +476,7 @@ dodts(mo, day, yr) int mo, day, yr; @@ -9,6 +9,15 @@ register struct tm *tp; register int i; register long jdate; +@@ -484,7 +484,7 @@ + mdays[1] = 28 + (yr%4 == 0); + + if (mo < 1 || mo > 12 || day < 1 || day > mdays[--mo] || +- yr > 1999 || yr < 1970) { ++ yr > 2099 || yr < 1970) { + error("@dts: invalid argument"); + cellerror = CELLERROR; + return(0.0); @@ -551,15 +551,13 @@ int which; double when; |