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

Comparing ray/src/rt/rpict.c (file contents):
Revision 2.15 by greg, Fri Oct 2 16:19:10 1992 UTC vs.
Revision 2.17 by greg, Thu Oct 15 21:13:17 1992 UTC

# Line 63 | Line 63 | int  ambounce = 0;                     /* ambient bounces */
63   char  *amblist[128];                    /* ambient include/exclude list */
64   int  ambincl = -1;                      /* include == 1, exclude == 0 */
65  
66 + #ifdef MSDOS
67 + int  ralrm = 60;                        /* seconds between reports */
68 + #else
69   int  ralrm = 0;                         /* seconds between reports */
70 + #endif
71  
72   double  pctdone = 0.0;                  /* percentage done */
73  
# Line 151 | Line 155 | closeheader()                  /* done with header output */
155                  return;
156          if (fflush(stdout) == EOF || (hfp = fopen(hfname, "r")) == NULL)
157                  error(SYSTEM, "error reopening header file");
158 + #ifdef MSDOS
159 +        setmode(fileno(hfp), O_BINARY);
160 + #endif
161   }
162  
163  
# Line 237 | Line 244 | char  *pout, *zout, *prvr;
244                                          "cannot open output file \"%s\"", fbuf);
245                                  error(SYSTEM, errmsg);
246                          }
247 + #ifdef MSDOS
248 +                        setmode(fileno(stdout), O_BINARY);
249 + #endif
250                          dupheader();
251                  }
252                  hres = hresolu; vres = vresolu; pa = pixaspect;
# Line 328 | Line 338 | char  *zfile, *oldfile;
338                          sprintf(errmsg, "cannot open z file \"%s\"", zfile);
339                          error(SYSTEM, errmsg);
340                  }
341 + #ifdef MSDOS
342 +                setmode(zfd, O_BINARY);
343 + #endif
344                  for (i = 0; i <= psample; i++) {
345                          zbar[i] = (float *)malloc(hres*sizeof(float));
346                          if (zbar[i] == NULL)
# Line 585 | Line 598 | char  *oldfile;
598                  error(WARNING, errmsg);
599                  return(0);
600          }
601 + #ifdef MSDOS
602 +        setmode(fileno(fp), O_BINARY);
603 + #endif
604                                  /* discard header */
605          getheader(fp, NULL);
606                                  /* get picture size */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines