diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2016-08-14 21:12:45 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2016-08-14 21:12:45 +0300 |
commit | 0bdf798b8f9d018b4d11f63dddde683248d65a39 (patch) | |
tree | 9247911e64755b056f9b91c93c9c7ea9e5357f77 /re.c | |
parent | f591d307d9af95bfa0ccda4d5eb76a674447ba39 (diff) | |
parent | 0703039505200ca5126e11d905a6fa40c602d1b9 (diff) | |
download | egawk-0bdf798b8f9d018b4d11f63dddde683248d65a39.tar.gz egawk-0bdf798b8f9d018b4d11f63dddde683248d65a39.tar.bz2 egawk-0bdf798b8f9d018b4d11f63dddde683248d65a39.zip |
Merge branch 'master' into feature/typed-regex
Diffstat (limited to 're.c')
-rw-r--r-- | re.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -203,10 +203,14 @@ make_regexp(const char *s, size_t len, bool ignorecase, bool dfa, bool canfatal) syn &= ~RE_ICASE; } - dfa_syn = syn; - if (ignorecase) - dfa_syn |= RE_ICASE; - dfasyntax(dfa_syn, ignorecase, '\n'); + /* 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'); + } re_set_syntax(syn); if ((rerr = re_compile_pattern(buf, len, &(rp->pat))) != NULL) { |