--- ray/src/hd/genrhgrid.c 2003/05/29 16:26:21 3.3 +++ ray/src/hd/genrhgrid.c 2003/10/20 16:01:55 3.6 @@ -1,11 +1,12 @@ #ifndef lint -static const char RCSid[] = "$Id: genrhgrid.c,v 3.3 2003/05/29 16:26:21 greg Exp $"; +static const char RCSid[] = "$Id: genrhgrid.c,v 3.6 2003/10/20 16:01:55 greg Exp $"; #endif /* * Generate renderable grids from a holodeck file */ #include "holo.h" +#include "platform.h" char *progname; /* global argv[0] */ @@ -20,7 +21,7 @@ char *argv[]; int sect; progname = argv[0]; - if (argc < 5 | argc > 6) + if ((argc < 5) | (argc > 6)) goto userr; mat = argv[1]; name = argv[2]; @@ -44,7 +45,7 @@ int sect; FILE *fp; HOLO hdsect; int fd; - int4 nextloc; + int32 nextloc; int n; /* open holodeck file */ if ((fp = fopen(fname, "r")) == NULL) { @@ -60,9 +61,9 @@ int sect; nextloc = ftell(fp); /* get stdio position */ fclose(fp); /* done with stdio */ for (n = 0; nextloc > 0L; n++) { /* get the section(s) */ - lseek(fd, (off_t)nextloc, 0); + lseek(fd, (off_t)nextloc, SEEK_SET); read(fd, (char *)&nextloc, sizeof(nextloc)); - if (sect < 0 | n == sect) { + if ((sect < 0) | (n == sect)) { read(fd, (char *)&hdsect, sizeof(HDGRID)); hdcompgrid(&hdsect); putgrid(&hdsect); /* print grid */