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.32 by schorsch, Sun Mar 28 20:33:14 2004 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines