aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-11-28 21:23:36 +0200
committerArnold D. Robbins <arnold@skeeve.com>2016-11-28 21:23:36 +0200
commit7640888eeb72fc4ff315c43dba5857e4f8cec42a (patch)
treee4eba067b9c7aa390ecb0306d29c4acd4ae8c967
parentbe76bc0ee3461800eaba3e41fadd307167c0c6e5 (diff)
parentb2aca8c7877af71e056210030ba2d8354a47d43f (diff)
downloadegawk-7640888eeb72fc4ff315c43dba5857e4f8cec42a.tar.gz
egawk-7640888eeb72fc4ff315c43dba5857e4f8cec42a.tar.bz2
egawk-7640888eeb72fc4ff315c43dba5857e4f8cec42a.zip
Merge branch 'master' into feature/fix-comments
-rw-r--r--ChangeLog2
-rw-r--r--dfa.c8
2 files changed, 2 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 765d6c4c..887d5475 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,7 +7,7 @@
Unrelated:
- * dfa.c: Sync with GNULIB.
+ * dfa.c: Sync with GNULIB. Twice in one day.
Unrelated: Start improving profiling comments for switch/case.
diff --git a/dfa.c b/dfa.c
index f3939189..b735445f 100644
--- a/dfa.c
+++ b/dfa.c
@@ -2939,7 +2939,7 @@ transit_state (struct dfa *d, state_num s, unsigned char const **pp,
/* Calculate the state which can be reached from the state 's' by
consuming 'mbclen' single bytes from the buffer. */
s1 = s;
- for (i = 0; i < mbclen && 0 <= s; i++)
+ for (i = 0; i < mbclen && (i == 0 || d->min_trcount <= s); i++)
s = transit_state_singlebyte (d, s, pp);
*pp += mbclen - i;
@@ -3298,12 +3298,6 @@ free_mbdata (struct dfa *d)
static bool _GL_ATTRIBUTE_PURE
dfa_supported (struct dfa const *d)
{
- /* Declare any non-UTF8 multibyte locale "not supported." Otherwise, a
- regexp like ".*7" would mistakenly match \uC9, e.g., via this command:
- (export LC_ALL=zh_CN.gb18030; printf '\uC9\n' | grep '.*7') */
- if (d->localeinfo.multibyte && !d->localeinfo.using_utf8)
- return false;
-
size_t i;
for (i = 0; i < d->tindex; i++)
{