aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2011-05-08 20:28:13 +0300
committerArnold D. Robbins <arnold@skeeve.com>2011-05-08 20:28:13 +0300
commit7c20cc42ca1b77a2f3caddab543839efe897eeb0 (patch)
tree4da12185d28e7ad69cf46484ba4a01b1f3020bf8
parente2b1395c84d6073b064dac58ccb28e1784577e75 (diff)
downloadegawk-7c20cc42ca1b77a2f3caddab543839efe897eeb0.tar.gz
egawk-7c20cc42ca1b77a2f3caddab543839efe897eeb0.tar.bz2
egawk-7c20cc42ca1b77a2f3caddab543839efe897eeb0.zip
Sync dfa.c and regex.h with their upstreams.
-rw-r--r--ChangeLog6
-rw-r--r--dfa.c3
-rw-r--r--regex.h12
3 files changed, 18 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index c1275dba..fde2cc68 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sun May 8 20:27:27 2011 Arnold D. Robbins <arnold@skeeve.com>
+
+ * dfa.c: Sync with GNU grep.
+ * regex.h: Sync with GLIBC in preparation for submitting updates
+ back.
+
Thu May 5 21:22:44 2011 Arnold D. Robbins <arnold@skeeve.com>
* eval.c (r_interpret): PROCINFO sorting only takes effect
diff --git a/dfa.c b/dfa.c
index 439f9647..650ceac0 100644
--- a/dfa.c
+++ b/dfa.c
@@ -598,7 +598,8 @@ setbit_case_fold (
else
{
#if MBS_SUPPORT
- if (wctob ((unsigned char)b) == b)
+ int b2 = wctob ((unsigned char) b);
+ if (b2 == EOF || b2 == b)
#endif
setbit (b, c);
}
diff --git a/regex.h b/regex.h
index 86f875c2..d54876a9 100644
--- a/regex.h
+++ b/regex.h
@@ -155,10 +155,18 @@ typedef unsigned long int reg_syntax_t;
If not set, then the GNU regex operators are recognized. */
# define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1)
+/* If this bit is set, turn on internal regex debugging.
+ If not set, and debugging was on, turn it off.
+ This only works if regex.c is compiled -DDEBUG.
+ We define this bit always, so that all that's needed to turn on
+ debugging is to recompile regex.c; the calling code can always have
+ this bit set, and it won't affect anything in the normal case. */
+# define RE_DEBUG (RE_NO_GNU_OPS << 1)
+
/* If this bit is set, a syntactically invalid interval is treated as
a string of ordinary characters. For example, the ERE 'a{1' is
treated as 'a\{1'. */
-# define RE_INVALID_INTERVAL_ORD (RE_NO_GNU_OPS << 1)
+# define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1)
/* If this bit is set, then ignore case when matching.
If not set, then case is significant. */
@@ -175,7 +183,7 @@ typedef unsigned long int reg_syntax_t;
/* If this bit is set, then no_sub will be set to 1 during
re_compile_pattern. */
-#define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1)
+# define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1)
#endif
/* This global variable defines the particular regexp syntax to use (for