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 1.4 by greg, Tue Apr 11 21:50:05 1989 UTC vs.
Revision 1.7 by greg, Wed Sep 13 17:16:37 1989 UTC

# Line 88 | Line 88 | char  **argv;
88                          switch (argv[i][1]) {
89                          case 'x':
90                                  i++;
91 <                                if (argv[i][0] == '/')
91 >                                if (argv[i][0] == '/') {
92                                          x_c = 1.0/atof(argv[i]+1);
93 <                                else
93 >                                        ncols = 0;
94 >                                } else
95                                          ncols = atoi(argv[i]);
96                                  break;
97                          case 'y':
98                                  i++;
99 <                                if (argv[i][0] == '/')
99 >                                if (argv[i][0] == '/') {
100                                          y_r = 1.0/atof(argv[i]+1);
101 <                                else
101 >                                        nrows = 0;
102 >                                } else
103                                          nrows = atoi(argv[i]);
104                                  break;
105                          case 'e':
# Line 126 | Line 128 | char  **argv;
128                          case '1':
129                                  singlepass = 1;
130                                  break;
131 +                        case '2':
132 +                                singlepass = 0;
133 +                                break;
134                          case 'p':
135                                  npts = atoi(argv[++i]) / 2;
136                                  break;
# Line 185 | Line 190 | char  **argv;
190                                          /* add new header info. */
191          printargs(i, argv, stdout);
192                                          /* get picture size */
193 <        if (fscanf(fin, "-Y %d +X %d\n", &yres, &xres) != 2) {
193 >        if (fgetresolu(&xres, &yres, fin) != (YMAJOR|YDECR)) {
194                  fprintf(stderr, "%s: bad picture size\n", progname);
195                  quit(1);
196          }
# Line 340 | Line 345 | scan2init()                    /* prepare scanline arrays */
345          if (e < 1-1e-7 || e > 1+1e-7)           /* record exposure */
346                  printf("EXPOSURE=%e\n", e);
347          printf("\n");
348 <        printf("-Y %d +X %d\n", nrows, ncols);  /* write picture size */
348 >        fputresolu(YMAJOR|YDECR, ncols, nrows, stdout); /* resolution */
349   }
350  
351  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines