From 392407bba36ee189a62af6b4a08c13476fa8fbbc Mon Sep 17 00:00:00 2001 From: Norihiro Tanaka Date: Sat, 3 Sep 2016 10:11:56 +0900 Subject: [PATCH] dfa: additional change for use single-byte algorithm even in non-UTF-8 * src/dfa.c (dfaexec_main): Do it. --- src/dfa.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/src/dfa.c b/src/dfa.c index e009bc6..e7b92ba 100644 --- a/src/dfa.c +++ b/src/dfa.c @@ -3183,10 +3183,7 @@ dfaexec_main (struct dfa *d, char const *begin, char *end, bool allow_nl, s1 = s; if (!multibyte || d->states[s].mbps.nelem == 0 - || (*p == eol && !allow_nl) - || (*p == '\n' && !(d->syntax.syntax_bits & RE_DOT_NEWLINE)) - || (*p == '\0' && (d->syntax.syntax_bits & RE_DOT_NOT_NULL)) - || (char *) p >= end) + || d->localeinfo.sbctowc[*p] != WEOF || (char *) p >= end) { /* If a input character does not match ANYCHAR, do it like a single-byte character. */ -- 1.7.1