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.8 by greg, Tue May 13 17:58:32 2003 UTC vs.
Revision 3.10 by schorsch, Thu Jun 26 00:58:09 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 168 | Line 169 | FVECT  cent;
169                  sprintf(errmsg, "cannot open octree file \"%s\"", fname);
170                  error(SYSTEM, errmsg);
171          }
172 < #ifdef MSDOS
172 <        setmode(fileno(infp), O_BINARY);
173 < #endif
172 >        SET_FILE_BINARY(infp);
173                                          /* get header */
174          if (checkheader(infp, OCTFMT, NULL) < 0)
175                  octerror(USER, "not an octree");
# Line 207 | Line 206 | char  *fname;
206          
207          infn = fname;
208          infp = fopen(fname, "r");       /* assume already checked */
209 < #ifdef MSDOS
211 <        setmode(fileno(infp), O_BINARY);
212 < #endif
209 >        SET_FILE_BINARY(infp);
210                                          /* skip header */
211          getheader(infp, NULL, NULL);
212                                          /* get format */
# Line 359 | Line 356 | loadobj()                              /* get next object */
356   #endif
357                                          /* get real arguments */
358          if (ob.oargs.nfargs = ogetint(2)) {
359 <                ob.oargs.farg = (FLOAT *)malloc
360 <                                (ob.oargs.nfargs*sizeof(FLOAT));
359 >                ob.oargs.farg = (RREAL *)malloc
360 >                                (ob.oargs.nfargs*sizeof(RREAL));
361                  if (ob.oargs.farg == NULL)
362                          goto memerr;
363                  for (i = 0; i < ob.oargs.nfargs; i++)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines