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.4 by greg, Mon Sep 21 12:14:17 1992 UTC vs.
Revision 2.7 by greg, Thu Nov 12 09:05:17 1992 UTC

# Line 10 | Line 10 | static char SCCSid[] = "$SunId$ LBL";
10   *     9/26/85
11   */
12  
13 < #include  <stdio.h>
13 > #include  "standard.h"
14  
15 #ifdef MSDOS
16 #include  <fcntl.h>
17 #endif
18
15   #include  <signal.h>
16  
17   #include  "color.h"
# Line 24 | Line 20 | static char SCCSid[] = "$SunId$ LBL";
20  
21   #include  "paths.h"
22  
27 extern char  *malloc();
23   extern float  *matchlamp();
24  
25   #define  FEQ(a,b)       ((a) >= .98*(b) && (a) <= 1.02*(b))
# Line 76 | Line 71 | main(argc, argv)
71   int  argc;
72   char  **argv;
73   {
79        extern double  pow();
74          extern long  ftell();
75          extern int  quit(), headline();
76          FILE  *fin;
# Line 103 | Line 97 | char  **argv;
97          signal(SIGXFSZ, quit);
98   #endif
99  
100 <        progname = argv[0];
100 >        progname = argv[0] = fixargv0(argv[0]);
101  
102          for (i = 1; i < argc; i++)
103                  if (argv[i][0] == '-')
# Line 335 | Line 329 | FILE  *in;
329          }
330          for (i = 0; i < yres; i++) {
331                  if (freadscan(scan, xres, in) < 0) {
332 <                        nrows = nrows * i / yres;       /* adjust frame */
332 >                        nrows = (long)nrows * i / yres; /* adjust frame */
333                          if (nrows <= 0) {
334                                  fprintf(stderr, "%s: empty frame\n", progname);
335                                  quit(1);
336                          }
337                          fprintf(stderr, "%s: warning - partial frame (%d%%)\n",
338 <                                        progname, 100*i/yres);
338 >                                        progname, (int)(100L*i/yres));
339                          yres = i;
340                          y_r = (double)nrows/yres;
341                          break;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines