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.20 by gwlarson, Tue Oct 27 09:08:26 1998 UTC vs.
Revision 2.23 by schorsch, Thu Jun 5 19:29:34 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1996 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   *  pfilt.c - program to post-process picture file.
6   *
# Line 11 | Line 8 | static char SCCSid[] = "$SunId$ LBL";
8   *     6/23/93  Added additional buffers for value spreading
9   */
10  
14 #include  "standard.h"
15
11   #include  <signal.h>
12  
13 + #include  "standard.h"
14   #include  "color.h"
19
15   #include  "view.h"
21
22 #include  "resolu.h"
23
16   #include  "paths.h"
17  
18   extern float  *matchlamp();
19  
20   #define  FEQ(a,b)       ((a) >= .98*(b) && (a) <= 1.02*(b))
21  
22 < double   CHECKRAD = 1.5;        /* radius to check for filtering */
22 > double   CHECKRAD = 2.0;        /* radius to check for filtering */
23  
24   #define  THRESHRAD      5.0     /* maximum sample spread in output */
25  
# Line 92 | Line 84 | main(argc, argv)
84   int  argc;
85   char  **argv;
86   {
87 <        extern long  ftell();
96 <        extern int  quit(), headline();
87 >        extern int  headline();
88          FILE  *fin;
89          float  *lampcolor;
90          char  *lamptype = NULL;
# Line 101 | Line 92 | char  **argv;
92          double  outaspect = 0.0;
93          double  d;
94          int  i, j;
95 < #ifdef MSDOS
96 <        extern int  _fmode;
97 <        _fmode = O_BINARY;
107 <        setmode(fileno(stdin), O_BINARY);
108 <        setmode(fileno(stdout), O_BINARY);
109 < #endif
95 >        SET_DEFAULT_BINARY();
96 >        SET_FILE_BINARY(stdin);
97 >        SET_FILE_BINARY(stdout);
98          if (signal(SIGINT, quit) == SIG_IGN)
99                  signal(SIGINT, SIG_IGN);
100          if (signal(SIGHUP, quit) == SIG_IGN)
# Line 205 | Line 193 | char  **argv;
193                          case 'm':
194                                  thresh = atof(argv[++i]);
195                                  if (rad <= FTINY)
196 <                                        rad = 1.0;
196 >                                        rad = 0.6;
197                                  break;
198                          case 'b':
199                                  rad = thresh = 0.0;
# Line 401 | Line 389 | FILE  *in;
389                  }
390                  pass1scan(scan, i);
391          }
392 <        free((char *)scan);
392 >        free((void *)scan);
393   }
394  
395  
# Line 573 | Line 561 | scan2flush()                   /* flush output buffer */
561   }
562  
563  
564 + void
565   quit(code)              /* remove temporary file and exit */
566   int  code;
567   {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines