50 |
|
HOLO *hdsect; |
51 |
|
int fd; |
52 |
|
int32 nextloc; |
53 |
+ |
off_t fsiz; |
54 |
|
int n; |
55 |
|
/* open holodeck file */ |
56 |
|
if ((fp = fopen(fname, "r")) == NULL) { |
72 |
|
hdsect = hdinit(fd, NULL); /* load section directory */ |
73 |
|
psectstats(hdsect, fout); /* print section statistics */ |
74 |
|
} |
75 |
< |
nextloc = hdfilen(fd); /* print global statistics */ |
75 |
> |
fsiz = hdfilen(fd); /* print global statistics */ |
76 |
|
fputs("=====================================================\n", fout); |
77 |
|
fprintf(fout, "Total samples/beams: %ld/%ld (%.2f samples/beam)\n", |
78 |
|
samptot, beamtot, (double)samptot/beamtot); |
79 |
|
fprintf(fout, "%.1f Mbyte file, %.1f%% fragmentation\n", |
80 |
< |
nextloc/(1024.*1024.), |
81 |
< |
100.*(nextloc-hdfiluse(fd,1))/nextloc); |
80 |
> |
fsiz/(1024.*1024.), |
81 |
> |
100.*(fsiz-hdfiluse(fd))/fsiz); |
82 |
|
/* don't bother with cleanup */ |
83 |
|
#if 0 |
84 |
|
hddone(NULL); /* free sections */ |