| 6 |
|
*/ |
| 7 |
|
|
| 8 |
|
#include "holo.h" |
| 9 |
+ |
#include "platform.h" |
| 10 |
|
|
| 11 |
|
#ifndef NHBINS |
| 12 |
|
#define NHBINS 12 /* number of histogram bins to use for stats */ |
| 38 |
|
char *fname; |
| 39 |
|
FILE *fout; |
| 40 |
|
{ |
| 40 |
– |
extern long ftell(); |
| 41 |
|
FILE *fp; |
| 42 |
|
HOLO *hdsect; |
| 43 |
|
int fd; |
| 44 |
< |
int4 nextloc; |
| 44 |
> |
int32 nextloc; |
| 45 |
|
int n; |
| 46 |
|
/* open holodeck file */ |
| 47 |
|
if ((fp = fopen(fname, "r")) == NULL) { |
| 57 |
|
nextloc = ftell(fp); /* get stdio position */ |
| 58 |
|
fclose(fp); /* done with stdio */ |
| 59 |
|
for (n = 0; nextloc > 0L; n++) { /* get the section(s) */ |
| 60 |
< |
lseek(fd, (off_t)nextloc, 0); |
| 60 |
> |
lseek(fd, (off_t)nextloc, SEEK_SET); |
| 61 |
|
read(fd, (char *)&nextloc, sizeof(nextloc)); |
| 62 |
|
fprintf(fout, "Section %d:\n", n); |
| 63 |
|
hdsect = hdinit(fd, NULL); /* load section directory */ |