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.8 by greg, Fri Jun 18 16:20:16 1993 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 45 | Line 40 | int  singlepass = 0;           /* true means skip first pass */
40  
41   int  avghot = 0;                /* true means average in bright spots */
42  
43 < double  hotlvl = 1000.0;        /* level considered "hot" */
43 > double  hotlvl = 100.0;         /* level considered "hot" */
44  
45   int  npts = 0;                  /* (half) number of points for stars */
46  
# 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 298 | Line 292 | char  *s;
292          fputs(s, stdout);               /* copy to output */
293          if (isaspect(s))                /* get aspect ratio */
294                  inpaspect *= aspectval(s);
295 +        else if (isexpos(s))
296 +                hotlvl *= exposval(s);
297          else if (isformat(s)) {
298                  formatval(fmt, s);
299                  wrongformat = strcmp(fmt, COLRFMT);
# Line 335 | Line 331 | FILE  *in;
331          }
332          for (i = 0; i < yres; i++) {
333                  if (freadscan(scan, xres, in) < 0) {
334 <                        nrows = nrows * i / yres;       /* adjust frame */
334 >                        nrows = (long)nrows * i / yres; /* adjust frame */
335                          if (nrows <= 0) {
336                                  fprintf(stderr, "%s: empty frame\n", progname);
337                                  quit(1);
338                          }
339                          fprintf(stderr, "%s: warning - partial frame (%d%%)\n",
340 <                                        progname, 100*i/yres);
340 >                                        progname, (int)(100L*i/yres));
341                          yres = i;
342                          y_r = (double)nrows/yres;
343                          break;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines