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

Comparing ray/src/px/pcomb.c (file contents):
Revision 2.31 by greg, Mon Mar 15 21:16:54 2004 UTC vs.
Revision 2.33 by greg, Tue Jun 8 19:48:30 2004 UTC

# Line 8 | Line 8 | static const char      RCSid[] = "$Id$";
8   */
9  
10   #include "platform.h"
11 + #include "standard.h"
12   #include "rtprocess.h"
12 #include "rterror.h"
13   #include "color.h"
14   #include "calcomp.h"
15   #include "view.h"
# Line 72 | Line 72 | int    wrongformat = 0;
72   int     gotview;
73  
74  
75 extern char     *emalloc();
76
75   static gethfunc tabputs;
76 + static void checkfile(void);
77 + static double rgb_bright(COLOR  clr);
78 + static double xyz_bright(COLOR  clr);
79 + static void init(void);
80 + static void combine(void);
81 + static void advance(void);
82 + static double l_expos(char      *nam);
83 + static double l_pixaspect(char *nm);
84 + static double l_colin(char      *nam);
85 + static double l_ray(char        *nam);
86 + static double l_psize(char *nm);
87  
88 < main(argc, argv)
89 < int     argc;
90 < char    *argv[];
88 >
89 > int
90 > main(
91 >        int     argc,
92 >        char    *argv[]
93 > )
94   {
95          int     original;
96          double  f;
97 <        int     a, i;
97 >        int     a;
98          SET_DEFAULT_BINARY();
99          SET_FILE_BINARY(stdin);
100          SET_FILE_BINARY(stdout);
# Line 218 | Line 230 | usage:
230          eputs(
231   " [-w][-x xr][-y yr][-e expr][-f file] [ [-o][-s f][-c r g b] pic ..]\n");
232          quit(1);
233 +        return 1; /* pro forma return */
234   }
235  
236  
# Line 257 | Line 270 | tabputs(                       /* put out string preceded by a tab */
270   }
271  
272  
273 < checkfile()                     /* ready a file */
273 > static void
274 > checkfile(void)                 /* ready a file */
275   {
276          register int    i;
277                                          /* process header */
# Line 296 | Line 310 | checkfile()                    /* ready a file */
310   }
311  
312  
313 < double
314 < rgb_bright(clr)
315 < COLOR  clr;
313 > static double
314 > rgb_bright(
315 >        COLOR  clr
316 > )
317   {
318          return(bright(clr));
319   }
320  
321  
322 < double
323 < xyz_bright(clr)
324 < COLOR  clr;
322 > static double
323 > xyz_bright(
324 >        COLOR  clr
325 > )
326   {
327          return(clr[CIEY]);
328   }
# Line 315 | Line 331 | COLOR  clr;
331   double  (*ourbright)() = rgb_bright;
332  
333  
334 < init()                                  /* perform final setup */
334 > static void
335 > init(void)                                      /* perform final setup */
336   {
337          double  l_colin(char *), l_expos(char *), l_pixaspect(char *),
338                          l_ray(char *), l_psize(char *);
# Line 345 | Line 362 | init()                                 /* perform final setup */
362   }
363  
364  
365 < combine()                       /* combine pictures */
365 > static void
366 > combine(void)                   /* combine pictures */
367   {
368          EPNODE  *coldef[3], *brtdef;
369          COLOR   *scanout;
# Line 403 | Line 421 | combine()                      /* combine pictures */
421   }
422  
423  
424 < advance()                       /* read in data for next scanline */
424 > static void
425 > advance(void)                   /* read in data for next scanline */
426   {
427          int     ytarget;
428          register COLOR  *st;
# Line 431 | Line 450 | advance()                      /* read in data for next scanline */
450   }
451  
452  
453 < double
454 < l_expos(nam)                    /* return picture exposure */
455 < register char   *nam;
453 > static double
454 > l_expos(                        /* return picture exposure */
455 >        register char   *nam
456 > )
457   {
458          register int    fn, n;
459  
# Line 448 | Line 468 | register char  *nam;
468                          return(colval(input[fn].expos,n));
469          eputs("Bad call to l_expos()!\n");
470          quit(1);
471 +        return 1; /* pro forma return */
472   }
473  
474  
475 < double
475 > static double
476   l_pixaspect(char *nm)           /* return pixel aspect ratio */
477   {
478          register int    fn;
# Line 463 | Line 484 | l_pixaspect(char *nm)          /* return pixel aspect ratio */
484   }
485  
486  
487 < double
488 < l_colin(nam)                    /* return color value for picture */
489 < register char   *nam;
487 > static double
488 > l_colin(                        /* return color value for picture */
489 >        register char   *nam
490 > )
491   {
492          int     fn;
493          register int    n, xoff, yoff;
# Line 514 | Line 536 | register char  *nam;
536                  return(colval(input[fn].scan[MIDSCN+yoff][xscan+xoff],n));
537          eputs("Bad call to l_colin()!\n");
538          quit(1);
539 +        return 1; /* pro forma return */
540   }
541  
542  
543 < double
544 < l_ray(nam)              /* return ray origin or direction */
545 < register char   *nam;
543 > static double
544 > l_ray(          /* return ray origin or direction */
545 >        register char   *nam
546 > )
547   {
548          static unsigned long    ltick[MAXINP];
549          static FVECT    lorg[MAXINP], ldir[MAXINP];
# Line 553 | Line 577 | register char  *nam;
577                          return(i < 3 ? lorg[fn][i] : ldir[fn][i-3]);
578          eputs("Bad call to l_ray()!\n");
579          quit(1);
580 +        return 1; /* pro forma return */
581   }
582  
583  
584 < double
584 > static double
585   l_psize(char *nm)               /* compute pixel size in steradians */
586   {
587          static unsigned long    ltick[MAXINP];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines