--- ray/src/hd/rhoptimize.c 2003/07/27 22:12:02 3.15 +++ ray/src/hd/rhoptimize.c 2003/10/22 02:06:34 3.17 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rhoptimize.c,v 3.15 2003/07/27 22:12:02 schorsch Exp $"; +static const char RCSid[] = "$Id: rhoptimize.c,v 3.17 2003/10/22 02:06:34 greg Exp $"; #endif /* * Optimize holodeck for quick access. @@ -10,6 +10,7 @@ static const char RCSid[] = "$Id: rhoptimize.c,v 3.15 #include #include +#include "platform.h" #include "rtprocess.h" /* getpid() */ #include "holo.h" @@ -65,14 +66,14 @@ char *argv[]; lastopos = 0L; /* copy sections one by one */ while (nextipos != 0L) { /* set input position; get next */ - lseek(hdfd[0], (off_t)nextipos, 0); + lseek(hdfd[0], (off_t)nextipos, SEEK_SET); read(hdfd[0], (char *)&nextipos, sizeof(nextipos)); /* get output position; set last */ - thisopos = lseek(hdfd[1], (off_t)0, 2); + thisopos = lseek(hdfd[1], (off_t)0, SEEK_END); if (lastopos > 0L) { - lseek(hdfd[1], (off_t)lastopos, 0); + lseek(hdfd[1], (off_t)lastopos, SEEK_SET); write(hdfd[1], (char *)&thisopos, sizeof(thisopos)); - lseek(hdfd[1], (off_t)0, 2); + lseek(hdfd[1], (off_t)0, SEEK_END); } lastopos = thisopos; thisopos = 0L; /* write place holder */