--- ray/src/ot/readobj2.c 2003/10/27 10:29:29 2.8 +++ ray/src/ot/readobj2.c 2020/07/29 18:11:23 2.12 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: readobj2.c,v 2.8 2003/10/27 10:29:29 schorsch Exp $"; +static const char RCSid[] = "$Id: readobj2.c,v 2.12 2020/07/29 18:11:23 greg Exp $"; #endif /* * readobj2.c - routines for reading in object descriptions. @@ -9,23 +9,26 @@ static const char RCSid[] = "$Id: readobj2.c,v 2.8 200 #include #include "platform.h" -#include "rtprocess.h" +#include "paths.h" #include "rtmath.h" #include "rtio.h" #include "rterror.h" #include "object.h" #include "otypes.h" +#include "oconv.h" -static void getobject2(char *name, FILE *fp, int (*f)()); +static void getobject2(char *name, FILE *fp, ro_cbfunc f); -readobj2(input, callback) /* read in an object file or stream */ -char *input; -int (*callback)(); + +void +readobj2( /* read in an object file or stream */ + char *input, + ro_cbfunc callback +) { - char *fgetline(); FILE *infp; - char buf[512]; + char buf[2048]; register int c; if (input == NULL) { @@ -63,9 +66,9 @@ int (*callback)(); static void getobject2( /* read the next object */ -char *name, -FILE *fp, -int (*f)() + char *name, + FILE *fp, + ro_cbfunc f ) { char sbuf[MAXSTR];