ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/gen/replmarks.c
(Generate patch)

Comparing ray/src/gen/replmarks.c (file contents):
Revision 2.13 by greg, Thu Mar 17 06:38:45 2005 UTC vs.
Revision 2.14 by greg, Wed Dec 28 18:35:42 2005 UTC

# Line 202 | Line 202 | cvobject(              /* convert an object */
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++)
# Line 210 | Line 212 | cvobject(              /* convert an object */
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 */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines