From 3affde40dd338e0d04831b846bf935dce950bd3f Mon Sep 17 00:00:00 2001 From: atatat Date: Tue, 10 Jul 2001 14:32:32 +0000 Subject: Eliminate the hideous blue-on-black problem with zoom factors set too high. The problem is with casting doubles to ints, which is nasty and overflows easily. --- x11/xearth/Makefile | 3 ++- x11/xearth/distinfo | 3 ++- x11/xearth/patches/patch-aa | 24 ++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 x11/xearth/patches/patch-aa (limited to 'x11') diff --git a/x11/xearth/Makefile b/x11/xearth/Makefile index ed6ce2dbaeb..d245483dfb3 100644 --- a/x11/xearth/Makefile +++ b/x11/xearth/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.7 2001/02/17 17:07:05 wiz Exp $ +# $NetBSD: Makefile,v 1.8 2001/07/10 14:32:32 atatat Exp $ # DISTNAME= xearth-1.1 +PKGNAME= xearth-1.1nb1 CATEGORIES= x11 MASTER_SITES= ftp://cag.lcs.mit.edu/pub/tuna/ \ ftp://ftp.cs.colorado.edu/users/tuna/ diff --git a/x11/xearth/distinfo b/x11/xearth/distinfo index 2e0a34f0844..d8ce329b6a7 100644 --- a/x11/xearth/distinfo +++ b/x11/xearth/distinfo @@ -1,4 +1,5 @@ -$NetBSD: distinfo,v 1.2 2001/04/19 11:07:53 skrll Exp $ +$NetBSD: distinfo,v 1.3 2001/07/10 14:32:32 atatat Exp $ SHA1 (xearth-1.1.tar.gz) = 5b664648ff592d6f29a96a17823ec59db4958b1d Size (xearth-1.1.tar.gz) = 157887 bytes +SHA1 (patch-aa) = e97ad3e3f0282bbe8bb6077f7ae4447b4403503d diff --git a/x11/xearth/patches/patch-aa b/x11/xearth/patches/patch-aa new file mode 100644 index 00000000000..5871cdc2be9 --- /dev/null +++ b/x11/xearth/patches/patch-aa @@ -0,0 +1,24 @@ +--- scan.c.orig Sun Nov 7 01:51:55 1999 ++++ scan.c Tue Jul 10 09:31:14 2001 +@@ -626,6 +626,10 @@ + right = XPROJECT(M_PI); + top = YPROJECT(BigNumber); + bottom = YPROJECT(-BigNumber); ++ if (top >= INT_MAX) top = INT_MAX - 1; ++ if (top <= INT_MIN) top = INT_MIN + 1; ++ if (bottom >= INT_MAX) bottom = INT_MAX - 1; ++ if (bottom <= INT_MIN) bottom = INT_MIN + 1; + + scan(right, top, left, top); + scan(left, top, left, bottom); +@@ -995,6 +999,10 @@ + right = XPROJECT(M_PI); + top = YPROJECT(BigNumber); + bottom = YPROJECT(-BigNumber); ++ if (top >= INT_MAX) top = INT_MAX - 1; ++ if (top <= INT_MIN) top = INT_MIN + 1; ++ if (bottom >= INT_MAX) bottom = INT_MAX - 1; ++ if (bottom <= INT_MIN) bottom = INT_MIN + 1; + + scan(right, top, left, top); + scan(left, top, left, bottom); -- cgit v1.2.3