ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/gen/gensky.c
(Generate patch)

Comparing ray/src/gen/gensky.c (file contents):
Revision 2.18 by greg, Thu Jul 18 18:00:51 1996 UTC vs.
Revision 2.21 by schorsch, Sun Jul 27 22:12:02 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1992 Regents of the University of California */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   *  gensky.c - program to generate sky functions.
6   *              Our zenith is along the Z-axis, the X-axis
# Line 15 | Line 12 | static char SCCSid[] = "$SunId$ LBL";
12  
13   #include  <stdio.h>
14  
15 + #include  <stdlib.h>
16 +
17 + #include  <string.h>
18 +
19   #include  <math.h>
20  
21   #include  <ctype.h>
22  
23   #include  "color.h"
24  
24 extern char  *strcpy(), *strcat(), *malloc();
25   extern double  stadj(), sdec(), sazi(), salt(), tz2mer();
26  
27   #ifndef  PI
# Line 35 | Line 35 | extern double  stadj(), sdec(), sazi(), salt(), tz2mer
35   #define  S_UNIF         3
36   #define  S_INTER        4
37  
38 < #define  overcast       (skytype==S_OVER|skytype==S_UNIF)
38 > #define  overcast       ((skytype==S_OVER)|(skytype==S_UNIF))
39  
40   double  normsc();
41                                          /* sun calculation constants */
# Line 59 | Line 59 | struct {
59          "AST", 60, "ADT", 45,
60          "NST", 52.5, "NDT", 37.5,
61          "GMT", 0, "BST", -15,
62 <        "WET", -15, "WETDST", -30,
63 <        "MET", -30, "METDST", -45,
64 <        "MEZ", -30, "MESZ", -45,
62 >        "CET", -15, "CEST", -30,
63 >        "EET", -30, "EEST", -45,
64 >        "AST", -45, "ADT", -60,
65 >        "GST", -60, "GDT", -75,
66 >        "IST", -82.5, "IDT", -97.5,
67 >        "JST", -135, "NDT", -150,
68 >        "NZST", -180, "NZDT", -195,
69          "", 0
70   };
71                                          /* required values */
# Line 358 | Line 362 | char  *hs;
362          register char  *cp = hs;
363          register int    i, j;
364  
365 <        if (tsolar = *cp == '+') cp++;          /* solar time? */
365 >        if ( (tsolar = *cp == '+') ) cp++;              /* solar time? */
366          while (isdigit(*cp)) cp++;
367          if (*cp == ':')
368                  hour = atoi(hs) + atoi(++cp)/60.0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines