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

Comparing ray/src/hd/genrhenv.c (file contents):
Revision 3.3 by greg, Sat Feb 22 02:07:24 2003 UTC vs.
Revision 3.6 by greg, Mon Oct 20 16:01:55 2003 UTC

# Line 6 | Line 6 | static const char      RCSid[] = "$Id$";
6   */
7  
8   #include "holo.h"
9 + #include "platform.h"
10  
11   #define ourhp           (hdlist[0])
12  
# Line 55 | Line 56 | openholo(fname, sect)          /* open holodeck section for in
56   char    *fname;
57   int     sect;
58   {
58        extern long     ftell();
59          FILE    *fp;
60          int     fd;
61 <        int4    nextloc;
61 >        int32   nextloc;
62          int     n;
63                                          /* open holodeck file */
64          if ((fp = fopen(fname, "r")) == NULL) {
# Line 74 | Line 74 | int    sect;
74          nextloc = ftell(fp);                    /* get stdio position */
75          fclose(fp);                             /* done with stdio */
76          for (n = 0; nextloc > 0L; n++) {        /* get the indicated section */
77 <                lseek(fd, (off_t)nextloc, 0);
77 >                lseek(fd, (off_t)nextloc, SEEK_SET);
78                  read(fd, (char *)&nextloc, sizeof(nextloc));
79                  if (n == sect) {
80                          hdinit(fd, NULL);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines