--- ray/src/hd/rhinfo.c 1999/01/20 15:16:35 3.3 +++ ray/src/hd/rhinfo.c 2003/10/20 16:01:55 3.8 @@ -1,14 +1,12 @@ -/* Copyright (c) 1998 Silicon Graphics, Inc. */ - #ifndef lint -static char SCCSid[] = "$SunId$ SGI"; +static const char RCSid[] = "$Id: rhinfo.c,v 3.8 2003/10/20 16:01:55 greg Exp $"; #endif - /* * Get general information on holodeck file */ #include "holo.h" +#include "platform.h" #ifndef NHBINS #define NHBINS 12 /* number of histogram bins to use for stats */ @@ -40,11 +38,10 @@ gethdinfo(fname, fout) /* get information on holodeck char *fname; FILE *fout; { - extern long ftell(); FILE *fp; HOLO *hdsect; int fd; - int4 nextloc; + int32 nextloc; int n; /* open holodeck file */ if ((fp = fopen(fname, "r")) == NULL) { @@ -60,7 +57,7 @@ FILE *fout; nextloc = ftell(fp); /* get stdio position */ fclose(fp); /* done with stdio */ for (n = 0; nextloc > 0L; n++) { /* get the section(s) */ - lseek(fd, (long)nextloc, 0); + lseek(fd, (off_t)nextloc, SEEK_SET); read(fd, (char *)&nextloc, sizeof(nextloc)); fprintf(fout, "Section %d:\n", n); hdsect = hdinit(fd, NULL); /* load section directory */ @@ -87,10 +84,13 @@ FILE *fp; { int scount[NHBINS]; int minsamp = 10000, maxsamp = 0; + FVECT vt; double sqrtmaxp; int bmin, bmax, cnt; register int i; + fcross(vt, hp->xv[0], hp->xv[1]); + fprintf(fp, "\tWorld volume: %g\n", fabs(DOT(vt,hp->xv[2]))); fprintf(fp, "\tGrid resolution: %d x %d x %d\n", hp->grid[0], hp->grid[1], hp->grid[2]); fprintf(fp, "\tNumber of beams: %ld\n", (long)nbeams(hp));