mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
Consider the negation operator (!) to be a word even if it is not followed
by whitespace. This allows "optional !foo" which is what most programmers are naturally going to tend to do as opposed to "optional ! foo".
This commit is contained in:
parent
d932810143
commit
c72731180a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=274924
|
@ -314,6 +314,11 @@ get_word(FILE *fp)
|
|||
}
|
||||
cp = line;
|
||||
*cp++ = ch;
|
||||
/* Negation operator is a word by itself. */
|
||||
if (ch == '!') {
|
||||
*cp = 0;
|
||||
return (line);
|
||||
}
|
||||
while ((ch = getc(fp)) != EOF) {
|
||||
if (isspace(ch))
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue