| 7 |
|
|
| 8 |
|
#include "copyright.h" |
| 9 |
|
|
| 10 |
< |
#include "standard.h" |
| 10 |
> |
#include <stdio.h> |
| 11 |
> |
#ifdef _WIN32 |
| 12 |
> |
#define popen _popen |
| 13 |
> |
#define pclose _pclose |
| 14 |
> |
#endif |
| 15 |
|
|
| 16 |
+ |
#include "standard.h" |
| 17 |
|
#include "octree.h" |
| 13 |
– |
|
| 18 |
|
#include "object.h" |
| 15 |
– |
|
| 19 |
|
#include "otypes.h" |
| 20 |
+ |
#include "resolu.h" |
| 21 |
|
|
| 22 |
|
static double ogetflt(); |
| 23 |
|
static long ogetint(); |
| 24 |
|
static char *ogetstr(); |
| 25 |
|
static int nonsurfinset(); |
| 26 |
< |
static int octerror(), skiptree(); |
| 26 |
> |
static void octerror(int etyp, char *msg); |
| 27 |
> |
static void skiptree(void); |
| 28 |
|
static OCTREE getfullnode(), gettree(); |
| 29 |
|
|
| 30 |
|
static char *infn; /* input file specification */ |
| 63 |
|
error(SYSTEM, errmsg); |
| 64 |
|
} |
| 65 |
|
} |
| 66 |
< |
#ifdef MSDOS |
| 62 |
< |
setmode(fileno(infp), O_BINARY); |
| 63 |
< |
#endif |
| 66 |
> |
SET_FILE_BINARY(infp); |
| 67 |
|
/* get header */ |
| 68 |
|
if (checkheader(infp, OCTFMT, load&IO_INFO ? stdout : (FILE *)NULL) < 0) |
| 69 |
|
octerror(USER, "not an octree"); |
| 202 |
|
default: |
| 203 |
|
octerror(USER, "damaged octree"); |
| 204 |
|
} |
| 205 |
+ |
return NULL; /* pro forma return */ |
| 206 |
|
} |
| 207 |
|
|
| 208 |
|
|
| 221 |
|
} |
| 222 |
|
|
| 223 |
|
|
| 224 |
< |
static |
| 225 |
< |
skiptree() /* skip octree on input */ |
| 224 |
> |
static void |
| 225 |
> |
skiptree(void) /* skip octree on input */ |
| 226 |
|
{ |
| 227 |
|
register int i; |
| 228 |
|
|
| 246 |
|
} |
| 247 |
|
|
| 248 |
|
|
| 249 |
< |
static |
| 249 |
> |
static void |
| 250 |
|
octerror(etyp, msg) /* octree error */ |
| 251 |
|
int etyp; |
| 252 |
|
char *msg; |