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.41 by greg, Fri Dec 8 18:49:20 1995 UTC vs.
Revision 2.42 by greg, Tue Jan 23 16:27:31 1996 UTC

# Line 398 | Line 398 | char  *zfile, *oldfile;
398          fprtresolu(hres, vres, stdout);
399                                          /* recover file and compute first */
400          i = salvage(oldfile);
401 +        if (i >= vres)
402 +                goto alldone;
403          if (zfd != -1 && i > 0 &&
404                          lseek(zfd, (long)i*hres*sizeof(float), 0) == -1)
405                  error(SYSTEM, "z-file seek error in render");
# Line 453 | Line 455 | char  *zfile, *oldfile;
455          }
456                                                  /* clean up */
457          signal(SIGCONT, SIG_IGN);
458 <        if (zfd != -1) {
457 <                if (write(zfd, (char *)zbar[0], hres*sizeof(float))
458 >        if (zfd != -1 && write(zfd, (char *)zbar[0], hres*sizeof(float))
459                                  < hres*sizeof(float))
460 <                        goto writerr;
460 >                goto writerr;
461 >        fwritescan(scanbar[0], hres, stdout);
462 >        if (fflush(stdout) == EOF)
463 >                goto writerr;
464 > alldone:
465 >        if (zfd != -1) {
466                  if (close(zfd) == -1)
467                          goto writerr;
468                  for (i = 0; i <= psample; i++)
469                          free((char *)zbar[i]);
470          }
465        fwritescan(scanbar[0], hres, stdout);
466        if (fflush(stdout) == EOF)
467                goto writerr;
471          for (i = 0; i <= psample; i++)
472                  free((char *)scanbar[i]);
473          if (sampdens != NULL)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines