9 |
|
|
10 |
|
#include "radogl.h" |
11 |
|
#include "octree.h" |
12 |
+ |
#include "platform.h" |
13 |
|
|
14 |
|
#define MAXLEVEL 16 /* maximum instance hierarchy level */ |
15 |
|
|
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"); |
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 */ |