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.16 by greg, Tue Oct 6 12:30:07 1992 UTC vs.
Revision 2.17 by greg, Thu Oct 15 21:13:17 1992 UTC

# Line 155 | 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 241 | 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 332 | 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 589 | 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