--- ray/src/hd/holofile.c 2004/09/09 01:06:19 3.56 +++ ray/src/hd/holofile.c 2004/09/09 01:41:21 3.57 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: holofile.c,v 3.56 2004/09/09 01:06:19 greg Exp $"; +static const char RCSid[] = "$Id: holofile.c,v 3.57 2004/09/09 01:41:21 greg Exp $"; #endif /* * Routines for managing holodeck files @@ -407,21 +407,22 @@ hdfiluse( /* compute file usage (in bytes) */ ) { off_t total = 0; - register int i, j; + register int j; for (j = 0; hdlist[j] != NULL; j++) { if (hdlist[j]->fd != fd) continue; total += biglob(hdlist[j])->nrd * sizeof(RAYVAL); - i = nbeams(hdlist[j]); - total += i*sizeof(BEAMI) + sizeof(HDGRID); - for ( ; i > 0; i--) + total += nbeams(hdlist[j])*sizeof(BEAMI) + sizeof(HDGRID); +#if 0 + for (i = nbeams(hdlist[j]); i > 0; i--) if (hdlist[j]->bl[i] != NULL) total += sizeof(RAYVAL) * (hdlist[j]->bl[i]->nrm - hdlist[j]->bi[i].nrd); +#endif } - return(total); /* does not include fragments */ + return(total); /* doesn't include fragments, unflushed rays */ }