# | 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 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |