--- ray/src/common/readobj.c 2003/03/11 19:29:04 2.11 +++ ray/src/common/readobj.c 2010/03/30 12:42:33 2.20 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: readobj.c,v 2.11 2003/03/11 19:29:04 greg Exp $"; +static const char RCSid[] = "$Id: readobj.c,v 2.20 2010/03/30 12:42:33 greg Exp $"; #endif /* * readobj.c - routines for reading in object descriptions. @@ -9,13 +9,16 @@ static const char RCSid[] = "$Id: readobj.c,v 2.11 200 #include "copyright.h" -#include "standard.h" +#include +#include +#include +#include "platform.h" +#include "rtprocess.h" +#include "standard.h" #include "object.h" - #include "otypes.h" -#include OBJREC *objblock[MAXOBJBLK]; /* our objects */ OBJECT nobjects = 0; /* # of objects */ @@ -27,7 +30,7 @@ char *inpspec; { OBJECT lastobj; FILE *infp; - char buf[1024]; + char buf[2048]; register int c; lastobj = nobjects; @@ -85,6 +88,11 @@ FILE *fp; /* get modifier */ strcpy(sbuf, "EOF"); fgetword(sbuf, MAXSTR, fp); + if (strchr(sbuf, '\t')) { + sprintf(errmsg, "(%s): illegal tab in modifier \"%s\"", + name, sbuf); + error(USER, errmsg); + } if (!strcmp(sbuf, VOIDID)) objp->omod = OVOID; else if (!strcmp(sbuf, ALIASMOD)) @@ -103,6 +111,11 @@ FILE *fp; /* get identifier */ sbuf[0] = '\0'; fgetword(sbuf, MAXSTR, fp); + if (strchr(sbuf, '\t')) { + sprintf(errmsg, "(%s): illegal tab in identifier \"%s\"", + name, sbuf); + error(USER, errmsg); + } objp->oname = savqstr(sbuf); /* get arguments */ if (objp->otype == MOD_ALIAS) { @@ -163,7 +176,7 @@ newobject() /* get a new object */ void freeobjects(firstobj, nobjs) /* free a range of objects */ -OBJECT firstobj, nobjs; +int firstobj, nobjs; { register int obj; /* check bounds */ @@ -179,7 +192,7 @@ OBJECT firstobj, nobjs; free_os(o); /* free client memory */ freeqstr(o->oname); freefargs(&o->oargs); - bzero(o, sizeof(OBJREC)); + memset((void *)o, '\0', sizeof(OBJREC)); } clearobjndx(); /* free objects off end */