aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--dfa.c33
2 files changed, 17 insertions, 22 deletions
diff --git a/ChangeLog b/ChangeLog
index a7b9f36e..533ee9c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-10-25 Arnold D. Robbins <arnold@skeeve.com>
+
+ * dfa.c: Sync with GNU grep.
+
2014-10-17 John E. Malmberg <wb8tyw@qsl.net>
* ext.c (close_extensions): Test for null pointer since
@@ -32,7 +36,7 @@
2014-10-08 Arnold D. Robbins <arnold@skeeve.com>
- * dfa.c: Sync wit GNU grep.
+ * dfa.c: Sync with GNU grep.
2014-10-05 Arnold D. Robbins <arnold@skeeve.com>
diff --git a/dfa.c b/dfa.c
index a53aed01..9c3901a6 100644
--- a/dfa.c
+++ b/dfa.c
@@ -3082,17 +3082,7 @@ match_mb_charset (struct dfa *d, state_num s, position pos,
int context;
/* Check syntax bits. */
- if (wc == (wchar_t) eolbyte)
- {
- if (!(syntax_bits & RE_DOT_NEWLINE))
- return 0;
- }
- else if (wc == (wchar_t) '\0')
- {
- if (syntax_bits & RE_DOT_NOT_NULL)
- return 0;
- }
- else if (wc == WEOF)
+ if (wc == WEOF)
return 0;
context = wchar_context (wc);
@@ -3422,20 +3412,20 @@ dfaexec_main (struct dfa *d, char const *begin, char *end,
continue;
}
- /* Falling back to the glibc matcher in this case gives
- better performance (up to 25% better on [a-z], for
- example) and enables support for collating symbols and
- equivalence classes. */
- if (d->states[s].has_mbcset && backref)
- {
- *backref = 1;
- goto done;
- }
-
/* The following code is used twice.
Use a macro to avoid the risk that they diverge. */
#define State_transition() \
do { \
+ /* Falling back to the glibc matcher in this case gives \
+ better performance (up to 25% better on [a-z], for \
+ example) and enables support for collating symbols and \
+ equivalence classes. */ \
+ if (d->states[s].has_mbcset && backref) \
+ { \
+ *backref = 1; \
+ goto done; \
+ } \
+ \
/* Can match with a multibyte character (and multi-character \
collating element). Transition table might be updated. */ \
s = transit_state (d, s, &p, (unsigned char *) end); \
@@ -3472,6 +3462,7 @@ dfaexec_main (struct dfa *d, char const *begin, char *end,
{
while (t[*p] == 0)
p++;
+ s1 = 0;
s = t[*p++];
}