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.25 by greg, Wed Dec 8 21:22:33 2010 UTC vs.
Revision 2.26 by greg, Wed Jul 30 17:30:27 2014 UTC

# Line 15 | Line 15 | static const char      RCSid[] = "$Id$";
15   #include  <string.h>
16   #include  <math.h>
17   #include  <ctype.h>
18 <
18 > #include  "sun.h"
19   #include  "color.h"
20  
21 extern int jdate(int month, int day);
22 extern double stadj(int  jd);
23 extern double sdec(int  jd);
24 extern double salt(double sd, double st);
25 extern double sazi(double sd, double st);
26
21   #ifndef  PI
22   #define  PI             3.14159265358979323846
23   #endif
# Line 38 | Line 32 | extern double sazi(double sd, double st);
32   #define  overcast       ((skytype==S_OVER)|(skytype==S_UNIF))
33  
34   double  normsc();
41                                        /* sun calculation constants */
42 extern double  s_latitude;
43 extern double  s_longitude;
44 extern double  s_meridian;
35  
36   #undef  toupper
37   #define  toupper(c)     ((c) & ~0x20)   /* ASCII trick to convert case */
# Line 96 | Line 86 | void printdefaults(void);
86   void userror(char  *msg);
87   double normsc(void);
88   int cvthour(char  *hs);
89 < void printhead(register int  ac, register char  **av);
89 > void printhead(int  ac, char  **av);
90  
91  
92   int
93 < main(argc, argv)
94 < int  argc;
95 < char  *argv[];
93 > main(
94 >        int  argc,
95 >        char  *argv[]
96 > )
97   {
98          int  got_meridian = 0;
99          int  i;
# Line 361 | Line 352 | normsc(void)                   /* compute normalization factor (E0*F2/
352                                  /* intermediate sky approx. */
353                  {3.5556, -2.7152, -1.3081, 1.0660, 0.60227},
354          };
355 <        register double  *nf;
355 >        double  *nf;
356          double  x, nsc;
357 <        register int  i;
357 >        int  i;
358                                          /* polynomial approximation */
359          nf = nfc[skytype==S_INTER];
360          x = (altitude - PI/4.0)/(PI/4.0);
# Line 380 | Line 371 | cvthour(                       /* convert hour string */
371          char  *hs
372   )
373   {
374 <        register char  *cp = hs;
375 <        register int    i, j;
374 >        char  *cp = hs;
375 >        int     i, j;
376  
377          if ( (tsolar = *cp == '+') ) cp++;              /* solar time? */
378          while (isdigit(*cp)) cp++;
# Line 420 | Line 411 | cvthour(                       /* convert hour string */
411  
412   void
413   printhead(              /* print command header */
414 <        register int  ac,
415 <        register char  **av
414 >        int  ac,
415 >        char  **av
416   )
417   {
418          putchar('#');

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines