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.1 by gregl, Tue Jan 6 15:09:33 1998 UTC vs.
Revision 3.7 by greg, Wed Oct 22 02:06:34 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1998 Silicon Graphics, Inc. */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ SGI";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   * Create a closed environment from a holodeck section
6   */
7  
8 + #include "platform.h"
9   #include "holo.h"
10  
11   #define ourhp           (hdlist[0])
# Line 42 | Line 40 | char   *argv[];
40                  error(SYSTEM, "out of memory in main");
41          while (n--)
42                  gabmi[n].h = ourhp;
43 +        fputs("# ", stdout);
44 +        printargs(argc, argv, stdout);
45          hdcachesize = 0;
46          for (n = 0; n < 6; n++)
47                  mkwall(argv[2], sect, n);
# Line 56 | Line 56 | openholo(fname, sect)          /* open holodeck section for in
56   char    *fname;
57   int     sect;
58   {
59        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 75 | 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, (long)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);
# Line 322 | Line 321 | int    sect;
321   }
322  
323  
324 + void
325   eputs(s)                        /* put error message to stderr */
326   register char  *s;
327   {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines