--- ray/src/hd/genrhenv.c 1998/01/06 21:48:18 3.2 +++ ray/src/hd/genrhenv.c 2003/10/20 16:01:55 3.6 @@ -1,14 +1,12 @@ -/* Copyright (c) 1998 Silicon Graphics, Inc. */ - #ifndef lint -static char SCCSid[] = "$SunId$ SGI"; +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]) @@ -58,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) { @@ -77,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, (long)nextloc, 0); + lseek(fd, (off_t)nextloc, SEEK_SET); read(fd, (char *)&nextloc, sizeof(nextloc)); if (n == sect) { hdinit(fd, NULL); @@ -324,6 +321,7 @@ int sect; } +void eputs(s) /* put error message to stderr */ register char *s; {