--- ray/src/gen/gensky.c 1998/04/23 16:27:05 2.19 +++ ray/src/gen/gensky.c 2003/07/27 22:12:02 2.21 @@ -1,9 +1,6 @@ -/* Copyright (c) 1992 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: gensky.c,v 2.21 2003/07/27 22:12:02 schorsch Exp $"; #endif - /* * gensky.c - program to generate sky functions. * Our zenith is along the Z-axis, the X-axis @@ -15,13 +12,16 @@ static char SCCSid[] = "$SunId$ LBL"; #include +#include + +#include + #include #include #include "color.h" -extern char *strcpy(), *strcat(), *malloc(); extern double stadj(), sdec(), sazi(), salt(), tz2mer(); #ifndef PI @@ -35,7 +35,7 @@ extern double stadj(), sdec(), sazi(), salt(), tz2mer #define S_UNIF 3 #define S_INTER 4 -#define overcast (skytype==S_OVER|skytype==S_UNIF) +#define overcast ((skytype==S_OVER)|(skytype==S_UNIF)) double normsc(); /* sun calculation constants */ @@ -362,7 +362,7 @@ char *hs; register char *cp = hs; register int i, j; - if (tsolar = *cp == '+') cp++; /* solar time? */ + if ( (tsolar = *cp == '+') ) cp++; /* solar time? */ while (isdigit(*cp)) cp++; if (*cp == ':') hour = atoi(hs) + atoi(++cp)/60.0;