| 91 |
|
FILE *fp; |
| 92 |
|
int fd; |
| 93 |
|
int hflags = 0; |
| 94 |
< |
int4 nextloc; |
| 94 |
> |
long nextloc; |
| 95 |
|
int n; |
| 96 |
|
/* open holodeck file */ |
| 97 |
|
if ((fp = fopen(fname, append ? "r+" : "r")) == NULL) { |
| 109 |
|
nextloc = ftell(fp); /* get stdio position */ |
| 110 |
|
fclose(fp); /* done with stdio */ |
| 111 |
|
for (n = 0; nextloc > 0L; n++) { /* initialize each section */ |
| 112 |
< |
lseek(fd, (long)nextloc, 0); |
| 112 |
> |
lseek(fd, nextloc, 0); |
| 113 |
|
read(fd, (char *)&nextloc, sizeof(nextloc)); |
| 114 |
|
hdinit(fd, NULL)->priv = hflags&H_OBST ? &obstr : |
| 115 |
|
hflags&H_OBSF ? &unobstr : (char *)NULL; |