ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/hd/rholo.c
(Generate patch)

Comparing ray/src/hd/rholo.c (file contents):
Revision 3.1 by gregl, Fri Oct 31 10:23:29 1997 UTC vs.
Revision 3.2 by gregl, Fri Oct 31 11:44:09 1997 UTC

# Line 191 | Line 191 | rholo()                                /* holodeck main loop */
191          if (ncprocs <= 0)
192                  return(1);
193                                          /* check file size */
194 <        if (l = 1024.*1024.*vflt(DISKSPACE) > 0 &&
194 >        if ((l = 1024.*1024.*vflt(DISKSPACE)) > 0 &&
195                          hdfiluse(hdlist[0]->fd, 0) + hdmemuse(0) >= l)
196                  return(0);
197                                          /* check time */
# Line 227 | Line 227 | time_t t;
227   {
228          if (t == 0)
229                  t = time(NULL);
230 <        fprintf(stderr, "%s: %ld packets done (%ld rays) after %.2f hours\n",
230 >        fprintf(stderr, "%s: %ld packets (%ld rays) done after %.2f hours\n",
231                          progname, npacksdone, nraysdone, (t-starttime)/3600.);
232 +        fflush(stderr);
233 +        reporttime = t + (time_t)(vflt(REPORT)*60.);
234   }
235  
236  
# Line 260 | Line 262 | register HDGRID        *gp;
262                  if ((len[i] = VLEN(gp->xv[i])) > maxlen)
263                          maxlen = len[i];
264          if (!vdef(GRID)) {
265 <                sprintf(buf, "%.4f", maxlen/16.);
265 >                sprintf(buf, "%.4f", maxlen/8.);
266                  vval(GRID) = savqstr(buf);
267                  vdef(GRID)++;
268          }
# Line 328 | Line 330 | HDGRID *gp;
330          putw(HOLOMAGIC, fp);            /* put magic number & terminus */
331          fwrite(&endloc, sizeof(long), 1, fp);
332          fflush(fp);                     /* flush buffer */
333 <        initholo(fileno(fp), gp);       /* allocate and initialize index */
333 >        hdinit(fileno(fp), gp);         /* allocate and initialize index */
334                          /* we're dropping fp here.... */
335   }
336  
# Line 340 | Line 342 | char   *s;
342          register char   *cp;
343          char    fmt[32];
344  
345 <        if (headidval(fmt, s)) {
345 >        if (formatval(fmt, s)) {
346                  if (strcmp(fmt, HOLOFMT)) {
347                          sprintf(errmsg, "%s file \"%s\" has %s%s",
348                                          HOLOFMT, hdkfile, FMTSTR, fmt);
# Line 378 | Line 380 | loadholo()                     /* start loading a holodeck from fname */
380          if (endloc != 0)
381                  error(WARNING, "ignoring multiple sections in holodeck file");
382          fseek(fp, 0L, 1);                       /* align system file pointer */
383 <        initholo(fileno(fp), NULL);             /* allocate and load index */
383 >        hdinit(fileno(fp), NULL);               /* allocate and load index */
384                          /* we're dropping fp here.... */
385   }
386  
# Line 409 | Line 411 | PACKET *pl;
411   getradfile(rfargs)              /* run rad and get needed variables */
412   char    *rfargs;
413   {
414 <        static short    mvar[] = {VIEW,OCTREE,EXPOSURE,REPORT,-1};
414 >        static short    mvar[] = {VIEW,OCTREE,EXPOSURE,-1};
415          static char     tf1[] = TEMPLATE;
416          char    tf2[64];
417          char    combuf[256];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines