--- ray/src/hd/genrhenv.c 2003/02/22 02:07:24 3.3 +++ ray/src/hd/genrhenv.c 2003/10/20 16:01:55 3.6 @@ -1,11 +1,12 @@ #ifndef lint -static const char RCSid[] = "$Id: genrhenv.c,v 3.3 2003/02/22 02:07:24 greg Exp $"; +static const char RCSid[] = "$Id: genrhenv.c,v 3.6 2003/10/20 16:01:55 greg Exp $"; #endif /* * Create a closed environment from a holodeck section */ #include "holo.h" +#include "platform.h" #define ourhp (hdlist[0]) @@ -55,10 +56,9 @@ openholo(fname, sect) /* open holodeck section for in char *fname; int sect; { - extern long ftell(); FILE *fp; int fd; - int4 nextloc; + int32 nextloc; int n; /* open holodeck file */ if ((fp = fopen(fname, "r")) == NULL) { @@ -74,7 +74,7 @@ int sect; nextloc = ftell(fp); /* get stdio position */ fclose(fp); /* done with stdio */ for (n = 0; nextloc > 0L; n++) { /* get the indicated section */ - lseek(fd, (off_t)nextloc, 0); + lseek(fd, (off_t)nextloc, SEEK_SET); read(fd, (char *)&nextloc, sizeof(nextloc)); if (n == sect) { hdinit(fd, NULL);