Revision: 694
http://vcs.pcre.org/viewvc?view=rev&revision=694
Author: zherczeg
Date: 2011-09-16 16:52:05 +0100 (Fri, 16 Sep 2011)
Log Message:
-----------
JIT must support special NEWLINE constants
Modified Paths:
--------------
code/trunk/pcre_jit_compile.c
Modified: code/trunk/pcre_jit_compile.c
===================================================================
--- code/trunk/pcre_jit_compile.c 2011-09-12 15:59:57 UTC (rev 693)
+++ code/trunk/pcre_jit_compile.c 2011-09-16 15:52:05 UTC (rev 694)
@@ -5969,7 +5969,15 @@
common->nltype = NLTYPE_FIXED;
switch(re->options & PCRE_NEWLINE_BITS)
{
- case 0: common->newline = NEWLINE; break; /* Compile-time default */
+ case 0:
+ /* Compile-time default */
+ switch (NEWLINE)
+ {
+ case -1: common->newline = (CHAR_CR << 8) | CHAR_NL; common->nltype = NLTYPE_ANY; break;
+ case -2: common->newline = (CHAR_CR << 8) | CHAR_NL; common->nltype = NLTYPE_ANYCRLF; break;
+ default: common->newline = NEWLINE; break;
+ }
+ break;
case PCRE_NEWLINE_CR: common->newline = CHAR_CR; break;
case PCRE_NEWLINE_LF: common->newline = CHAR_NL; break;
case PCRE_NEWLINE_CR+