summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>2011-09-16 15:52:05 +0000
committerzherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>2011-09-16 15:52:05 +0000
commit884af61916c873a7a8823462320642231d384a0c (patch)
treea402d37f90af47fae18c0c0770af2e85a4e2b95d
parent59a5ee2055c2150abf29f80b7d0e64de6ba7a1d3 (diff)
downloadpcre-884af61916c873a7a8823462320642231d384a0c.tar.gz
JIT must support special NEWLINE constants
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@694 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r--pcre_jit_compile.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/pcre_jit_compile.c b/pcre_jit_compile.c
index f49ec99..b5edfb4 100644
--- a/pcre_jit_compile.c
+++ b/pcre_jit_compile.c
@@ -5969,7 +5969,15 @@ common->lcc = (sljit_w)(tables + lcc_offset);
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+