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.55 by schorsch, Thu Jan 1 11:21:55 2004 UTC vs.
Revision 3.56 by greg, Thu Sep 9 01:06:19 2004 UTC

# Line 403 | Line 403 | hdfilen(               /* return file length for fd */
403  
404   extern off_t
405   hdfiluse(       /* compute file usage (in bytes) */
406 <        int     fd,                     /* open file descriptor to check */
407 <        int     all                     /* include overhead and unflushed data */
406 >        int     fd                      /* open file descriptor to check */
407   )
408   {
409          off_t   total = 0;
# Line 414 | Line 413 | hdfiluse(      /* compute file usage (in bytes) */
413                  if (hdlist[j]->fd != fd)
414                          continue;
415                  total += biglob(hdlist[j])->nrd * sizeof(RAYVAL);
416 <                if (all) {
417 <                        for (i = nbeams(hdlist[j]); i > 0; i--)
418 <                                if (hdlist[j]->bl[i] != NULL)
419 <                                        total += sizeof(RAYVAL) *
416 >                i = nbeams(hdlist[j]);
417 >                total += i*sizeof(BEAMI) + sizeof(HDGRID);
418 >                for ( ; i > 0; i--)
419 >                        if (hdlist[j]->bl[i] != NULL)
420 >                                total += sizeof(RAYVAL) *
421                                                  (hdlist[j]->bl[i]->nrm -
422                                                  hdlist[j]->bi[i].nrd);
423                        total += sizeof(HDGRID) +
424                                        nbeams(hdlist[j])*sizeof(BEAMI);
425                }
423          }
424          return(total);          /* does not include fragments */
425   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines