pkgsrc/x11/xglobe/patches/patch-ab
2008-01-13 22:53:10 +00:00

40 lines
1.6 KiB
Text

$NetBSD: patch-ab,v 1.3 2008/01/13 22:53:10 rillig Exp $
Line 717 resolves an ambiguity between sqrt(double) and sqrt(long
double) with sunpro.
--- renderer.cpp.orig 1999-12-06 17:13:35.000000000 +0100
+++ renderer.cpp 2007-12-05 18:21:58.055143000 +0100
@@ -713,7 +713,7 @@
(py-renderedImage->height()/2);
if(temp >= 0)
- startx = (renderedImage->width()/2 - (int)sqrt(temp));
+ startx = (renderedImage->width()/2 - int(sqrt(double(temp))));
else
startx = (renderedImage->width()/2);
@@ -1483,8 +1483,8 @@
labelstring.sprintf("%s, %s %d. %d, %d:%02d %s\n"
"View pos %2.2f° %c %2.2f° %c\n"
"Sun pos %2.2f° %c %2.2f° %c",
- dt.date().dayName(dt.date().dayOfWeek()),
- dt.date().monthName(dt.date().month()),
+ dt.date().dayName(dt.date().dayOfWeek()).ascii(),
+ dt.date().monthName(dt.date().month()).ascii(),
dt.date().day(), dt.date().year(),
dt.time().hour(), dt.time().minute(),
tzname[tm->tm_isdst],
@@ -1562,9 +1562,9 @@
for(int i=0; i<numstars; i++)
{
- x = rand() % renderedImage->width();
- y = rand() % renderedImage->height();
- brightness = 150+ (rand() % 106);
+ x = random() % renderedImage->width();
+ y = random() % renderedImage->height();
+ brightness = 150+ (random() % 106);
p = (unsigned int *)renderedImage->scanLine(y);
p += x;
*p = qRgb(brightness, brightness, brightness);