From: jannick0 Date: Sun, 9 Jul 2017 20:36:14 +0000 (+0200) Subject: scanner: Ignore comment lines in skeleton files. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7af066b952fc81eb1a29079c7206e50ffed80c40;p=flex scanner: Ignore comment lines in skeleton files. In skeleton files comments are indicated by leading `%#` and when directly read in using `flex -S ` they should be ignored. Example: `flex.skl`. Amending commit 2f21edac99b5efc432417233e6e53326d630e08f which removed this conditional branch. --- diff --git a/src/misc.c b/src/misc.c index 39483ea..9ead263 100644 --- a/src/misc.c +++ b/src/misc.c @@ -732,7 +732,10 @@ void skelout (void) */ #define cmd_match(s) (strncmp(buf,(s),strlen(s))==0) - if (buf[1] == '%') { + if (buf[1] == '#') { + /* %# indicates comment line to be ignored */ + } + else if (buf[1] == '%') { /* %% is a break point for skelout() */ return; }