Revision: 1464
http://vcs.pcre.org/viewvc?view=rev&revision=1464
Author: zherczeg
Date: 2014-03-14 11:45:56 +0000 (Fri, 14 Mar 2014)
Log Message:
-----------
Disable incorrect error messages reported by the JIT test program.
Modified Paths:
--------------
code/trunk/ChangeLog
code/trunk/pcre_jit_test.c
Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog 2014-03-13 11:16:17 UTC (rev 1463)
+++ code/trunk/ChangeLog 2014-03-14 11:45:56 UTC (rev 1464)
@@ -110,7 +110,10 @@
behaved like a min-possessive qualifier, and, for example, /a{1,3}b/U did
not match "ab".
+23. When UTF was disabled, the JIT program reported some incorrect compile
+ errors. These messages are silenced now.
+
Version 8.34 15-December-2013
-----------------------------
Modified: code/trunk/pcre_jit_test.c
===================================================================
--- code/trunk/pcre_jit_test.c 2014-03-13 11:16:17 UTC (rev 1463)
+++ code/trunk/pcre_jit_test.c 2014-03-14 11:45:56 UTC (rev 1464)
@@ -1118,7 +1118,7 @@
const char *error;
char *cpu_info;
int i, err_offs;
- int is_successful, is_ascii_pattern, is_ascii_input;
+ int is_successful, is_ascii;
int total = 0;
int successful = 0;
int successful_row = 0;
@@ -1199,13 +1199,9 @@
while (current->pattern) {
/* printf("\nPattern: %s :\n", current->pattern); */
total++;
- if (current->start_offset & F_PROPERTY) {
- is_ascii_pattern = 0;
- is_ascii_input = 0;
- } else {
- is_ascii_pattern = check_ascii(current->pattern);
- is_ascii_input = check_ascii(current->input);
- }
+ is_ascii = 0;
+ if (!(current->start_offset & F_PROPERTY))
+ is_ascii = check_ascii(current->pattern) && check_ascii(current->input);
if (current->flags & PCRE_PARTIAL_SOFT)
study_mode = PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE;
@@ -1237,7 +1233,7 @@
re8 = NULL;
}
extra8->flags |= PCRE_EXTRA_MARK;
- } else if (((utf && ucp) || is_ascii_pattern) && !(current->start_offset & F_NO8))
+ } else if (((utf && ucp) || is_ascii) && !(current->start_offset & F_NO8))
printf("\n8 bit: Cannot compile pattern \"%s\": %s\n", current->pattern, error);
#endif
#ifdef SUPPORT_PCRE16
@@ -1268,7 +1264,7 @@
re16 = NULL;
}
extra16->flags |= PCRE_EXTRA_MARK;
- } else if (((utf && ucp) || is_ascii_pattern) && !(current->start_offset & F_NO16))
+ } else if (((utf && ucp) || is_ascii) && !(current->start_offset & F_NO16))
printf("\n16 bit: Cannot compile pattern \"%s\": %s\n", current->pattern, error);
#endif
#ifdef SUPPORT_PCRE32
@@ -1299,7 +1295,7 @@
re32 = NULL;
}
extra32->flags |= PCRE_EXTRA_MARK;
- } else if (((utf && ucp) || is_ascii_pattern) && !(current->start_offset & F_NO32))
+ } else if (((utf && ucp) || is_ascii) && !(current->start_offset & F_NO32))
printf("\n32 bit: Cannot compile pattern \"%s\": %s\n", current->pattern, error);
#endif
@@ -1607,7 +1603,7 @@
if (is_successful) {
#ifdef SUPPORT_PCRE8
- if (!(current->start_offset & F_NO8) && ((utf && ucp) || is_ascii_input)) {
+ if (!(current->start_offset & F_NO8) && ((utf && ucp) || is_ascii)) {
if (return_value8[0] < 0 && !(current->start_offset & F_NOMATCH)) {
printf("8 bit: Test should match: [%d] '%s' @ '%s'\n",
total, current->pattern, current->input);
@@ -1622,7 +1618,7 @@
}
#endif
#ifdef SUPPORT_PCRE16
- if (!(current->start_offset & F_NO16) && ((utf && ucp) || is_ascii_input)) {
+ if (!(current->start_offset & F_NO16) && ((utf && ucp) || is_ascii)) {
if (return_value16[0] < 0 && !(current->start_offset & F_NOMATCH)) {
printf("16 bit: Test should match: [%d] '%s' @ '%s'\n",
total, current->pattern, current->input);
@@ -1637,7 +1633,7 @@
}
#endif
#ifdef SUPPORT_PCRE32
- if (!(current->start_offset & F_NO32) && ((utf && ucp) || is_ascii_input)) {
+ if (!(current->start_offset & F_NO32) && ((utf && ucp) || is_ascii)) {
if (return_value32[0] < 0 && !(current->start_offset & F_NOMATCH)) {
printf("32 bit: Test should match: [%d] '%s' @ '%s'\n",
total, current->pattern, current->input);