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.24 by schorsch, Sun Jun 8 12:03:10 2003 UTC vs.
Revision 2.28 by schorsch, Fri Jan 2 12:47:01 2004 UTC

# Line 8 | Line 8 | static const char RCSid[] = "$Id$";
8   *     6/23/93  Added additional buffers for value spreading
9   */
10  
11 + #include  "copyright.h"
12 +
13   #include  <signal.h>
14 + #include  <string.h>
15  
13 #include  "standard.h"
16   #include  "platform.h"
17 + #include  "standard.h"
18   #include  "color.h"
19   #include  "view.h"
20   #include  "paths.h"
# Line 80 | Line 83 | int  orad = 0;                 /* output window radius */
83  
84   char  *progname;
85  
86 + static gethfunc headline;
87  
88 +
89   main(argc, argv)
90   int  argc;
91   char  **argv;
92   {
88        extern int  headline();
93          FILE  *fin;
94          float  *lampcolor;
95          char  *lamptype = NULL;
# Line 325 | Line 329 | COLOR  clr;
329   double  (*ourbright)() = rgb_bright;
330  
331  
332 < int
333 < headline(s)                             /* process line from header */
334 < char  *s;
332 > static int
333 > headline(                               /* process line from header */
334 >        char    *s,
335 >        void    *p
336 > )
337   {
338          char  fmt[32];
339  
# Line 487 | Line 493 | scan2init()                    /* prepare scanline arrays */
493          if (obarsize > 0) {
494                  scoutbar = (COLOR **)malloc(obarsize*sizeof(COLOR *));
495                  greybar = (float **)malloc(obarsize*sizeof(float *));
496 <                if (scoutbar == NULL | greybar == NULL)
496 >                if ((scoutbar == NULL) | (greybar == NULL))
497                          goto memerr;
498                  for (i = 0; i < obarsize; i++) {
499                          scoutbar[i] = (COLOR *)malloc(ncols*sizeof(COLOR));
500                          greybar[i] = (float *)malloc(ncols*sizeof(float));
501 <                        if (scoutbar[i] == NULL | greybar[i] == NULL)
501 >                        if ((scoutbar[i] == NULL) | (greybar[i] == NULL))
502                                  goto memerr;
503                  }
504          } else {
# Line 541 | Line 547 | int  r;
547                          greybar[nextrow%obarsize][c] = (*ourbright)(ctmp);
548                  }
549                                          /* and zero output scanline */
550 <                bzero((char *)scoutbar[nextrow%obarsize], ncols*sizeof(COLOR));
550 >                memset((char *)scoutbar[nextrow%obarsize], '\0', ncols*sizeof(COLOR));
551                  nextrow++;
552          }
553                                          /* point to top scanline for output */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines