--- ray/src/common/rglinst.c 2003/04/23 02:28:06 3.7 +++ ray/src/common/rglinst.c 2003/06/05 19:29:34 3.9 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rglinst.c,v 3.7 2003/04/23 02:28:06 greg Exp $"; +static const char RCSid[] = "$Id: rglinst.c,v 3.9 2003/06/05 19:29:34 schorsch Exp $"; #endif /* * Routines for reading instances and converting to OpenGL. @@ -9,6 +9,7 @@ static const char RCSid[] = "$Id: rglinst.c,v 3.7 2003 #include "radogl.h" #include "octree.h" +#include "platform.h" #define MAXLEVEL 16 /* maximum instance hierarchy level */ @@ -123,7 +124,6 @@ static OCTINST * getoct(name) /* get/assign octree list id */ char *name; { - extern char *getpath(), *getlibpath(); char *path; register LUENT *lp; register OCTINST *op; @@ -137,7 +137,7 @@ char *name; strcpy(lp->key, name); } if ((op = (OCTINST *)lp->data) == NULL) { - path = getpath(name, getlibpath(), R_OK); + path = getpath(name, getrlibpath(), R_OK); if (path == NULL) { sprintf(errmsg, "cannot find octree \"%s\"", name); error(USER, errmsg); @@ -169,9 +169,7 @@ FVECT cent; sprintf(errmsg, "cannot open octree file \"%s\"", fname); error(SYSTEM, errmsg); } -#ifdef MSDOS - setmode(fileno(infp), O_BINARY); -#endif + SET_FILE_BINARY(infp); /* get header */ if (checkheader(infp, OCTFMT, NULL) < 0) octerror(USER, "not an octree"); @@ -208,9 +206,7 @@ char *fname; infn = fname; infp = fopen(fname, "r"); /* assume already checked */ -#ifdef MSDOS - setmode(fileno(infp), O_BINARY); -#endif + SET_FILE_BINARY(infp); /* skip header */ getheader(infp, NULL, NULL); /* get format */