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

Comparing ray/src/common/wordfile.c (file contents):
Revision 2.5 by greg, Tue Nov 10 18:21:26 1992 UTC vs.
Revision 2.7 by greg, Fri Jun 18 09:00:22 1993 UTC

# Line 27 | Line 27 | char   *fname;
27          char    buf[MAXFLEN];
28          register int    n;
29                                          /* load file into buffer */
30 +        if (fname == NULL)
31 +                return(-1);                     /* no filename */
32          if ((fd = open(fname, 0)) < 0)
33                  return(-1);                     /* open error */
34          n = read(fd, buf, MAXFLEN);
# Line 62 | Line 64 | char   *str;
64                  if (!*cp)               /* all done? */
65                          break;
66                  *ap++ = cp;             /* add argument to list */
67 <                while (*cp && !isspace(*cp))
68 <                        cp++;
67 >                while (*++cp && !isspace(*cp))
68 >                        ;
69          }
70          *ap = NULL;
71          return(ap - avl);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines