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

Comparing ray/src/util/rcode_depth.c (file contents):
Revision 2.10 by greg, Wed Feb 12 01:13:01 2020 UTC vs.
Revision 2.11 by greg, Mon Jul 20 15:53:30 2020 UTC

# Line 59 | Line 59 | encode_depths(DEPTHCODEC *dcp)
59                          return 0;
60                  }
61          }
62 +        if (dcp->format == 'a')
63 +                SET_FILE_TEXT(dcp->finp);
64  
65          do {
66                  int     ok = 0;
# Line 256 | Line 258 | pixel_points(DEPTHCODEC *dcp, int unbuf)
258          }
259          if (!check_decode_worldpos(dcp))
260                  return 0;
261 <        
261 >
262          while (scanf("%d %d", &xy[0], &xy[1]) == 2) {
263                  loc2pix(xy, &dcp->res,
264                          (xy[0]+.5)/dcp->res.xr, (xy[1]+.5)/dcp->res.yr);
# Line 416 | Line 418 | main(int argc, char *argv[])
418                  fputs(": cannot open for writing\n", stderr);
419                  return 1;
420          }
421 <        SET_FILE_BINARY(dc.finp);
422 <        if ((conversion != CV_FWD) | (dc.format != 'a'))
421 <                SET_FILE_BINARY(stdout);
421 >        SET_FILE_BINARY(dc.finp);       /* starting assumption */
422 >        SET_FILE_BINARY(stdout);
423   #ifdef getc_unlocked                    /* avoid stupid semaphores */
424          flockfile(dc.finp);
425          flockfile(stdout);
# Line 426 | Line 427 | main(int argc, char *argv[])
427                                          /* read/copy header */
428          if (!process_dc_header(&dc, a, argv))
429                  return 1;
430 +                
431 +        if ((conversion != CV_FWD) & (dc.format == 'a'))
432 +                SET_FILE_TEXT(stdout);
433                                          /* process data */
434          switch (conversion) {
435          case CV_FWD:                    /* distance -> depth code */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines