--- ray/src/hd/holofile.c 2004/01/01 11:21:55 3.55 +++ 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.55 2004/01/01 11:21:55 schorsch 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 @@ -403,28 +403,26 @@ hdfilen( /* return file length for fd */ extern off_t hdfiluse( /* compute file usage (in bytes) */ - int fd, /* open file descriptor to check */ - int all /* include overhead and unflushed data */ + int fd /* open file descriptor to check */ ) { 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); - if (all) { - for (i = nbeams(hdlist[j]); i > 0; i--) - if (hdlist[j]->bl[i] != NULL) - total += sizeof(RAYVAL) * + 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); - total += sizeof(HDGRID) + - nbeams(hdlist[j])*sizeof(BEAMI); - } +#endif } - return(total); /* does not include fragments */ + return(total); /* doesn't include fragments, unflushed rays */ }