202 |
|
int i, n; |
203 |
|
register int j; |
204 |
|
|
205 |
< |
if (fscanf(fin, "%s %s %s", buf, typ, nam) != 3) |
205 |
> |
if (fgetword(buf, sizeof(buf), fin) == NULL || |
206 |
> |
fgetword(typ, sizeof(typ), fin) == NULL || |
207 |
> |
fgetword(nam, sizeof(nam), fin) == NULL) |
208 |
|
goto readerr; |
209 |
|
if (!strcmp(typ, "polygon")) |
210 |
|
for (j = 0; j < nmarkers; j++) |
212 |
|
replace(fname, &marker[j], nam, fin); |
213 |
|
return; |
214 |
|
} |
215 |
< |
printf("\n%s %s %s\n", buf, typ, nam); |
215 |
> |
putchar('\n'); fputword(buf, stdout); |
216 |
> |
printf(" %s ", typ); |
217 |
> |
fputword(nam, stdout); putchar('\n'); |
218 |
|
if (!strcmp(typ, "alias")) { /* alias special case */ |
219 |
< |
if (fscanf(fin, "%s", buf) != 1) |
219 |
> |
if (fgetword(buf, sizeof(buf), fin) == NULL) |
220 |
|
goto readerr; |
221 |
< |
printf("\t%s\n", buf); |
221 |
> |
putchar('\t'); fputword(buf, stdout); putchar('\n'); |
222 |
|
return; |
223 |
|
} |
224 |
|
for (i = 0; i < 3; i++) { /* pass along arguments */ |