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.74 by greg, Fri Dec 5 00:22:33 2008 UTC vs.
Revision 3.75 by greg, Thu Sep 30 15:43:30 2010 UTC

# Line 453 | Line 453 | creatholo(                     /* create a holodeck output file */
453   )
454   {
455          extern char     VersionID[];
456 <        int32   lastloc, nextloc;
456 >        off_t   lastloc, nextloc;
457          int     n;
458          int     fd;
459          FILE    *fp;
# Line 479 | Line 479 | creatholo(                     /* create a holodeck output file */
479                  if (!n)
480                          break;
481                  nextloc = hdfilen(fd);          /* write section pointer */
482 <                if (lseek(fd, (off_t)lastloc, SEEK_SET) < 0)
482 >                if (lseek(fd, lastloc, SEEK_SET) < 0)
483                          error(SYSTEM,
484                                  "cannot seek on holodeck file in creatholo");
485                  write(fd, (char *)&nextloc, sizeof(nextloc));
486 <                lseek(fd, (off_t)(lastloc=nextloc), SEEK_SET);
486 >                lseek(fd, (lastloc=nextloc), SEEK_SET);
487          }
488   }
489  
# Line 522 | Line 522 | loadholo(void)                 /* start loading a holodeck from fnam
522          FILE    *fp;
523          int     fd;
524          int     n;
525 <        int32   nextloc;
525 >        off_t   nextloc;
526          
527          if ((ncprocs > 0) & (force >= 0))
528                  fp = fopen(hdkfile, "r+");
# Line 554 | Line 554 | loadholo(void)                 /* start loading a holodeck from fnam
554          fd = dup(fileno(fp));
555          fclose(fp);                             /* done with stdio */
556          for (n = 0; nextloc > 0L; n++) {        /* initialize each section */
557 <                lseek(fd, (off_t)nextloc, SEEK_SET);
557 >                lseek(fd, nextloc, SEEK_SET);
558                  read(fd, (char *)&nextloc, sizeof(nextloc));
559                  hdinit(fd, NULL);
560          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines