613 |
{ |
{ |
614 |
clen = 1; /* Number of data items in the character */ |
clen = 1; /* Number of data items in the character */ |
615 |
#ifdef SUPPORT_UTF |
#ifdef SUPPORT_UTF |
616 |
if (utf) { GETCHARLEN(c, ptr, clen); } else |
GETCHARLENTEST(c, ptr, clen); |
617 |
#endif /* SUPPORT_UTF */ |
#else |
618 |
c = *ptr; |
c = *ptr; |
619 |
|
#endif /* SUPPORT_UTF */ |
620 |
} |
} |
621 |
else |
else |
622 |
{ |
{ |
1438 |
goto ANYNL01; |
goto ANYNL01; |
1439 |
|
|
1440 |
case CHAR_CR: |
case CHAR_CR: |
1441 |
if (ptr + 1 < end_subject && ptr[1] == CHAR_LF) ncount = 1; |
if (ptr + 1 < end_subject && RAWUCHARTEST(ptr + 1) == CHAR_LF) ncount = 1; |
1442 |
/* Fall through */ |
/* Fall through */ |
1443 |
|
|
1444 |
ANYNL01: |
ANYNL01: |
1693 |
goto ANYNL02; |
goto ANYNL02; |
1694 |
|
|
1695 |
case CHAR_CR: |
case CHAR_CR: |
1696 |
if (ptr + 1 < end_subject && ptr[1] == CHAR_LF) ncount = 1; |
if (ptr + 1 < end_subject && RAWUCHARTEST(ptr + 1) == CHAR_LF) ncount = 1; |
1697 |
/* Fall through */ |
/* Fall through */ |
1698 |
|
|
1699 |
ANYNL02: |
ANYNL02: |
1949 |
goto ANYNL03; |
goto ANYNL03; |
1950 |
|
|
1951 |
case CHAR_CR: |
case CHAR_CR: |
1952 |
if (ptr + 1 < end_subject && ptr[1] == CHAR_LF) ncount = 1; |
if (ptr + 1 < end_subject && RAWUCHARTEST(ptr + 1) == CHAR_LF) ncount = 1; |
1953 |
/* Fall through */ |
/* Fall through */ |
1954 |
|
|
1955 |
ANYNL03: |
ANYNL03: |
2147 |
if ((md->moptions & PCRE_PARTIAL_HARD) != 0) |
if ((md->moptions & PCRE_PARTIAL_HARD) != 0) |
2148 |
reset_could_continue = TRUE; |
reset_could_continue = TRUE; |
2149 |
} |
} |
2150 |
else if (ptr[1] == CHAR_LF) |
else if (RAWUCHARTEST(ptr + 1) == CHAR_LF) |
2151 |
{ |
{ |
2152 |
ADD_NEW_DATA(-(state_offset + 1), 0, 1); |
ADD_NEW_DATA(-(state_offset + 1), 0, 1); |
2153 |
} |
} |
2261 |
if (count > 0) { ADD_ACTIVE(state_offset + dlen + 1, 0); } |
if (count > 0) { ADD_ACTIVE(state_offset + dlen + 1, 0); } |
2262 |
if (clen > 0) |
if (clen > 0) |
2263 |
{ |
{ |
2264 |
unsigned int otherd = NOTACHAR; |
pcre_uint32 otherd = NOTACHAR; |
2265 |
if (caseless) |
if (caseless) |
2266 |
{ |
{ |
2267 |
#ifdef SUPPORT_UTF |
#ifdef SUPPORT_UTF |
2308 |
ADD_ACTIVE(state_offset + dlen + 1, 0); |
ADD_ACTIVE(state_offset + dlen + 1, 0); |
2309 |
if (clen > 0) |
if (clen > 0) |
2310 |
{ |
{ |
2311 |
unsigned int otherd = NOTACHAR; |
pcre_uint32 otherd = NOTACHAR; |
2312 |
if (caseless) |
if (caseless) |
2313 |
{ |
{ |
2314 |
#ifdef SUPPORT_UTF |
#ifdef SUPPORT_UTF |
2353 |
ADD_ACTIVE(state_offset + dlen + 1, 0); |
ADD_ACTIVE(state_offset + dlen + 1, 0); |
2354 |
if (clen > 0) |
if (clen > 0) |
2355 |
{ |
{ |
2356 |
unsigned int otherd = NOTACHAR; |
pcre_uint32 otherd = NOTACHAR; |
2357 |
if (caseless) |
if (caseless) |
2358 |
{ |
{ |
2359 |
#ifdef SUPPORT_UTF |
#ifdef SUPPORT_UTF |
2390 |
count = current_state->count; /* Number already matched */ |
count = current_state->count; /* Number already matched */ |
2391 |
if (clen > 0) |
if (clen > 0) |
2392 |
{ |
{ |
2393 |
unsigned int otherd = NOTACHAR; |
pcre_uint32 otherd = NOTACHAR; |
2394 |
if (caseless) |
if (caseless) |
2395 |
{ |
{ |
2396 |
#ifdef SUPPORT_UTF |
#ifdef SUPPORT_UTF |
2434 |
count = current_state->count; /* Number already matched */ |
count = current_state->count; /* Number already matched */ |
2435 |
if (clen > 0) |
if (clen > 0) |
2436 |
{ |
{ |
2437 |
unsigned int otherd = NOTACHAR; |
pcre_uint32 otherd = NOTACHAR; |
2438 |
if (caseless) |
if (caseless) |
2439 |
{ |
{ |
2440 |
#ifdef SUPPORT_UTF |
#ifdef SUPPORT_UTF |
3379 |
if (has_first_char) |
if (has_first_char) |
3380 |
{ |
{ |
3381 |
if (first_char != first_char2) |
if (first_char != first_char2) |
3382 |
|
{ |
3383 |
|
pcre_uchar csc; |
3384 |
while (current_subject < end_subject && |
while (current_subject < end_subject && |
3385 |
*current_subject != first_char && *current_subject != first_char2) |
(csc = RAWUCHARTEST(current_subject)) != first_char && csc != first_char2) |
3386 |
current_subject++; |
current_subject++; |
3387 |
|
} |
3388 |
else |
else |
3389 |
while (current_subject < end_subject && |
while (current_subject < end_subject && |
3390 |
*current_subject != first_char) |
RAWUCHARTEST(current_subject) != first_char) |
3391 |
current_subject++; |
current_subject++; |
3392 |
} |
} |
3393 |
|
|
3417 |
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 |
3418 |
more character. */ |
more character. */ |
3419 |
|
|
3420 |
if (current_subject[-1] == CHAR_CR && |
if (RAWUCHARTEST(current_subject - 1) == CHAR_CR && |
3421 |
(md->nltype == NLTYPE_ANY || md->nltype == NLTYPE_ANYCRLF) && |
(md->nltype == NLTYPE_ANY || md->nltype == NLTYPE_ANYCRLF) && |
3422 |
current_subject < end_subject && |
current_subject < end_subject && |
3423 |
*current_subject == CHAR_NL) |
RAWUCHARTEST(current_subject) == CHAR_NL) |
3424 |
current_subject++; |
current_subject++; |
3425 |
} |
} |
3426 |
} |
} |
3431 |
{ |
{ |
3432 |
while (current_subject < end_subject) |
while (current_subject < end_subject) |
3433 |
{ |
{ |
3434 |
register unsigned int c = *current_subject; |
register pcre_uint32 c = RAWUCHARTEST(current_subject); |
3435 |
#ifndef COMPILE_PCRE8 |
#ifndef COMPILE_PCRE8 |
3436 |
if (c > 255) c = 255; |
if (c > 255) c = 255; |
3437 |
#endif |
#endif |
3497 |
{ |
{ |
3498 |
while (p < end_subject) |
while (p < end_subject) |
3499 |
{ |
{ |
3500 |
register pcre_uint32 pp = *p++; |
register pcre_uint32 pp = RAWUCHARINCTEST(p); |
3501 |
if (pp == req_char || pp == req_char2) { p--; break; } |
if (pp == req_char || pp == req_char2) { p--; break; } |
3502 |
} |
} |
3503 |
} |
} |
3505 |
{ |
{ |
3506 |
while (p < end_subject) |
while (p < end_subject) |
3507 |
{ |
{ |
3508 |
if (*p++ == req_char) { p--; break; } |
if (RAWUCHARINCTEST(p) == req_char) { p--; break; } |
3509 |
} |
} |
3510 |
} |
} |
3511 |
|
|
3563 |
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 |
3564 |
or ANY or ANYCRLF, advance the match position by one more character. */ |
or ANY or ANYCRLF, advance the match position by one more character. */ |
3565 |
|
|
3566 |
if (current_subject[-1] == CHAR_CR && |
if (RAWUCHARTEST(current_subject - 1) == CHAR_CR && |
3567 |
current_subject < end_subject && |
current_subject < end_subject && |
3568 |
*current_subject == CHAR_NL && |
RAWUCHARTEST(current_subject) == CHAR_NL && |
3569 |
(re->flags & PCRE_HASCRORLF) == 0 && |
(re->flags & PCRE_HASCRORLF) == 0 && |
3570 |
(md->nltype == NLTYPE_ANY || |
(md->nltype == NLTYPE_ANY || |
3571 |
md->nltype == NLTYPE_ANYCRLF || |
md->nltype == NLTYPE_ANYCRLF || |