| 2615 |
PCRE_NEWLINE_BITS) |
PCRE_NEWLINE_BITS) |
| 2616 |
{ |
{ |
| 2617 |
case 0: newline = NEWLINE; break; /* Compile-time default */ |
case 0: newline = NEWLINE; break; /* Compile-time default */ |
| 2618 |
case PCRE_NEWLINE_CR: newline = '\r'; break; |
case PCRE_NEWLINE_CR: newline = CHAR_CR; break; |
| 2619 |
case PCRE_NEWLINE_LF: newline = '\n'; break; |
case PCRE_NEWLINE_LF: newline = CHAR_NL; break; |
| 2620 |
case PCRE_NEWLINE_CR+ |
case PCRE_NEWLINE_CR+ |
| 2621 |
PCRE_NEWLINE_LF: newline = ('\r' << 8) | '\n'; break; |
PCRE_NEWLINE_LF: newline = (CHAR_CR << 8) | CHAR_NL; break; |
| 2622 |
case PCRE_NEWLINE_ANY: newline = -1; break; |
case PCRE_NEWLINE_ANY: newline = -1; break; |
| 2623 |
case PCRE_NEWLINE_ANYCRLF: newline = -2; break; |
case PCRE_NEWLINE_ANYCRLF: newline = -2; break; |
| 2624 |
default: return PCRE_ERROR_BADNEWLINE; |
default: return PCRE_ERROR_BADNEWLINE; |
| 2797 |
ANYCRLF, and we are now at a LF, advance the match position by one |
ANYCRLF, and we are now at a LF, advance the match position by one |
| 2798 |
more character. */ |
more character. */ |
| 2799 |
|
|
| 2800 |
if (current_subject[-1] == '\r' && |
if (current_subject[-1] == CHAR_CR && |
| 2801 |
(md->nltype == NLTYPE_ANY || md->nltype == NLTYPE_ANYCRLF) && |
(md->nltype == NLTYPE_ANY || md->nltype == NLTYPE_ANYCRLF) && |
| 2802 |
current_subject < end_subject && |
current_subject < end_subject && |
| 2803 |
*current_subject == '\n') |
*current_subject == CHAR_NL) |
| 2804 |
current_subject++; |
current_subject++; |
| 2805 |
} |
} |
| 2806 |
} |
} |
| 2916 |
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 |
| 2917 |
or ANY or ANYCRLF, advance the match position by one more character. */ |
or ANY or ANYCRLF, advance the match position by one more character. */ |
| 2918 |
|
|
| 2919 |
if (current_subject[-1] == '\r' && |
if (current_subject[-1] == CHAR_CR && |
| 2920 |
current_subject < end_subject && |
current_subject < end_subject && |
| 2921 |
*current_subject == '\n' && |
*current_subject == CHAR_NL && |
| 2922 |
(re->flags & PCRE_HASCRORLF) == 0 && |
(re->flags & PCRE_HASCRORLF) == 0 && |
| 2923 |
(md->nltype == NLTYPE_ANY || |
(md->nltype == NLTYPE_ANY || |
| 2924 |
md->nltype == NLTYPE_ANYCRLF || |
md->nltype == NLTYPE_ANYCRLF || |