--- ray/src/common/readoct.c 2003/03/14 21:27:46 2.15 +++ ray/src/common/readoct.c 2003/07/17 09:21:29 2.20 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: readoct.c,v 2.15 2003/03/14 21:27:46 greg Exp $"; +static const char RCSid[] = "$Id: readoct.c,v 2.20 2003/07/17 09:21:29 schorsch Exp $"; #endif /* * readoct.c - routines to read octree information. @@ -7,20 +7,23 @@ static const char RCSid[] = "$Id: readoct.c,v 2.15 200 #include "copyright.h" -#include "standard.h" +#include +#include +#include "standard.h" +#include "platform.h" #include "octree.h" - #include "object.h" - #include "otypes.h" +#include "resolu.h" -static double ogetflt(); -static long ogetint(); -static char *ogetstr(); -static int nonsurfinset(); -static int octerror(), skiptree(); -static OCTREE getfullnode(), gettree(); +static double ogetflt(void); +static long ogetint(int); +static char *ogetstr(char *); +static int nonsurfinset(OBJECT *); +static void octerror(int etyp, char *msg); +static void skiptree(void); +static OCTREE getfullnode(void), gettree(void); static char *infn; /* input file specification */ static FILE *infp; /* input file stream */ @@ -58,9 +61,7 @@ char *ofn[]; error(SYSTEM, errmsg); } } -#ifdef MSDOS - setmode(fileno(infp), O_BINARY); -#endif + SET_FILE_BINARY(infp); /* get header */ if (checkheader(infp, OCTFMT, load&IO_INFO ? stdout : (FILE *)NULL) < 0) octerror(USER, "not an octree"); @@ -199,6 +200,7 @@ gettree() /* get a pre-ordered octree */ default: octerror(USER, "damaged octree"); } + return NULL; /* pro forma return */ } @@ -217,8 +219,8 @@ register OBJECT *os; } -static -skiptree() /* skip octree on input */ +static void +skiptree(void) /* skip octree on input */ { register int i; @@ -242,7 +244,7 @@ skiptree() /* skip octree on input */ } -static +static void octerror(etyp, msg) /* octree error */ int etyp; char *msg;