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 1.1 by greg, Thu Feb 2 10:49:30 1989 UTC vs.
Revision 2.4 by gwlarson, Tue Oct 27 09:08:26 1998 UTC

# Line 12 | Line 12 | static char SCCSid[] = "$SunId$ LBL";
12  
13   #include  <stdio.h>
14  
15 + #include  <math.h>
16 +
17   #include  "color.h"
18  
19  
# Line 27 | Line 29 | COLOR  scale[MAXFILE];                 /* scaling factors */
29   int  nfile;                             /* number of files */
30  
31  
32 + int
33   tabputs(s)                      /* print line preceded by a tab */
34   char  *s;
35   {
36          putc('\t', stdout);
37 <        fputs(s, stdout);
37 >        return(fputs(s, stdout));
38   }
39  
40  
# Line 39 | Line 42 | main(argc, argv)
42   int  argc;
43   char  *argv[];
44   {
45 <        double  d, atof();
45 >        double  d;
46          int  xres, yres;
47          int  an;
48  
# Line 96 | Line 99 | char  *argv[];
99                  fputs(":\n", stdout);
100                  getheader(fptr[nfile], tabputs);
101                                                  /* get picture size */
102 <                if (fscanf(fptr[nfile], "-Y %d +X %d\n", &yres, &xres) != 2) {
102 >                if (fgetresolu(&xres, &yres, fptr[nfile]) != (YMAJOR|YDECR)) {
103                          fprintf(stderr, "%s: bad picture size\n", progname);
104                          quit(1);
105                  } else if (nfile == 0) {
# Line 112 | Line 115 | char  *argv[];
115          }
116                                          /* add new header info. */
117          printargs(argc, argv, stdout);
118 <        printf("\n-Y %d +X %d\n", ysiz, xsiz);
118 >        putchar('\n');
119 >        fputresolu(YMAJOR|YDECR, xsiz, ysiz, stdout);
120  
121          psum();
122          

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines