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

Comparing ray/src/common/rglinst.c (file contents):
Revision 3.7 by greg, Wed Apr 23 02:28:06 2003 UTC vs.
Revision 3.9 by schorsch, Thu Jun 5 19:29:34 2003 UTC

# Line 9 | Line 9 | static const char      RCSid[] = "$Id$";
9  
10   #include "radogl.h"
11   #include "octree.h"
12 + #include "platform.h"
13  
14   #define MAXLEVEL        16              /* maximum instance hierarchy level */
15  
# Line 123 | Line 124 | static OCTINST *
124   getoct(name)                            /* get/assign octree list id */
125   char    *name;
126   {
126        extern char     *getpath(), *getlibpath();
127          char    *path;
128          register LUENT  *lp;
129          register OCTINST        *op;
# Line 137 | Line 137 | char   *name;
137                  strcpy(lp->key, name);
138          }
139          if ((op = (OCTINST *)lp->data) == NULL) {
140 <                path = getpath(name, getlibpath(), R_OK);
140 >                path = getpath(name, getrlibpath(), R_OK);
141                  if (path == NULL) {
142                          sprintf(errmsg, "cannot find octree \"%s\"", name);
143                          error(USER, errmsg);
# Line 169 | Line 169 | FVECT  cent;
169                  sprintf(errmsg, "cannot open octree file \"%s\"", fname);
170                  error(SYSTEM, errmsg);
171          }
172 < #ifdef MSDOS
173 <        setmode(fileno(infp), O_BINARY);
174 < #endif
172 >        SET_FILE_BINARY(infp);
173                                          /* get header */
174          if (checkheader(infp, OCTFMT, NULL) < 0)
175                  octerror(USER, "not an octree");
# Line 208 | Line 206 | char  *fname;
206          
207          infn = fname;
208          infp = fopen(fname, "r");       /* assume already checked */
209 < #ifdef MSDOS
212 <        setmode(fileno(infp), O_BINARY);
213 < #endif
209 >        SET_FILE_BINARY(infp);
210                                          /* skip header */
211          getheader(infp, NULL, NULL);
212                                          /* get format */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines