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:
Ian Lepore 2014-11-23 19:13:17 +00:00
parent d932810143
commit c72731180a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=274924

View file

@ -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;