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.57 by greg, Sat Dec 12 19:01:00 2009 UTC vs.
Revision 2.58 by greg, Sat Dec 12 23:08:13 2009 UTC

# Line 82 | Line 82 | quit(                  /* quit program */
82          if (ray_pnprocs > 0)    /* close children if any */
83                  ray_pclose(0);          
84   #ifndef  NON_POSIX
85 <        headclean();            /* delete header file */
86 <        pfclean();              /* clean up persist files */
85 >        else if (!ray_pnprocs) {
86 >                headclean();    /* delete header file */
87 >                pfclean();      /* clean up persist files */
88 >        }
89   #endif
90          exit(code);
91   }
# Line 137 | Line 139 | rtrace(                                /* trace rays from file */
139          default:
140                  error(CONSISTENCY, "botched output format");
141          }
142 <        ray_fifo_out = printvals;
142 >        if (ray_pnprocs > 1)
143 >                ray_fifo_out = printvals;
144          if (hresolu > 0) {
145                  if (vresolu > 0)
146                          fprtresolu(hresolu, vresolu, stdout);
# Line 299 | Line 302 | rad(           /* compute and print ray value(s) */
302          VCOPY(thisray.rorg, org);
303          VCOPY(thisray.rdir, dir);
304          thisray.rmax = dmax;
305 <        if (ray_pnprocs > 1) {
305 >        if (!castonly && ray_pnprocs > 1) {
306                  if (ray_fifo_in(&thisray) < 0)
307                          error(USER, "lost children");
308                  return;
# Line 383 | Line 386 | getvec(                /* get a vector from fp */
386          case 'f':                                       /* binary float */
387                  if (fread((char *)vf, sizeof(float), 3, fp) != 3)
388                          return(-1);
389 <                vec[0] = vf[0]; vec[1] = vf[1]; vec[2] = vf[2];
389 >                VCOPY(vec, vf);
390                  break;
391          case 'd':                                       /* binary double */
392                  if (fread((char *)vd, sizeof(double), 3, fp) != 3)
393                          return(-1);
394 <                vec[0] = vd[0]; vec[1] = vd[1]; vec[2] = vd[2];
394 >                VCOPY(vec, vd);
395                  break;
396          default:
397                  error(CONSISTENCY, "botched input format");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines