4562 |
(pcre_uint32)options) & PCRE_NEWLINE_BITS) |
(pcre_uint32)options) & PCRE_NEWLINE_BITS) |
4563 |
{ |
{ |
4564 |
case 0: newline = NEWLINE; break; /* Compile-time default */ |
case 0: newline = NEWLINE; break; /* Compile-time default */ |
4565 |
case PCRE_NEWLINE_CR: newline = '\r'; break; |
case PCRE_NEWLINE_CR: newline = CHAR_CR; break; |
4566 |
case PCRE_NEWLINE_LF: newline = '\n'; break; |
case PCRE_NEWLINE_LF: newline = CHAR_NL; break; |
4567 |
case PCRE_NEWLINE_CR+ |
case PCRE_NEWLINE_CR+ |
4568 |
PCRE_NEWLINE_LF: newline = ('\r' << 8) | '\n'; break; |
PCRE_NEWLINE_LF: newline = (CHAR_CR << 8) | CHAR_NL; break; |
4569 |
case PCRE_NEWLINE_ANY: newline = -1; break; |
case PCRE_NEWLINE_ANY: newline = -1; break; |
4570 |
case PCRE_NEWLINE_ANYCRLF: newline = -2; break; |
case PCRE_NEWLINE_ANYCRLF: newline = -2; break; |
4571 |
default: return PCRE_ERROR_BADNEWLINE; |
default: return PCRE_ERROR_BADNEWLINE; |
4785 |
and we are now at a LF, advance the match position by one more character. |
and we are now at a LF, advance the match position by one more character. |
4786 |
*/ |
*/ |
4787 |
|
|
4788 |
if (start_match[-1] == '\r' && |
if (start_match[-1] == CHAR_CR && |
4789 |
(md->nltype == NLTYPE_ANY || md->nltype == NLTYPE_ANYCRLF) && |
(md->nltype == NLTYPE_ANY || md->nltype == NLTYPE_ANYCRLF) && |
4790 |
start_match < end_subject && |
start_match < end_subject && |
4791 |
*start_match == '\n') |
*start_match == CHAR_NL) |
4792 |
start_match++; |
start_match++; |
4793 |
} |
} |
4794 |
} |
} |
4942 |
not contain any explicit matches for \r or \n, and the newline option is CRLF |
not contain any explicit matches for \r or \n, and the newline option is CRLF |
4943 |
or ANY or ANYCRLF, advance the match position by one more character. */ |
or ANY or ANYCRLF, advance the match position by one more character. */ |
4944 |
|
|
4945 |
if (start_match[-1] == '\r' && |
if (start_match[-1] == CHAR_CR && |
4946 |
start_match < end_subject && |
start_match < end_subject && |
4947 |
*start_match == '\n' && |
*start_match == CHAR_NL && |
4948 |
(re->flags & PCRE_HASCRORLF) == 0 && |
(re->flags & PCRE_HASCRORLF) == 0 && |
4949 |
(md->nltype == NLTYPE_ANY || |
(md->nltype == NLTYPE_ANY || |
4950 |
md->nltype == NLTYPE_ANYCRLF || |
md->nltype == NLTYPE_ANYCRLF || |