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

Comparing ray/src/gen/mkillum3.c (file contents):
Revision 2.13 by greg, Mon Aug 15 19:48:06 2011 UTC vs.
Revision 2.14 by greg, Thu Sep 15 22:34:41 2016 UTC

# Line 15 | Line 15 | char   DATSUF[] = ".dat";              /* data file suffix */
15   char    DSTSUF[] = ".dist";             /* distribution suffix */
16   char    FNCFNM[] = "illum.cal";         /* function file name */
17  
18 < void compinv(COLORV *rinv, COLORV *rp, int m);
19 < void colorout(int p, COLORV *da, int n, int m, double mult, FILE *fp);
20 < void fputnum(double d, FILE *fp);
21 < void brightout(COLORV *da, int n, int m, double mult, FILE *fp);
22 < void fputeol(FILE *fp);
23 < void compavg(COLOR col, COLORV *da, int n);
24 < char * dfname(struct illum_args *il, int c);
25 < FILE * dfopen(struct illum_args *il, int c);
18 > static void compinv(COLORV *rinv, COLORV *rp, int m);
19 > static void colorout(int p, COLORV *da, int n, int m, double mult, FILE *fp);
20 > static void fputnum(double d, FILE *fp);
21 > static void brightout(COLORV *da, int n, int m, double mult, FILE *fp);
22 > static void fputeol(FILE *fp);
23 > static void compavg(COLOR col, COLORV *da, int n);
24 > static char * dfname(struct illum_args *il, int c);
25 > static FILE * dfopen(struct illum_args *il, int c);
26  
27  
28   void
29   printobj(               /* print out an object */
30          char  *mod,
31 <        register OBJREC  *obj
31 >        OBJREC  *obj
32   )
33   {
34 <        register int  i;
34 >        int  i;
35  
36          if (issurface(obj->otype) && !strcmp(mod, VOIDID))
37                  return;         /* don't print void surfaces */
# Line 63 | Line 63 | dfname(                        /* return data file name */
63   )
64   {
65          char  fname[MAXSTR];
66 <        register char  *s;
66 >        char  *s;
67  
68          s = strcpy(fname, il->datafile);
69          s += strlen(s);
# Line 77 | Line 77 | dfname(                        /* return data file name */
77   }
78  
79  
80 < FILE *
80 > static FILE *
81   dfopen(                 /* open data file */
82 <        register struct illum_args  *il,
82 >        struct illum_args  *il,
83          int  c
84   )
85   {
# Line 99 | Line 99 | dfopen(                        /* open data file */
99   }
100  
101  
102 < extern void
102 > void
103   flatout(                /* write hemispherical distribution */
104          struct illum_args  *il,
105          COLORV  *da,
# Line 156 | Line 156 | flatout(               /* write hemispherical distribution */
156   }
157  
158  
159 < extern void
159 > void
160   roundout(                       /* write spherical distribution */
161          struct illum_args  *il,
162          COLORV  *da,
# Line 212 | Line 212 | roundout(                      /* write spherical distribution */
212   }
213  
214  
215 < extern void
215 > void
216   illumout(               /* print illum object */
217 <        register struct illum_args  *il,
217 >        struct illum_args  *il,
218          OBJREC  *ob
219   )
220   {
# Line 243 | Line 243 | illumout(              /* print illum object */
243   }
244  
245  
246 < void
246 > static void
247   compavg(                /* compute average for set of data values */
248          COLOR  col,
249 <        register COLORV  *da,
249 >        COLORV  *da,
250          int  n
251   )
252   {
253 <        register int  i;
253 >        int  i;
254  
255          setcolor(col, 0.0, 0.0, 0.0);
256          i = n;
# Line 262 | Line 262 | compavg(               /* compute average for set of data values */
262   }
263  
264  
265 < void
265 > static void
266   compinv(                /* compute other side of row average */
267 <        register COLORV  *rinv,
268 <        register COLORV  *rp,
267 >        COLORV  *rinv,
268 >        COLORV  *rp,
269          int  m
270   )
271   {
# Line 280 | Line 280 | compinv(               /* compute other side of row average */
280   }
281  
282  
283 < extern int
283 > int
284   average(                /* evaluate average value for distribution */
285 <        register struct illum_args  *il,
285 >        struct illum_args  *il,
286          COLORV  *da,
287          int  n
288   )
# Line 300 | Line 300 | average(               /* evaluate average value for distribution *
300  
301   static int      colmcnt = 0;    /* count of columns written */
302  
303 < void
303 > static void
304   fputnum(                        /* put out a number to fp */
305          double  d,
306          FILE  *fp
# Line 312 | Line 312 | fputnum(                       /* put out a number to fp */
312   }
313  
314  
315 < void
315 > static void
316   fputeol(                        /* write end of line to fp */
317 <        register FILE  *fp
317 >        FILE  *fp
318   )
319   {
320          putc('\n', fp);
# Line 322 | Line 322 | fputeol(                       /* write end of line to fp */
322   }
323  
324  
325 < void
325 > static void
326   colorout(       /* put out color distribution data */
327          int  p,
328 <        register COLORV  *da,
328 >        COLORV  *da,
329          int  n,
330          int  m,
331          double  mult,
332          FILE  *fp
333   )
334   {
335 <        register int  i, j;
335 >        int  i, j;
336  
337          for (i = 0; i < n; i++) {
338                  for (j = 0; j < m; j++) {
# Line 344 | Line 344 | colorout(      /* put out color distribution data */
344   }
345  
346  
347 < void
347 > static void
348   brightout(      /* put out brightness distribution data */
349 <        register COLORV  *da,
349 >        COLORV  *da,
350          int  n,
351          int  m,
352          double  mult,
353          FILE  *fp
354   )
355   {
356 <        register int  i, j;
356 >        int  i, j;
357  
358          for (i = 0; i < n; i++) {
359                  for (j = 0; j < m; j++) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines