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

Comparing ray/src/px/pfilt.c (file contents):
Revision 2.28 by schorsch, Fri Jan 2 12:47:01 2004 UTC vs.
Revision 2.29 by schorsch, Sun Mar 28 20:33:14 2004 UTC

# Line 15 | Line 15 | static const char RCSid[] = "$Id$";
15  
16   #include  "platform.h"
17   #include  "standard.h"
18 + #include  "rtio.h"
19   #include  "color.h"
20   #include  "view.h"
21   #include  "paths.h"
22 + #include  "pfilt.h"
23  
22 extern float  *matchlamp();
24  
25   #define  FEQ(a,b)       ((a) >= .98*(b) && (a) <= 1.02*(b))
26  
# Line 84 | Line 85 | int  orad = 0;                 /* output window radius */
85   char  *progname;
86  
87   static gethfunc headline;
88 + static double rgb_bright(COLOR  clr);
89 + static double xyz_bright(COLOR  clr);
90 + static void copyfile(FILE  *in, FILE  *out);
91 + static void pass1(FILE  *in);
92 + static void pass2(FILE  *in);
93 + static void scan2init(void);
94 + static void scan2sync(int  r);
95 + static void scan2flush(void);
96  
97  
98 < main(argc, argv)
99 < int  argc;
100 < char  **argv;
98 > int
99 > main(
100 >        int  argc,
101 >        char  **argv
102 > )
103   {
104          FILE  *fin;
105          float  *lampcolor;
# Line 307 | Line 318 | char  **argv;
318          pass2(fin);
319  
320          quit(estatus);
321 +        return estatus; /* pro forma return */
322   }
323  
324  
325 < double
326 < rgb_bright(clr)
327 < COLOR  clr;
325 > static double
326 > rgb_bright(
327 >        COLOR  clr
328 > )
329   {
330          return(bright(clr));
331   }
332  
333  
334 < double
335 < xyz_bright(clr)
336 < COLOR  clr;
334 > static double
335 > xyz_bright(
336 >        COLOR  clr
337 > )
338   {
339          return(clr[CIEY]);
340   }
# Line 356 | Line 370 | headline(                              /* process line from header */
370   }
371  
372  
373 < copyfile(in, out)                       /* copy a file */
374 < register FILE  *in, *out;
373 > static void
374 > copyfile(                       /* copy a file */
375 >        register FILE  *in,
376 >        register FILE  *out
377 > )
378   {
379          register int  c;
380  
# Line 371 | Line 388 | register FILE  *in, *out;
388   }
389  
390  
391 < pass1(in)                               /* first pass of picture file */
392 < FILE  *in;
391 > static void
392 > pass1(                          /* first pass of picture file */
393 >        FILE  *in
394 > )
395   {
396          int  i;
397          COLOR  *scan;
# Line 404 | Line 423 | FILE  *in;
423   }
424  
425  
426 < pass2(in)                       /* last pass on file, write to stdout */
427 < FILE  *in;
426 > static void
427 > pass2(                  /* last pass on file, write to stdout */
428 >        FILE  *in
429 > )
430   {
431          int  yread;
432          int  ycent, xcent;
# Line 455 | Line 476 | FILE  *in;
476   }
477  
478  
479 < scan2init()                     /* prepare scanline arrays */
479 > static void
480 > scan2init(void)                 /* prepare scanline arrays */
481   {
482          COLOR   ctmp;
483          double  d;
# Line 532 | Line 554 | memerr:
554   }
555  
556  
557 < scan2sync(r)                    /* synchronize grey averages and output scan */
558 < int  r;
557 > static void
558 > scan2sync(                      /* synchronize grey averages and output scan */
559 >        int  r
560 > )
561   {
562          static int  nextrow = 0;
563          COLOR  ctmp;
# Line 558 | Line 582 | int  r;
582   }
583  
584  
585 < scan2flush()                    /* flush output buffer */
585 > static void
586 > scan2flush(void)                        /* flush output buffer */
587   {
588          register int  r;
589  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines