[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-2354-g4931b6
From: |
Arnold Robbins |
Subject: |
[gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-2354-g4931b67 |
Date: |
Tue, 29 Nov 2016 17:49:48 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".
The branch, master has been updated
via 4931b67d7efa50576cea9f3045cc9d70ea779f2e (commit)
from b2aca8c7877af71e056210030ba2d8354a47d43f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=4931b67d7efa50576cea9f3045cc9d70ea779f2e
commit 4931b67d7efa50576cea9f3045cc9d70ea779f2e
Author: Arnold D. Robbins <address@hidden>
Date: Tue Nov 29 19:49:02 2016 +0200
Use RE_ICASE instead of DFA_CASE_FOLD in dfa.c and re.c.
diff --git a/ChangeLog b/ChangeLog
index 0209b81..051e83e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-11-29 Arnold D. Robbins <address@hidden>
+
+ * dfa.c (dfasyntax): Use RE_ICASE instead of DFA_CASE_FOLD.
+ * dfa.h (DFA_CASE_FOLD): Removed.
+ * re.c (make_regexp): Use RE_ICASE for regex and dfa. Yay!
+
2016-11-28 Arnold D. Robbins <address@hidden>
Make gawk compile on HP-UX 11.33.
diff --git a/dfa.c b/dfa.c
index b735445..cd7dce6 100644
--- a/dfa.c
+++ b/dfa.c
@@ -4018,7 +4018,7 @@ dfasyntax (struct dfa *dfa, struct localeinfo const
*linfo,
dfa->canychar = -1;
dfa->lex.cur_mb_len = 1;
dfa->syntax.syntax_bits_set = true;
- dfa->syntax.case_fold = (dfaopts & DFA_CASE_FOLD) != 0;
+ dfa->syntax.case_fold = (bits & RE_ICASE) != 0;
dfa->syntax.anchor = (dfaopts & DFA_ANCHOR) != 0;
dfa->syntax.eolbyte = dfaopts & DFA_EOL_NUL ? '\0' : '\n';
dfa->syntax.syntax_bits = bits;
diff --git a/dfa.h b/dfa.h
index 8608b10..0fd9b2c 100644
--- a/dfa.h
+++ b/dfa.h
@@ -62,11 +62,8 @@ enum
possibly true for other apps. */
DFA_ANCHOR = 1 << 0,
- /* Ignore case while matching. */
- DFA_CASE_FOLD = 1 << 1,
-
/* '\0' in data is end-of-line, instead of the traditional '\n'. */
- DFA_EOL_NUL = 1 << 2
+ DFA_EOL_NUL = 1 << 1
};
/* Initialize or reinitialize a DFA. This must be called before
diff --git a/re.c b/re.c
index dcb0667..6c1e360 100644
--- a/re.c
+++ b/re.c
@@ -203,7 +203,6 @@ make_regexp(const char *s, size_t len, bool ignorecase,
bool dfa, bool canfatal)
}
dfa_syn = syn;
- /* FIXME: dfa doesn't pay attention RE_ICASE */
if (ignorecase)
dfa_syn |= RE_ICASE;
@@ -223,8 +222,7 @@ make_regexp(const char *s, size_t len, bool ignorecase,
bool dfa, bool canfatal)
rp->pat.newline_anchor = false; /* don't get \n in middle of string */
if (dfa && ! no_dfa) {
rp->dfareg = dfaalloc();
- dfasyntax(rp->dfareg, & localeinfo, dfa_syn,
- (ignorecase ? DFA_CASE_FOLD : 0) | DFA_ANCHOR);
+ dfasyntax(rp->dfareg, & localeinfo, dfa_syn, DFA_ANCHOR);
dfacomp(buf, len, rp->dfareg, true);
} else
rp->dfareg = NULL;
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 ++++++
dfa.c | 2 +-
dfa.h | 5 +----
re.c | 4 +---
4 files changed, 9 insertions(+), 8 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-2354-g4931b67,
Arnold Robbins <=