5 |
|
* Get general information on holodeck file |
6 |
|
*/ |
7 |
|
|
8 |
+ |
#include <stdio.h> |
9 |
+ |
|
10 |
|
#include "platform.h" |
11 |
+ |
#include "resolu.h" |
12 |
|
#include "holo.h" |
13 |
|
|
14 |
|
#ifndef NHBINS |
19 |
|
|
20 |
|
long beamtot, samptot; /* total beams and samples */ |
21 |
|
|
22 |
+ |
static void gethdinfo(char *fname, FILE *fout); |
23 |
+ |
static void psectstats(HOLO *hp, FILE *fp); |
24 |
|
|
20 |
– |
main(argc, argv) |
21 |
– |
int argc; |
22 |
– |
char *argv[]; |
23 |
– |
{ |
24 |
– |
int sect; |
25 |
|
|
26 |
+ |
int |
27 |
+ |
main( |
28 |
+ |
int argc, |
29 |
+ |
char *argv[] |
30 |
+ |
) |
31 |
+ |
{ |
32 |
|
progname = argv[0]; |
33 |
|
if (argc != 2) |
34 |
|
goto userr; |
40 |
|
} |
41 |
|
|
42 |
|
|
43 |
< |
gethdinfo(fname, fout) /* get information on holodeck */ |
44 |
< |
char *fname; |
45 |
< |
FILE *fout; |
43 |
> |
static void |
44 |
> |
gethdinfo( /* get information on holodeck */ |
45 |
> |
char *fname, |
46 |
> |
FILE *fout |
47 |
> |
) |
48 |
|
{ |
49 |
|
FILE *fp; |
50 |
|
HOLO *hdsect; |
77 |
|
samptot, beamtot, (double)samptot/beamtot); |
78 |
|
fprintf(fout, "%.1f Mbyte file, %.1f%% fragmentation\n", |
79 |
|
nextloc/(1024.*1024.), |
80 |
< |
100.*(nextloc-hdfiluse(fd,1))/nextloc); |
80 |
> |
100.*(nextloc-hdfiluse(fd))/nextloc); |
81 |
|
/* don't bother with cleanup */ |
82 |
|
#if 0 |
83 |
|
hddone(NULL); /* free sections */ |
86 |
|
} |
87 |
|
|
88 |
|
|
89 |
< |
psectstats(hp, fp) /* print statistical information for section */ |
90 |
< |
register HOLO *hp; |
91 |
< |
FILE *fp; |
89 |
> |
static void |
90 |
> |
psectstats( /* print statistical information for section */ |
91 |
> |
register HOLO *hp, |
92 |
> |
FILE *fp |
93 |
> |
) |
94 |
|
{ |
95 |
|
int scount[NHBINS]; |
96 |
|
int minsamp = 10000, maxsamp = 0; |