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

Comparing ray/src/px/psum.c (file contents):
Revision 2.2 by greg, Thu Dec 19 14:52:02 1991 UTC vs.
Revision 2.6 by schorsch, Mon Oct 27 10:22:27 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1986 Regents of the University of California */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   *  psum.c - program to sum pictures.
6   *
# Line 11 | Line 8 | static char SCCSid[] = "$SunId$ LBL";
8   */
9  
10   #include  <stdio.h>
11 + #include  <math.h>
12  
13   #include  "color.h"
14 + #include  "resolu.h"
15 + #include  "rterror.h"
16  
17  
18   #define  MAXFILE        8
# Line 27 | Line 27 | COLOR  scale[MAXFILE];                 /* scaling factors */
27   int  nfile;                             /* number of files */
28  
29  
30 + int
31   tabputs(s)                      /* print line preceded by a tab */
32   char  *s;
33   {
34          putc('\t', stdout);
35 <        fputs(s, stdout);
35 >        return(fputs(s, stdout));
36   }
37  
38  
# Line 94 | Line 95 | char  *argv[];
95                                                  /* get header */
96                  fputs(fname[nfile], stdout);
97                  fputs(":\n", stdout);
98 <                getheader(fptr[nfile], tabputs);
98 >                getheader(fptr[nfile], tabputs, NULL);
99                                                  /* get picture size */
100                  if (fgetresolu(&xres, &yres, fptr[nfile]) != (YMAJOR|YDECR)) {
101                          fprintf(stderr, "%s: bad picture size\n", progname);
# Line 152 | Line 153 | psum()                         /* sum the files */
153                          quit(1);
154                  }
155          }
156 <        free((char *)scanin);
157 <        free((char *)scanout);
156 >        free((void *)scanin);
157 >        free((void *)scanout);
158   }
159  
160  
161 + void
162   quit(code)              /* exit gracefully */
163   int  code;
164   {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines