aboutsummaryrefslogtreecommitdiffstats
path: root/re.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-08-23 06:05:01 +0300
committerArnold D. Robbins <arnold@skeeve.com>2016-08-23 06:05:01 +0300
commit273c35356b59a2d3b989bd568f577aaf800dc4a5 (patch)
tree3bc9b2f5a3c5466f2d436c1029e92cf2f221fb4c /re.c
parent4a920a6b4214dfc118eeeffd28b3dff33127a9b5 (diff)
parent546f826812728eb8a7b9e51408929c7314b92d31 (diff)
downloadegawk-273c35356b59a2d3b989bd568f577aaf800dc4a5.tar.gz
egawk-273c35356b59a2d3b989bd568f577aaf800dc4a5.tar.bz2
egawk-273c35356b59a2d3b989bd568f577aaf800dc4a5.zip
Merge branch 'gawk-4.1-stable'
Diffstat (limited to 're.c')
-rw-r--r--re.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/re.c b/re.c
index 593ed166..c7899694 100644
--- a/re.c
+++ b/re.c
@@ -203,14 +203,11 @@ make_regexp(const char *s, size_t len, bool ignorecase, bool dfa, bool canfatal)
syn &= ~RE_ICASE;
}
- /* only call dfasyntax if we're using dfa; saves time */
- if (dfa && ! no_dfa) {
- dfa_syn = syn;
- /* FIXME: dfa doesn't pay attention RE_ICASE */
- if (ignorecase)
- dfa_syn |= RE_ICASE;
- dfasyntax(dfa_syn, ignorecase, '\n');
- }
+ dfa_syn = syn;
+ /* FIXME: dfa doesn't pay attention RE_ICASE */
+ if (ignorecase)
+ dfa_syn |= RE_ICASE;
+
re_set_syntax(syn);
if ((rerr = re_compile_pattern(buf, len, &(rp->pat))) != NULL) {
@@ -228,6 +225,7 @@ make_regexp(const char *s, size_t len, bool ignorecase, bool dfa, bool canfatal)
if (dfa && ! no_dfa) {
rp->dfa = true;
rp->dfareg = dfaalloc();
+ dfasyntax(rp->dfareg, dfa_syn, ignorecase, '\n');
dfacomp(buf, len, rp->dfareg, true);
} else
rp->dfa = false;
@@ -423,7 +421,8 @@ resetup()
syn |= RE_INTERVALS | RE_INVALID_INTERVAL_ORD | RE_NO_BK_BRACES;
(void) re_set_syntax(syn);
- dfasyntax(syn, false, '\n');
+
+ dfa_init();
}
/* avoid_dfa --- return true if we should not use the DFA matcher */