From 7ef595c6e51b921d851c6c2ad382b943cdbf5ebf Mon Sep 17 00:00:00 2001 From: ian Date: Sun, 23 Nov 2014 19:13:17 +0000 Subject: 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". --- usr.sbin/config/main.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'usr.sbin/config/main.c') diff --git a/usr.sbin/config/main.c b/usr.sbin/config/main.c index 86ecfa6..ff18d3c 100644 --- a/usr.sbin/config/main.c +++ b/usr.sbin/config/main.c @@ -314,6 +314,11 @@ begin: } 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; -- cgit v1.1