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.3 by greg, Tue Sep 8 15:33:08 1992 UTC vs.
Revision 2.4 by greg, Mon Sep 21 12:14:17 1992 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1991 Regents of the University of California */
1 > /* Copyright (c) 1992 Regents of the University of California */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ LBL";
# Line 12 | Line 12 | static char SCCSid[] = "$SunId$ LBL";
12  
13   #include  <stdio.h>
14  
15 + #ifdef MSDOS
16 + #include  <fcntl.h>
17 + #endif
18 +
19   #include  <signal.h>
20  
21   #include  "color.h"
# Line 23 | Line 27 | static char SCCSid[] = "$SunId$ LBL";
27   extern char  *malloc();
28   extern float  *matchlamp();
29  
30 < #define  FEQ(a,b)       ((a) >= .98*(b) && (a) <= 1.02*(b))
30 > #define  FEQ(a,b)       ((a) >= .98*(b) && (a) <= 1.02*(b))
31  
32 < #define  CHECKRAD       1.5     /* radius to check for filtering */
32 > #define  CHECKRAD       1.5     /* radius to check for filtering */
33  
34   COLOR  exposure = WHTCOLOR;     /* exposure for the frame */
35  
36 < double  rad = 0.0;              /* output pixel radius for filtering */
36 > double  rad = 0.0;              /* output pixel radius for filtering */
37  
38   int  nrows = 0;                 /* number of rows for output */
39   int  ncols = 0;                 /* number of columns for output */
40  
41 < double  x_c = 1.0;              /* ratio of output x size to input */
42 < double  y_r = 1.0;              /* ratio of output y size to input */
41 > double  x_c = 1.0;              /* ratio of output x size to input */
42 > double  y_r = 1.0;              /* ratio of output y size to input */
43  
44   int  singlepass = 0;            /* true means skip first pass */
45  
46   int  avghot = 0;                /* true means average in bright spots */
47  
48 < double  hotlvl = 1000.0;        /* level considered "hot" */
48 > double  hotlvl = 1000.0;        /* level considered "hot" */
49  
50   int  npts = 0;                  /* (half) number of points for stars */
51  
52 < double  spread = 1e-4;          /* spread for star points */
52 > double  spread = 1e-4;          /* spread for star points */
53  
54   char  *tfname = NULL;
55  
# Line 53 | Line 57 | char  *lampdat = "lamp.tab";   /* lamp data file */
57  
58   int  order;                     /* scanline ordering of input */
59   int  xres, yres;                /* resolution of input */
60 < double  inpaspect = 1.0;        /* pixel aspect ratio of input */
60 > double  inpaspect = 1.0;        /* pixel aspect ratio of input */
61   int  correctaspect = 0;         /* aspect ratio correction? */
62  
63   int  wrongformat = 0;
# Line 79 | Line 83 | char  **argv;
83          float  *lampcolor;
84          char  *lamptype = NULL;
85          long  fpos;
86 <        double  outaspect = 0.0;
87 <        double  d;
86 >        double  outaspect = 0.0;
87 >        double  d;
88          int  i, j;
89 <
89 > #ifdef MSDOS
90 >        extern int  _fmode;
91 >        _fmode = O_BINARY;
92 >        setmode(fileno(stdin), O_BINARY);
93 >        setmode(fileno(stdout), O_BINARY);
94 > #endif
95          if (signal(SIGINT, quit) == SIG_IGN)
96                  signal(SIGINT, SIG_IGN);
97          if (signal(SIGHUP, quit) == SIG_IGN)
98                  signal(SIGINT, SIG_IGN);
99          signal(SIGTERM, quit);
100          signal(SIGPIPE, quit);
101 < #ifdef  SIGXCPU
101 > #ifdef  SIGXCPU
102          signal(SIGXCPU, quit);
103          signal(SIGXFSZ, quit);
104   #endif
# Line 349 | Line 358 | FILE  *in;
358          int  yread;
359          int  ycent, xcent;
360          int  r, c;
361 <        
361 >        
362          pass2init();
363          scan2init();
364          yread = 0;
# Line 392 | Line 401 | FILE  *in;
401   scan2init()                     /* prepare scanline arrays */
402   {
403          COLOR   ctmp;
404 <        double  d;
404 >        double  d;
405          register int  i;
406  
407          if (rad <= 0.0) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines