--- ray/src/ot/readobj2.c 2004/09/28 23:55:02 2.10 +++ ray/src/ot/readobj2.c 2025/04/22 14:51:29 2.14 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: readobj2.c,v 2.10 2004/09/28 23:55:02 greg Exp $"; +static const char RCSid[] = "$Id: readobj2.c,v 2.14 2025/04/22 14:51:29 greg Exp $"; #endif /* * readobj2.c - routines for reading in object descriptions. @@ -9,7 +9,7 @@ static const char RCSid[] = "$Id: readobj2.c,v 2.10 20 #include #include "platform.h" -#include "rtprocess.h" +#include "paths.h" #include "rtmath.h" #include "rtio.h" #include "rterror.h" @@ -27,7 +27,6 @@ readobj2( /* read in an object file or stream */ ro_cbfunc callback ) { - char *fgetline(); FILE *infp; char buf[2048]; register int c; @@ -58,9 +57,12 @@ readobj2( /* read in an object file or stream */ getobject2(input, infp, callback); } } - if (input[0] == '!') - pclose(infp); - else + if (input[0] == '!') { + if (pclose(infp) != 0) { + sprintf(errmsg, "bad status from \"%s\"", input); + error(WARNING, errmsg); + } + } else fclose(infp); }