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

Comparing ray/src/rt/RpictSimulManager.cpp (file contents):
Revision 2.6 by greg, Wed Aug 21 23:52:24 2024 UTC vs.
Revision 2.7 by greg, Thu Aug 22 00:44:02 2024 UTC

# Line 1005 | Line 1005 | RpictSimulManager::ReopenOutput(FILE *pdfp[2], const c
1005          SET_FILE_BINARY(pdfp[1]);
1006          int     n, len = strlen(HDRSTR);
1007          char    buf[32];                // sniff for 16-bit header
1008 <        if (read(fileno(pdfp[1]), buf, len+1) < len+1) {
1008 >        if (getbinary(buf, 1, len+1, pdfp[1]) < len+1) {
1009                  sprintf(errmsg, "empty depth file '%s'", dfname);
1010                  error(SYSTEM, errmsg);
1011                  fclose(pdfp[0]); fclose(pdfp[1]);
# Line 1015 | Line 1015 | RpictSimulManager::ReopenOutput(FILE *pdfp[2], const c
1015          for (n = 0; n < len; n++)
1016                  if (buf[n] != HDRSTR[n])
1017                          break;          // not a Radiance header
1018 <        lseek(fileno(pdfp[1]), 0, SEEK_SET);
1018 >        rewind(pdfp[1]);
1019          if ((n < len) | !isprint(buf[len]))
1020                  return RDTnewDT(dt, RDTdfloat);
1021  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines