18 |
|
|
19 |
|
#include <ctype.h> |
20 |
|
|
21 |
+ |
extern char *fgetword(), *strcpy(); |
22 |
+ |
|
23 |
|
OBJREC *objblock[MAXOBJBLK]; /* our objects */ |
24 |
|
OBJECT nobjects = 0; /* # of objects */ |
25 |
|
|
79 |
|
error(SYSTEM, "out of object space"); |
80 |
|
objp = objptr(obj); |
81 |
|
/* get modifier */ |
82 |
< |
fscanf(fp, "%s", sbuf); |
82 |
> |
strcpy(sbuf, "EOF"); |
83 |
> |
fgetword(sbuf, MAXSTR, fp); |
84 |
|
if (!strcmp(sbuf, VOIDID)) |
85 |
|
objp->omod = OVOID; |
86 |
|
else if ((objp->omod = modifier(sbuf)) == OVOID) { |
88 |
|
error(USER, errmsg); |
89 |
|
} |
90 |
|
/* get type */ |
91 |
< |
fscanf(fp, "%s", sbuf); |
91 |
> |
strcpy(sbuf, "EOF"); |
92 |
> |
fgetword(sbuf, MAXSTR, fp); |
93 |
|
if (!strcmp(sbuf, ALIASID)) |
94 |
|
objp->otype = -1; |
95 |
|
else if ((objp->otype = otype(sbuf)) < 0) { |
97 |
|
error(USER, errmsg); |
98 |
|
} |
99 |
|
/* get identifier */ |
100 |
< |
fscanf(fp, "%s", sbuf); |
100 |
> |
sbuf[0] = '\0'; |
101 |
> |
fgetword(sbuf, MAXSTR, fp); |
102 |
|
objp->oname = savqstr(sbuf); |
103 |
|
/* get arguments */ |
104 |
|
if (objp->otype == -1) { |
105 |
|
register OBJECT alias; |
106 |
< |
fscanf(fp, "%s", sbuf); |
106 |
> |
strcpy(sbuf, "EOF"); |
107 |
> |
fgetword(sbuf, MAXSTR, fp); |
108 |
|
if ((alias = modifier(sbuf)) == OVOID) { |
109 |
|
sprintf(errmsg, |
110 |
|
"(%s): bad reference \"%s\" for %s \"%s\"", |