--- ray/src/common/readoct.c 2003/07/17 09:21:29 2.20 +++ ray/src/common/readoct.c 2004/09/14 02:53:50 2.26 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: readoct.c,v 2.20 2003/07/17 09:21:29 schorsch Exp $"; +static const char RCSid[] = "$Id: readoct.c,v 2.26 2004/09/14 02:53:50 greg Exp $"; #endif /* * readoct.c - routines to read octree information. @@ -10,13 +10,19 @@ static const char RCSid[] = "$Id: readoct.c,v 2.20 200 #include #include -#include "standard.h" #include "platform.h" +#include "rtprocess.h" +#include "standard.h" #include "octree.h" #include "object.h" #include "otypes.h" #include "resolu.h" +#ifdef getc_unlocked /* avoid horrendous overhead of flockfile */ +#undef getc +#define getc getc_unlocked +#endif + static double ogetflt(void); static long ogetint(int); static char *ogetstr(char *); @@ -99,7 +105,7 @@ char *ofn[]; else if (load & IO_SCENE && nf == 0) skiptree(); - if (load & IO_SCENE) /* get the scene */ + if (load & IO_SCENE) { /* get the scene */ if (nf == 0) { /* load binary scene data */ readscene(infp, objsize); @@ -112,6 +118,7 @@ char *ofn[]; if (dosets(nonsurfinset)) octerror(USER, "modifier in tree; octree stale?"); } + } /* close the input */ if (infn[0] == '!') pclose(infp); @@ -200,7 +207,7 @@ gettree() /* get a pre-ordered octree */ default: octerror(USER, "damaged octree"); } - return NULL; /* pro forma return */ + return EMPTY; /* pro forma return */ }