134 |
|
FILE *fp; |
135 |
|
int fd; |
136 |
|
int hflags = 0; |
137 |
< |
long nextloc; |
137 |
> |
off_t nextloc; |
138 |
|
int n; |
139 |
|
/* open holodeck file */ |
140 |
|
if ((fp = fopen(fname, append ? "r+" : "r")) == NULL) { |
152 |
|
nextloc = ftell(fp); /* get stdio position */ |
153 |
|
fclose(fp); /* done with stdio */ |
154 |
|
for (n = 0; nextloc > 0L; n++) { /* initialize each section */ |
155 |
< |
lseek(fd, (off_t)nextloc, SEEK_SET); |
155 |
> |
lseek(fd, nextloc, SEEK_SET); |
156 |
|
read(fd, (char *)&nextloc, sizeof(nextloc)); |
157 |
|
hdinit(fd, NULL)->priv = hflags&H_OBST ? &obstr : |
158 |
|
hflags&H_OBSF ? &unobstr : (char *)NULL; |