summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-11-28 21:23:10 +0200
committerArnold D. Robbins <arnold@skeeve.com>2016-11-28 21:23:10 +0200
commitb2aca8c7877af71e056210030ba2d8354a47d43f (patch)
tree5b1e3d872ad7e01906c9f501d7477efa9f248828
parent110a61377deed6871b83827497ec6674c139f61f (diff)
downloadgawk-b2aca8c7877af71e056210030ba2d8354a47d43f.tar.gz
Sync dfa with gnulib.
-rw-r--r--ChangeLog2
-rw-r--r--dfa.c8
2 files changed, 2 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 2d88b917..0209b816 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,7 +7,7 @@
Unrelated:
- * dfa.c: Sync with GNULIB.
+ * dfa.c: Sync with GNULIB. Twice in one day.
2016-11-21 Arnold D. Robbins <arnold@skeeve.com>
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++)
{