diff options
author | Explorer09 <explorer09@gmail.com> | 2017-07-08 20:21:37 +0800 |
---|---|---|
committer | Will Estes <westes575@gmail.com> | 2017-07-15 18:31:41 -0400 |
commit | e784a805ef8f33ab4de544eee1876f41d2bd9dbc (patch) | |
tree | 25ce5f4a583a8d45111e854756ca200d92d71d7e /src/regex.c | |
parent | 0f370436e1cf0c731e74bcee806df6c7a43a3094 (diff) |
filter: faster is_blank_line implementation
Using regex_t regex_blank_line is *slow*.
Diffstat (limited to 'src/regex.c')
-rw-r--r-- | src/regex.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/regex.c b/src/regex.c index 38e658b..f4c4163 100644 --- a/src/regex.c +++ b/src/regex.c @@ -25,10 +25,8 @@ static const char* REGEXP_LINEDIR = "^#line ([[:digit:]]+) \"(.*)\""; -static const char* REGEXP_BLANK_LINE = "^[[:space:]]*$"; regex_t regex_linedir; /**< matches line directives */ -regex_t regex_blank_line; /**< matches blank lines */ /** Initialize the regular expressions. @@ -37,8 +35,6 @@ regex_t regex_blank_line; /**< matches blank lines */ bool flex_init_regex(void) { flex_regcomp(®ex_linedir, REGEXP_LINEDIR, REG_EXTENDED); - flex_regcomp(®ex_blank_line, REGEXP_BLANK_LINE, REG_EXTENDED); - return true; } |