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

Comparing ray/src/common/fgetword.c (file contents):
Revision 2.7 by greg, Sun Apr 9 21:33:24 2017 UTC vs.
Revision 2.8 by greg, Thu Aug 10 19:10:44 2017 UTC

# Line 45 | Line 45 | fgetword(                      /* get (quoted) word up to n-1 characters
45                  c = getc(fp);
46          }
47          *cp = '\0';
48 <        if ((c != EOF) & !quote)        /* replace space */
48 >        if (c == EOF) {                 /* hit end-of-file? */
49 >                if (cp == s)            /* and got nothing? */
50 >                        return(NULL);
51 >        } else if (!quote)              /* replace white character */
52                  ungetc(c, fp);
53          return(s);
54   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines