ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/rtrace.c
(Generate patch)

Comparing ray/src/rt/rtrace.c (file contents):
Revision 2.11 by greg, Wed Jan 20 15:19:51 1993 UTC vs.
Revision 2.14 by greg, Tue May 4 13:26:52 1993 UTC

# Line 75 | Line 75 | static RAY  thisray;                   /* for our convenience */
75   static int  oputo(), oputd(), oputv(), oputl(), oputL(),
76                  oputp(), oputn(), oputN(), oputs(), oputw(), oputm();
77  
78 < static int  (*ray_out[10])(), (*every_out[10])();
79 < static int  castonly;
78 > static int  ourtrace(), tabin();
79 > static int  (*ray_out[16])(), (*every_out[16])();
80 > static int  castonly = 0;
81  
82   static int  puta(), putf(), putd();
83  
# Line 127 | Line 128 | char  *fname;
128                  setmode(fileno(fp), O_BINARY);
129   #endif
130                                          /* set up output */
131 <        setoutput(outvals);
131 >        if (imm_irrad)
132 >                outvals = "v";
133 >        else
134 >                setoutput(outvals);
135          switch (outform) {
136          case 'a': putreal = puta; break;
137          case 'f': putreal = putf; break;
# Line 139 | Line 143 | char  *fname;
143          default:
144                  error(CONSISTENCY, "botched output format");
145          }
146 <        if (hresolu > 0 && vresolu > 0)
147 <                fprtresolu(hresolu, vresolu, stdout);
146 >        if (hresolu > 0) {
147 >                if (vresolu > 0)
148 >                        fprtresolu(hresolu, vresolu, stdout);
149 >                fflush(stdout);
150 >        }
151                                          /* process file */
152          while (getvec(orig, inform, fp) == 0 &&
153                          getvec(direc, inform, fp) == 0) {
# Line 165 | Line 172 | char  *fname;
172                  if (--vcount == 0)                      /* check for end */
173                          break;
174          }
175 +        fflush(stdout);
176          if (vcount > 0)
177                  error(USER, "read error");
178 <        fclose(fp);
178 >        if (fname != NULL)
179 >                fclose(fp);
180   }
181  
182  
183   setoutput(vs)                           /* set up output tables */
184   register char  *vs;
185   {
186 <        extern int  ourtrace(), (*trace)();
186 >        extern int  (*trace)();
187          register int (**table)() = ray_out;
188  
189          castonly = 1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines