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

Comparing ray/src/hd/holofile.c (file contents):
Revision 3.35 by gwlarson, Mon Jan 25 09:58:41 1999 UTC vs.
Revision 3.36 by gwlarson, Mon Feb 1 09:56:18 1999 UTC

# Line 671 | Line 671 | register int   i;
671          if (hdfragl[hp->fd].writerr)    /* check for file error */
672                  return(0);
673          if (i == 0) {                   /* clear entire holodeck */
674 +                if (blglob(hp)->nrm == 0)
675 +                        return(0);              /* already clear */
676                  nchanged = 0;
677                  for (i = nbeams(hp); i > 0; i--)
678                          if (hp->bl[i] != NULL)
679                                  nchanged += hdfreebeam(hp, i);
680 +                DCHECK(blglob(hp)->nrm != 0,
681 +                                CONSISTENCY, "bad beam count in hdfreebeam");
682                  return(nchanged);
683          }
684          DCHECK(i < 1 | i > nbeams(hp),
# Line 706 | Line 710 | register int   i;
710                  return(nchanged);
711          }
712          if (i == 0) {                   /* clobber entire holodeck */
713 +                if (biglob(hp)->nrd == 0 & blglob(hp)->nrm == 0)
714 +                        return(0);              /* already empty */
715 +                nchanged = 0;
716                  nchanged = 0;
717                  for (i = nbeams(hp); i > 0; i--)
718                          if (hp->bi[i].nrd > 0 || hp->bl[i] != NULL)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines