From 499597d6efb0de5bb6d6f52bda1f348478d7f5a9 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 11 Jan 2012 00:37:17 +0100 Subject: mdev: do not treat non-leading '#' chars as start of comment. Closes 4676 Signed-off-by: Denys Vlasenko --- include/libbb.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/libbb.h b/include/libbb.h index 0c266dc53..4975b97fe 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -1195,13 +1195,14 @@ enum { PARSE_MIN_DIE = 0x00100000, // die if < min tokens found // keep a copy of current line PARSE_KEEP_COPY = 0x00200000 * ENABLE_FEATURE_CROND_D, -// PARSE_ESCAPE = 0x00400000, // process escape sequences in tokens + PARSE_EOL_COMMENTS = 0x00400000, // comments are recognized even if they aren't the first char // NORMAL is: // * remove leading and trailing delimiters and collapse // multiple delimiters into one // * warn and continue if less than mintokens delimiters found // * grab everything into last token - PARSE_NORMAL = PARSE_COLLAPSE | PARSE_TRIM | PARSE_GREEDY, + // * comments are recognized even if they aren't the first char + PARSE_NORMAL = PARSE_COLLAPSE | PARSE_TRIM | PARSE_GREEDY | PARSE_EOL_COMMENTS, }; typedef struct parser_t { FILE *fp; -- cgit v1.2.3