summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--pcre_compile.c4
-rw-r--r--pcre_internal.h4
-rw-r--r--pcretest.c4
4 files changed, 14 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 38e49d7..c39ab9a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -51,6 +51,12 @@ Version 8.38 xx-xxx-xxxx
11. If a non-capturing group containing a conditional group that could match
an empty string was repeated, it was not identified as matching an empty
string itself. For example: /^(?:(?(1)x|)+)+$()/.
+
+12. In an EBCDIC environment, pcretest was mishandling the escape sequences
+ \a and \e in test subject lines.
+
+13. In an EBCDIC environment, \a in a pattern was converted to the ASCII
+ instead of the EBCDIC value.
Version 8.37 28-April-2015
diff --git a/pcre_compile.c b/pcre_compile.c
index 4df571b..be10086 100644
--- a/pcre_compile.c
+++ b/pcre_compile.c
@@ -174,7 +174,7 @@ static const short int escapes[] = {
-ESC_Z, CHAR_LEFT_SQUARE_BRACKET,
CHAR_BACKSLASH, CHAR_RIGHT_SQUARE_BRACKET,
CHAR_CIRCUMFLEX_ACCENT, CHAR_UNDERSCORE,
- CHAR_GRAVE_ACCENT, 7,
+ CHAR_GRAVE_ACCENT, ESC_a,
-ESC_b, 0,
-ESC_d, ESC_e,
ESC_f, 0,
@@ -202,7 +202,7 @@ static const short int escapes[] = {
/* 68 */ 0, 0, '|', ',', '%', '_', '>', '?',
/* 70 */ 0, 0, 0, 0, 0, 0, 0, 0,
/* 78 */ 0, '`', ':', '#', '@', '\'', '=', '"',
-/* 80 */ 0, 7, -ESC_b, 0, -ESC_d, ESC_e, ESC_f, 0,
+/* 80 */ 0, ESC_a, -ESC_b, 0, -ESC_d, ESC_e, ESC_f, 0,
/* 88 */-ESC_h, 0, 0, '{', 0, 0, 0, 0,
/* 90 */ 0, 0, -ESC_k, 0, 0, ESC_n, 0, -ESC_p,
/* 98 */ 0, ESC_r, 0, '}', 0, 0, 0, 0,
diff --git a/pcre_internal.h b/pcre_internal.h
index dd0ac7f..d6c095b 100644
--- a/pcre_internal.h
+++ b/pcre_internal.h
@@ -1762,6 +1762,10 @@ only. */
/* Escape items that are just an encoding of a particular data value. */
+#ifndef ESC_a
+#define ESC_a CHAR_BEL
+#endif
+
#ifndef ESC_e
#define ESC_e CHAR_ESC
#endif
diff --git a/pcretest.c b/pcretest.c
index 27107ca..488e419 100644
--- a/pcretest.c
+++ b/pcretest.c
@@ -4621,9 +4621,9 @@ while (!done)
else switch ((c = *p++))
{
- case 'a': c = 7; break;
+ case 'a': c = CHAR_BEL; break;
case 'b': c = '\b'; break;
- case 'e': c = 27; break;
+ case 'e': c = CHAR_ESC; break;
case 'f': c = '\f'; break;
case 'n': c = '\n'; break;
case 'r': c = '\r'; break;