Lines Matching refs:md

48 #define NLBLOCK md             /* Block containing newline information */
131 pchars(const pcre_uchar *p, int length, BOOL is_subject, match_data *md) in pchars() argument
134 BOOL utf = md->utf; in pchars()
135 if (is_subject && length > md->end_subject - p) length = md->end_subject - p; in pchars()
165 match_ref(int offset, register PCRE_PUCHAR eptr, int length, match_data *md, in match_ref() argument
169 register PCRE_PUCHAR p = md->start_subject + md->offset_vector[offset]; in match_ref()
171 BOOL utf = md->utf; in match_ref()
175 if (eptr >= md->end_subject) in match_ref()
180 pchars(eptr, length, TRUE, md); in match_ref()
183 pchars(p, length, FALSE, md); in match_ref()
215 if (eptr >= md->end_subject) return -2; /* Partial match */ in match_ref()
239 if (eptr >= md->end_subject) return -2; /* Partial match */ in match_ref()
242 if (TABLE_GET(cp, md->lcc, cp) != TABLE_GET(cc, md->lcc, cc)) return -1; in match_ref()
256 if (eptr >= md->end_subject) return -2; /* Partial match */ in match_ref()
474 if (md->partial != 0 && eptr >= md->end_subject && \
475 eptr > md->start_used_ptr) \
477 md->hitend = TRUE; \
478 if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL); \
482 if (md->partial != 0 && eptr > md->start_used_ptr) \
484 md->hitend = TRUE; \
485 if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL); \
514 PCRE_PUCHAR mstart, int offset_top, match_data *md, eptrblock *eptrb, in match() argument
538 heapframe *frame = (heapframe *)md->match_frames_base; in match()
716 utf = md->utf; /* Local copy of the flag */ in match()
724 if (md->match_call_count++ >= md->match_limit) RRETURN(PCRE_ERROR_MATCHLIMIT); in match()
725 if (rdepth >= md->match_limit_recursion) RRETURN(PCRE_ERROR_RECURSIONLIMIT); in match()
739 if (md->match_function_type == MATCH_CBEGROUP) in match()
744 md->match_function_type = 0; in match()
757 md->nomatch_mark = ecode + 2; in match()
758 md->mark = NULL; /* In case previously set by assertion */ in match()
759 RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode] + ecode[1], offset_top, md, in match()
762 md->mark == NULL) md->mark = ecode + 2; in match()
772 STRCMP_UC_UC_TEST(ecode + 2, md->start_match_ptr) == 0) in match()
774 md->start_match_ptr = eptr; in match()
783 RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md, in match()
789 RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md, in match()
795 md->nomatch_mark = ecode + 2; in match()
796 md->mark = NULL; /* In case previously set by assertion */ in match()
797 RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode] + ecode[1], offset_top, md, in match()
800 md->mark == NULL) md->mark = ecode + 2; in match()
805 RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md, in match()
808 md->start_match_ptr = eptr; /* Pass back current position */ in match()
820 md->skip_arg_count++; in match()
821 if (md->skip_arg_count <= md->ignore_skip_arg) in match()
826 RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode] + ecode[1], offset_top, md, in match()
835 md->start_match_ptr = ecode + 2; in match()
843 RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md, in match()
846 md->start_match_ptr = ecode; in match()
850 md->nomatch_mark = ecode + 2; in match()
851 md->mark = NULL; /* In case previously set by assertion */ in match()
853 md, eptrb, RM58); in match()
855 md->mark == NULL) md->mark = ecode + 2; in match()
857 md->start_match_ptr = ecode; in match()
876 save_mark = md->mark; in match()
879 RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, eptrb, RM64); in match()
882 mstart = md->start_match_ptr; in match()
888 if (md->start_match_ptr < next && in match()
895 md->mark = save_mark; in match()
908 offset_top = md->end_offset_top; in match()
909 eptr = md->end_match_ptr; in match()
928 RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, eptrb, RM65); in match()
935 RMATCH(eptr, prev, offset_top, md, eptrb, RM66); in match()
964 pchars(eptr, 16, TRUE, md); in match()
968 if (offset < md->offset_max) in match()
970 save_offset1 = md->offset_vector[offset]; in match()
971 save_offset2 = md->offset_vector[offset+1]; in match()
972 save_offset3 = md->offset_vector[md->offset_end - number]; in match()
973 save_capture_last = md->capture_last; in match()
974 save_mark = md->mark; in match()
977 md->offset_vector[md->offset_end - number] = in match()
978 (int)(eptr - md->start_subject); in match()
982 if (op >= OP_SBRA) md->match_function_type = MATCH_CBEGROUP; in match()
983 RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md, in match()
1001 if (md->start_match_ptr < next && in match()
1009 md->capture_last = save_capture_last; in match()
1011 md->mark = save_mark; in match()
1016 md->offset_vector[offset] = save_offset1; in match()
1017 md->offset_vector[offset+1] = save_offset2; in match()
1018 md->offset_vector[md->offset_end - number] = save_offset3; in match()
1064 md->match_function_type = MATCH_CBEGROUP; in match()
1070 else if (!md->hasthen && ecode[GET(ecode, 1)] != OP_ALT) in match()
1078 save_mark = md->mark; in match()
1079 save_capture_last = md->capture_last; in match()
1080 RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md, eptrb, in match()
1089 if (md->start_match_ptr < next && in match()
1104 if (md->once_target == scode) rrc = MATCH_NOMATCH; in match()
1109 md->mark = save_mark; in match()
1111 md->capture_last = save_capture_last; in match()
1135 pchars(eptr, 16, TRUE, md); in match()
1139 if (offset >= md->offset_max) goto POSSESSIVE_NON_CAPTURE; in match()
1142 code_offset = (int)(ecode - md->start_code); in match()
1144 save_offset1 = md->offset_vector[offset]; in match()
1145 save_offset2 = md->offset_vector[offset+1]; in match()
1146 save_offset3 = md->offset_vector[md->offset_end - number]; in match()
1147 save_capture_last = md->capture_last; in match()
1162 md->offset_vector[md->offset_end - number] = in match()
1163 (int)(eptr - md->start_subject); in match()
1164 if (op >= OP_SBRA) md->match_function_type = MATCH_CBEGROUP; in match()
1165 RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md, in match()
1169 offset_top = md->end_offset_top; in match()
1170 ecode = md->start_code + code_offset; in match()
1171 save_capture_last = md->capture_last; in match()
1173 mstart = md->start_match_ptr; /* In case \K changed it */ in match()
1174 if (eptr == md->end_match_ptr) /* Matched an empty string */ in match()
1179 eptr = md->end_match_ptr; in match()
1189 if (md->start_match_ptr < next && in match()
1195 md->capture_last = save_capture_last; in match()
1202 md->offset_vector[offset] = save_offset1; in match()
1203 md->offset_vector[offset+1] = save_offset2; in match()
1204 md->offset_vector[md->offset_end - number] = save_offset3; in match()
1226 code_offset = (int)(ecode - md->start_code); in match()
1227 save_capture_last = md->capture_last; in match()
1231 if (op >= OP_SBRA) md->match_function_type = MATCH_CBEGROUP; in match()
1232 RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md, in match()
1236 offset_top = md->end_offset_top; in match()
1237 ecode = md->start_code + code_offset; in match()
1239 mstart = md->start_match_ptr; /* In case \K reset it */ in match()
1240 if (eptr == md->end_match_ptr) /* Matched an empty string */ in match()
1245 eptr = md->end_match_ptr; in match()
1255 if (md->start_match_ptr < next && in match()
1263 md->capture_last = save_capture_last; in match()
1301 cb.offset_vector = md->offset_vector; in match()
1303 cb.subject = (PCRE_SPTR)md->start_subject; in match()
1305 cb.subject = (PCRE_SPTR16)md->start_subject; in match()
1307 cb.subject = (PCRE_SPTR32)md->start_subject; in match()
1309 cb.subject_length = (int)(md->end_subject - md->start_subject); in match()
1310 cb.start_match = (int)(mstart - md->start_subject); in match()
1311 cb.current_position = (int)(eptr - md->start_subject); in match()
1315 cb.capture_last = md->capture_last & CAPLMASK; in match()
1318 cb.callout_data = md->callout_data; in match()
1319 cb.mark = md->nomatch_mark; in match()
1337 if (md->recursive != NULL) /* Not recursing => FALSE */ in match()
1340 condition = (recno == RREF_ANY || recno == md->recursive->group_num); in match()
1345 if (md->recursive != NULL) in match()
1348 pcre_uchar *slot = md->name_table + GET2(ecode, 1) * md->name_entry_size; in match()
1352 condition = recno == md->recursive->group_num; in match()
1354 slot += md->name_entry_size; in match()
1361 condition = offset < offset_top && md->offset_vector[offset] >= 0; in match()
1367 pcre_uchar *slot = md->name_table + GET2(ecode, 1) * md->name_entry_size; in match()
1371 condition = offset < offset_top && md->offset_vector[offset] >= 0; in match()
1373 slot += md->name_entry_size; in match()
1387 md->match_function_type = MATCH_CONDASSERT; in match()
1388 RMATCH(eptr, ecode, offset_top, md, NULL, RM3); in match()
1391 if (md->end_offset_top > offset_top) in match()
1392 offset_top = md->end_offset_top; /* Captures may have happened */ in match()
1438 md->match_function_type = MATCH_CBEGROUP; in match()
1439 RMATCH(eptr, ecode, offset_top, md, eptrb, RM49); in match()
1463 md->capture_last = (md->capture_last & OVFLMASK) | number; in match()
1464 if (offset >= md->offset_max) md->capture_last |= OVFLBIT; else in match()
1466 md->offset_vector[offset] = in match()
1467 md->offset_vector[md->offset_end - number]; in match()
1468 md->offset_vector[offset+1] = (int)(eptr - md->start_subject); in match()
1476 register int *iptr = md->offset_vector + offset_top; in match()
1477 register int *iend = md->offset_vector + offset; in match()
1498 md->recursive == NULL && in match()
1499 (md->notempty || in match()
1500 (md->notempty_atstart && in match()
1501 mstart == md->start_subject + md->start_offset))) in match()
1506 md->end_match_ptr = eptr; /* Record where we ended */ in match()
1507 md->end_offset_top = offset_top; /* and how many extracts were taken */ in match()
1508 md->start_match_ptr = mstart; /* and the start (\K can modify) */ in match()
1529 save_mark = md->mark; in match()
1530 if (md->match_function_type == MATCH_CONDASSERT) in match()
1533 md->match_function_type = 0; in match()
1541 RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, NULL, RM4); in match()
1548 mstart = md->start_match_ptr; /* In case \K reset it */ in match()
1554 md->mark = save_mark; in match()
1562 if (md->start_match_ptr < next && in match()
1592 offset_top = md->end_offset_top; in match()
1600 save_mark = md->mark; in match()
1601 if (md->match_function_type == MATCH_CONDASSERT) in match()
1604 md->match_function_type = 0; in match()
1612 RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, NULL, RM5); in match()
1613 md->mark = save_mark; /* Always restore the mark setting */ in match()
1629 if (md->start_match_ptr < next && in match()
1681 if (eptr < md->start_subject) RRETURN(MATCH_NOMATCH); in match()
1692 if (eptr < md->start_subject) RRETURN(MATCH_NOMATCH); in match()
1697 if (eptr < md->start_used_ptr) md->start_used_ptr = eptr; in match()
1711 cb.offset_vector = md->offset_vector; in match()
1713 cb.subject = (PCRE_SPTR)md->start_subject; in match()
1715 cb.subject = (PCRE_SPTR16)md->start_subject; in match()
1717 cb.subject = (PCRE_SPTR32)md->start_subject; in match()
1719 cb.subject_length = (int)(md->end_subject - md->start_subject); in match()
1720 cb.start_match = (int)(mstart - md->start_subject); in match()
1721 cb.current_position = (int)(eptr - md->start_subject); in match()
1725 cb.capture_last = md->capture_last & CAPLMASK; in match()
1728 cb.callout_data = md->callout_data; in match()
1729 cb.mark = md->nomatch_mark; in match()
1758 callpat = md->start_code + GET(ecode, 1); in match()
1759 recno = (callpat == md->start_code)? 0 : in match()
1766 for (ri = md->recursive; ri != NULL; ri = ri->prevrec) in match()
1773 new_recursive.saved_capture_last = md->capture_last; in match()
1775 new_recursive.prevrec = md->recursive; in match()
1776 md->recursive = &new_recursive; in match()
1784 new_recursive.saved_max = md->offset_end; in match()
1793 memcpy(new_recursive.offset_save, md->offset_vector, in match()
1805 if (cbegroup) md->match_function_type = MATCH_CBEGROUP; in match()
1807 md, eptrb, RM6); in match()
1808 memcpy(md->offset_vector, new_recursive.offset_save, in match()
1810 md->capture_last = new_recursive.saved_capture_last; in match()
1811 md->recursive = new_recursive.prevrec; in match()
1822 eptr = md->end_match_ptr; in match()
1823 mstart = md->start_match_ptr; in match()
1848 md->recursive = &new_recursive; in match()
1854 md->recursive = new_recursive.prevrec; in match()
1878 RMATCH(eptr, next, offset_top, md, eptrb, RM10); in match()
1887 RMATCH(eptr, next + 1+LINK_SIZE, offset_top, md, eptrb, RM11); in match()
1934 md->end_match_ptr = eptr; /* For ONCE_NC */ in match()
1935 md->end_offset_top = offset_top; in match()
1936 md->start_match_ptr = mstart; in match()
1961 if (md->recursive != NULL && md->recursive->group_num == number) in match()
1963 md->end_match_ptr = eptr; in match()
1964 md->start_match_ptr = mstart; in match()
1970 md->capture_last = (md->capture_last & OVFLMASK) | number; in match()
1971 if (offset >= md->offset_max) md->capture_last |= OVFLBIT; else in match()
1985 register int *iptr = md->offset_vector + offset_top; in match()
1986 register int *iend = md->offset_vector + offset; in match()
1992 md->offset_vector[offset] = in match()
1993 md->offset_vector[md->offset_end - number]; in match()
1994 md->offset_vector[offset+1] = (int)(eptr - md->start_subject); in match()
2006 md->start_match_ptr = mstart; /* In case \K reset it */ in match()
2007 md->end_match_ptr = eptr; in match()
2008 md->end_offset_top = offset_top; in match()
2025 RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, eptrb, RM12); in match()
2027 md->once_target = prev; /* Level at which to change to MATCH_NOMATCH */ in match()
2042 RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, eptrb, RM7); in match()
2046 RMATCH(eptr, prev, offset_top, md, eptrb, RM8); in match()
2048 md->once_target = prev; /* Level at which to change to MATCH_NOMATCH */ in match()
2053 RMATCH(eptr, prev, offset_top, md, eptrb, RM50); in match()
2061 RMATCH(eptr, prev, offset_top, md, eptrb, RM13); in match()
2062 if (rrc == MATCH_ONCE && md->once_target == prev) rrc = MATCH_NOMATCH; in match()
2066 RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, eptrb, RM9); in match()
2068 md->once_target = prev; in match()
2079 if (md->notbol && eptr == md->start_subject) RRETURN(MATCH_NOMATCH); in match()
2084 if (eptr != md->start_subject) RRETURN(MATCH_NOMATCH); in match()
2091 if (md->notbol && eptr == md->start_subject) RRETURN(MATCH_NOMATCH); in match()
2092 if (eptr != md->start_subject && in match()
2093 (eptr == md->end_subject || !WAS_NEWLINE(eptr))) in match()
2101 if (eptr != md->start_subject + md->start_offset) RRETURN(MATCH_NOMATCH); in match()
2116 if (eptr < md->end_subject) in match()
2120 if (md->partial != 0 && in match()
2121 eptr + 1 >= md->end_subject && in match()
2126 md->hitend = TRUE; in match()
2127 if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL); in match()
2134 if (md->noteol) RRETURN(MATCH_NOMATCH); in match()
2144 if (md->noteol) RRETURN(MATCH_NOMATCH); in match()
2145 if (!md->endonly) goto ASSERT_NL_OR_EOS; in match()
2152 if (eptr < md->end_subject) RRETURN(MATCH_NOMATCH); in match()
2161 if (eptr < md->end_subject && in match()
2162 (!IS_NEWLINE(eptr) || eptr != md->end_subject - md->nllen)) in match()
2164 if (md->partial != 0 && in match()
2165 eptr + 1 >= md->end_subject && in match()
2170 md->hitend = TRUE; in match()
2171 if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL); in match()
2198 if (eptr == md->start_subject) prev_is_word = FALSE; else in match()
2202 if (lastptr < md->start_used_ptr) md->start_used_ptr = lastptr; in match()
2205 if (md->use_ucp) in match()
2215 prev_is_word = c < 256 && (md->ctypes[c] & ctype_word) != 0; in match()
2220 if (eptr >= md->end_subject) in match()
2229 if (md->use_ucp) in match()
2239 cur_is_word = c < 256 && (md->ctypes[c] & ctype_word) != 0; in match()
2251 if (eptr == md->start_subject) prev_is_word = FALSE; else in match()
2253 if (eptr <= md->start_used_ptr) md->start_used_ptr = eptr - 1; in match()
2255 if (md->use_ucp) in match()
2267 && ((md->ctypes[eptr[-1]] & ctype_word) != 0); in match()
2272 if (eptr >= md->end_subject) in match()
2279 if (md->use_ucp) in match()
2291 && ((md->ctypes[*eptr] & ctype_word) != 0); in match()
2307 if (md->partial != 0 && in match()
2308 eptr + 1 >= md->end_subject && in match()
2313 md->hitend = TRUE; in match()
2314 if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL); in match()
2322 if (eptr >= md->end_subject) /* DO NOT merge the eptr++ here; it must */ in match()
2329 if (utf) ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++); in match()
2338 if (eptr >= md->end_subject) /* DO NOT merge the eptr++ here; it must */ in match()
2348 if (eptr >= md->end_subject) in match()
2358 (md->ctypes[c] & ctype_digit) != 0 in match()
2365 if (eptr >= md->end_subject) in match()
2375 (md->ctypes[c] & ctype_digit) == 0 in match()
2382 if (eptr >= md->end_subject) in match()
2392 (md->ctypes[c] & ctype_space) != 0 in match()
2399 if (eptr >= md->end_subject) in match()
2409 (md->ctypes[c] & ctype_space) == 0 in match()
2416 if (eptr >= md->end_subject) in match()
2426 (md->ctypes[c] & ctype_word) != 0 in match()
2433 if (eptr >= md->end_subject) in match()
2443 (md->ctypes[c] & ctype_word) == 0 in match()
2450 if (eptr >= md->end_subject) in match()
2461 if (eptr >= md->end_subject) in match()
2478 if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH); in match()
2485 if (eptr >= md->end_subject) in match()
2500 if (eptr >= md->end_subject) in match()
2515 if (eptr >= md->end_subject) in match()
2530 if (eptr >= md->end_subject) in match()
2550 if (eptr >= md->end_subject) in match()
2655 if (eptr >= md->end_subject) in match()
2665 while (eptr < md->end_subject) in match()
2709 pcre_uchar *slot = md->name_table + GET2(ecode, 1) * md->name_entry_size; in match()
2715 length = (md->jscript_compat)? 0 : -1; in match()
2721 if (offset < offset_top && md->offset_vector[offset] >= 0) in match()
2723 length = md->offset_vector[offset+1] - md->offset_vector[offset]; in match()
2726 slot += md->name_entry_size; in match()
2736 if (offset >= offset_top || md->offset_vector[offset] < 0) in match()
2737 length = (md->jscript_compat)? 0 : -1; in match()
2739 length = md->offset_vector[offset+1] - md->offset_vector[offset]; in match()
2769 if ((length = match_ref(offset, eptr, length, md, caseless)) < 0) in match()
2771 if (length == -2) eptr = md->end_subject; /* Partial match */ in match()
2795 if ((slength = match_ref(offset, eptr, length, md, caseless)) < 0) in match()
2797 if (slength == -2) eptr = md->end_subject; /* Partial match */ in match()
2816 RMATCH(eptr, ecode, offset_top, md, eptrb, RM14); in match()
2819 if ((slength = match_ref(offset, eptr, length, md, caseless)) < 0) in match()
2821 if (slength == -2) eptr = md->end_subject; /* Partial match */ in match()
2838 if ((slength = match_ref(offset, eptr, length, md, caseless)) < 0) in match()
2843 if (slength == -2 && md->partial != 0 && in match()
2844 md->end_subject > md->start_used_ptr) in match()
2846 md->hitend = TRUE; in match()
2847 if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL); in match()
2856 RMATCH(eptr, ecode, offset_top, md, eptrb, RM15); in match()
2926 if (eptr >= md->end_subject) in match()
2946 if (eptr >= md->end_subject) in match()
2978 RMATCH(eptr, ecode, offset_top, md, eptrb, RM16); in match()
2981 if (eptr >= md->end_subject) in match()
3001 RMATCH(eptr, ecode, offset_top, md, eptrb, RM17); in match()
3004 if (eptr >= md->end_subject) in match()
3035 if (eptr >= md->end_subject) in match()
3054 RMATCH(eptr, ecode, offset_top, md, eptrb, RM18); in match()
3066 if (eptr >= md->end_subject) in match()
3087 RMATCH(eptr, ecode, offset_top, md, eptrb, RM19); in match()
3150 if (eptr >= md->end_subject) in match()
3171 RMATCH(eptr, ecode, offset_top, md, eptrb, RM20); in match()
3174 if (eptr >= md->end_subject) in match()
3193 if (eptr >= md->end_subject) in match()
3211 RMATCH(eptr, ecode, offset_top, md, eptrb, RM21); in match()
3234 if (length > md->end_subject - eptr) in match()
3245 if (md->end_subject - eptr < 1) in match()
3259 if (eptr >= md->end_subject) in match()
3280 if (md->lcc[fc] != TABLE_GET(cc, md->lcc, cc)) RRETURN(MATCH_NOMATCH); in match()
3312 if (TABLE_GET(ecode[1], md->lcc, ecode[1]) in match()
3313 != TABLE_GET(*eptr, md->lcc, *eptr)) RRETURN(MATCH_NOMATCH); in match()
3425 if (eptr <= md->end_subject - length && in match()
3429 eptr <= md->end_subject - oclength && in match()
3445 RMATCH(eptr, ecode, offset_top, md, eptrb, RM22); in match()
3448 if (eptr <= md->end_subject - length && in match()
3452 eptr <= md->end_subject - oclength && in match()
3469 if (eptr <= md->end_subject - length && in match()
3473 eptr <= md->end_subject - oclength && in match()
3487 RMATCH(eptr, ecode, offset_top, md, eptrb, RM23); in match()
3525 foc = md->fcc[fc]; in match()
3537 foc = TABLE_GET(fc, md->fcc, fc); in match()
3543 if (eptr >= md->end_subject) in match()
3558 RMATCH(eptr, ecode, offset_top, md, eptrb, RM24); in match()
3561 if (eptr >= md->end_subject) in match()
3578 if (eptr >= md->end_subject) in match()
3591 RMATCH(eptr, ecode, offset_top, md, eptrb, RM25); in match()
3605 if (eptr >= md->end_subject) in match()
3619 RMATCH(eptr, ecode, offset_top, md, eptrb, RM26); in match()
3622 if (eptr >= md->end_subject) in match()
3636 if (eptr >= md->end_subject) in match()
3648 RMATCH(eptr, ecode, offset_top, md, eptrb, RM27); in match()
3662 if (eptr >= md->end_subject) in match()
3690 och = TABLE_GET(ch, md->fcc, ch); in match()
3699 if (ch == c || (op == OP_NOTI && TABLE_GET(ch, md->fcc, ch) == c)) in match()
3806 foc = TABLE_GET(fc, md->fcc, fc); in match()
3814 if (eptr >= md->end_subject) in match()
3829 if (eptr >= md->end_subject) in match()
3849 RMATCH(eptr, ecode, offset_top, md, eptrb, RM28); in match()
3852 if (eptr >= md->end_subject) in match()
3867 RMATCH(eptr, ecode, offset_top, md, eptrb, RM29); in match()
3870 if (eptr >= md->end_subject) in match()
3895 if (eptr >= md->end_subject) in match()
3908 RMATCH(eptr, ecode, offset_top, md, eptrb, RM30); in match()
3920 if (eptr >= md->end_subject) in match()
3932 RMATCH(eptr, ecode, offset_top, md, eptrb, RM31); in match()
3951 if (eptr >= md->end_subject) in match()
3966 if (eptr >= md->end_subject) in match()
3985 RMATCH(eptr, ecode, offset_top, md, eptrb, RM32); in match()
3988 if (eptr >= md->end_subject) in match()
4003 RMATCH(eptr, ecode, offset_top, md, eptrb, RM33); in match()
4006 if (eptr >= md->end_subject) in match()
4030 if (eptr >= md->end_subject) in match()
4043 RMATCH(eptr, ecode, offset_top, md, eptrb, RM34); in match()
4055 if (eptr >= md->end_subject) in match()
4067 RMATCH(eptr, ecode, offset_top, md, eptrb, RM35); in match()
4169 if (eptr >= md->end_subject) in match()
4182 if (eptr >= md->end_subject) in match()
4199 if (eptr >= md->end_subject) in match()
4213 if (eptr >= md->end_subject) in match()
4227 if (eptr >= md->end_subject) in match()
4242 if (eptr >= md->end_subject) in match()
4262 if (eptr >= md->end_subject) in match()
4287 if (eptr >= md->end_subject) in match()
4304 if (eptr >= md->end_subject) in match()
4324 if (eptr >= md->end_subject) in match()
4351 if (eptr >= md->end_subject) in match()
4361 while (eptr < md->end_subject) in match()
4386 if (eptr >= md->end_subject) in match()
4392 if (md->partial != 0 && in match()
4393 eptr + 1 >= md->end_subject && in match()
4398 md->hitend = TRUE; in match()
4399 if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL); in match()
4402 ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++); in match()
4409 if (eptr >= md->end_subject) in match()
4415 ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++); in match()
4420 if (eptr > md->end_subject - min) RRETURN(MATCH_NOMATCH); in match()
4427 if (eptr >= md->end_subject) in match()
4438 if (eptr < md->end_subject && UCHAR21(eptr) == CHAR_LF) eptr++; in match()
4451 if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH); in match()
4460 if (eptr >= md->end_subject) in match()
4477 if (eptr >= md->end_subject) in match()
4494 if (eptr >= md->end_subject) in match()
4511 if (eptr >= md->end_subject) in match()
4528 if (eptr >= md->end_subject) in match()
4534 if (c < 128 && (md->ctypes[c] & ctype_digit) != 0) in match()
4543 if (eptr >= md->end_subject) in match()
4549 if (cc >= 128 || (md->ctypes[cc] & ctype_digit) == 0) in match()
4560 if (eptr >= md->end_subject) in match()
4566 if (cc < 128 && (md->ctypes[cc] & ctype_space) != 0) in match()
4569 ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++); in match()
4577 if (eptr >= md->end_subject) in match()
4583 if (cc >= 128 || (md->ctypes[cc] & ctype_space) == 0) in match()
4594 if (eptr >= md->end_subject) in match()
4600 if (cc < 128 && (md->ctypes[cc] & ctype_word) != 0) in match()
4603 ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++); in match()
4611 if (eptr >= md->end_subject) in match()
4617 if (cc >= 128 || (md->ctypes[cc] & ctype_word) == 0) in match()
4639 if (eptr >= md->end_subject) in match()
4645 if (md->partial != 0 && in match()
4646 eptr + 1 >= md->end_subject && in match()
4651 md->hitend = TRUE; in match()
4652 if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL); in match()
4659 if (eptr > md->end_subject - min) in match()
4668 if (eptr > md->end_subject - min) in match()
4679 if (eptr >= md->end_subject) in match()
4689 if (eptr < md->end_subject && *eptr == CHAR_LF) eptr++; in match()
4702 if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH); in match()
4711 if (eptr >= md->end_subject) in match()
4731 if (eptr >= md->end_subject) in match()
4751 if (eptr >= md->end_subject) in match()
4771 if (eptr >= md->end_subject) in match()
4791 if (eptr >= md->end_subject) in match()
4796 if (MAX_255(*eptr) && (md->ctypes[*eptr] & ctype_digit) != 0) in match()
4805 if (eptr >= md->end_subject) in match()
4810 if (!MAX_255(*eptr) || (md->ctypes[*eptr] & ctype_digit) == 0) in match()
4819 if (eptr >= md->end_subject) in match()
4824 if (MAX_255(*eptr) && (md->ctypes[*eptr] & ctype_space) != 0) in match()
4833 if (eptr >= md->end_subject) in match()
4838 if (!MAX_255(*eptr) || (md->ctypes[*eptr] & ctype_space) == 0) in match()
4847 if (eptr >= md->end_subject) in match()
4852 if (MAX_255(*eptr) && (md->ctypes[*eptr] & ctype_word) != 0) in match()
4861 if (eptr >= md->end_subject) in match()
4866 if (!MAX_255(*eptr) || (md->ctypes[*eptr] & ctype_word) == 0) in match()
4895 RMATCH(eptr, ecode, offset_top, md, eptrb, RM36); in match()
4898 if (eptr >= md->end_subject) in match()
4912 RMATCH(eptr, ecode, offset_top, md, eptrb, RM37); in match()
4915 if (eptr >= md->end_subject) in match()
4932 RMATCH(eptr, ecode, offset_top, md, eptrb, RM38); in match()
4935 if (eptr >= md->end_subject) in match()
4949 RMATCH(eptr, ecode, offset_top, md, eptrb, RM39); in match()
4952 if (eptr >= md->end_subject) in match()
4966 RMATCH(eptr, ecode, offset_top, md, eptrb, RM40); in match()
4969 if (eptr >= md->end_subject) in match()
4984 RMATCH(eptr, ecode, offset_top, md, eptrb, RM59); in match()
4987 if (eptr >= md->end_subject) in match()
5007 RMATCH(eptr, ecode, offset_top, md, eptrb, RM61); in match()
5010 if (eptr >= md->end_subject) in match()
5035 RMATCH(eptr, ecode, offset_top, md, eptrb, RM62); in match()
5038 if (eptr >= md->end_subject) in match()
5057 RMATCH(eptr, ecode, offset_top, md, eptrb, RM67); in match()
5060 if (eptr >= md->end_subject) in match()
5080 RMATCH(eptr, ecode, offset_top, md, eptrb, RM60); in match()
5083 if (eptr >= md->end_subject) in match()
5109 RMATCH(eptr, ecode, offset_top, md, eptrb, RM41); in match()
5112 if (eptr >= md->end_subject) in match()
5122 while (eptr < md->end_subject) in match()
5143 RMATCH(eptr, ecode, offset_top, md, eptrb, RM42); in match()
5146 if (eptr >= md->end_subject) in match()
5157 if (md->partial != 0 && /* Take care with CRLF partial */ in match()
5158 eptr >= md->end_subject && in match()
5163 md->hitend = TRUE; in match()
5164 if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL); in match()
5177 if (eptr < md->end_subject && UCHAR21(eptr) == CHAR_LF) eptr++; in match()
5190 if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH); in match()
5228 if (c < 256 && (md->ctypes[c] & ctype_digit) != 0) in match()
5233 if (c >= 256 || (md->ctypes[c] & ctype_digit) == 0) in match()
5238 if (c < 256 && (md->ctypes[c] & ctype_space) != 0) in match()
5243 if (c >= 256 || (md->ctypes[c] & ctype_space) == 0) in match()
5248 if (c < 256 && (md->ctypes[c] & ctype_word) != 0) in match()
5253 if (c >= 256 || (md->ctypes[c] & ctype_word) == 0) in match()
5268 RMATCH(eptr, ecode, offset_top, md, eptrb, RM43); in match()
5271 if (eptr >= md->end_subject) in match()
5282 if (md->partial != 0 && /* Take care with CRLF partial */ in match()
5283 eptr >= md->end_subject && in match()
5288 md->hitend = TRUE; in match()
5289 if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL); in match()
5302 if (eptr < md->end_subject && *eptr == CHAR_LF) eptr++; in match()
5315 if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH); in match()
5369 if (MAX_255(c) && (md->ctypes[c] & ctype_digit) != 0) RRETURN(MATCH_NOMATCH); in match()
5373 if (!MAX_255(c) || (md->ctypes[c] & ctype_digit) == 0) RRETURN(MATCH_NOMATCH); in match()
5377 if (MAX_255(c) && (md->ctypes[c] & ctype_space) != 0) RRETURN(MATCH_NOMATCH); in match()
5381 if (!MAX_255(c) || (md->ctypes[c] & ctype_space) == 0) RRETURN(MATCH_NOMATCH); in match()
5385 if (MAX_255(c) && (md->ctypes[c] & ctype_word) != 0) RRETURN(MATCH_NOMATCH); in match()
5389 if (!MAX_255(c) || (md->ctypes[c] & ctype_word) == 0) RRETURN(MATCH_NOMATCH); in match()
5417 if (eptr >= md->end_subject) in match()
5433 if (eptr >= md->end_subject) in match()
5452 if (eptr >= md->end_subject) in match()
5467 if (eptr >= md->end_subject) in match()
5482 if (eptr >= md->end_subject) in match()
5498 if (eptr >= md->end_subject) in match()
5520 if (eptr >= md->end_subject) in match()
5548 if (eptr >= md->end_subject) in match()
5567 if (eptr >= md->end_subject) in match()
5590 if (eptr >= md->end_subject) in match()
5614 RMATCH(eptr, ecode, offset_top, md, eptrb, RM44); in match()
5628 if (eptr >= md->end_subject) in match()
5638 while (eptr < md->end_subject) in match()
5666 RMATCH(eptr, ecode, offset_top, md, eptrb, RM45); in match()
5709 if (eptr >= md->end_subject) in match()
5715 if (md->partial != 0 && /* Take care with CRLF partial */ in match()
5716 eptr + 1 >= md->end_subject && in match()
5721 md->hitend = TRUE; in match()
5722 if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL); in match()
5725 ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++); in match()
5734 if (eptr >= md->end_subject) in match()
5740 ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++); in match()
5745 eptr = md->end_subject; /* Unlimited UTF-8 repeat */ in match()
5754 if (c > (unsigned int)(md->end_subject - eptr)) in match()
5756 eptr = md->end_subject; in match()
5766 if (eptr >= md->end_subject) in match()
5774 if (++eptr >= md->end_subject) break; in match()
5780 (md->bsr_anycrlf || in match()
5798 if (eptr >= md->end_subject) in match()
5820 if (eptr >= md->end_subject) in match()
5840 if (eptr >= md->end_subject) in match()
5846 if (c < 256 && (md->ctypes[c] & ctype_digit) != 0) break; in match()
5855 if (eptr >= md->end_subject) in match()
5861 if (c >= 256 ||(md->ctypes[c] & ctype_digit) == 0) break; in match()
5870 if (eptr >= md->end_subject) in match()
5876 if (c < 256 && (md->ctypes[c] & ctype_space) != 0) break; in match()
5885 if (eptr >= md->end_subject) in match()
5891 if (c >= 256 ||(md->ctypes[c] & ctype_space) == 0) break; in match()
5900 if (eptr >= md->end_subject) in match()
5906 if (c < 256 && (md->ctypes[c] & ctype_word) != 0) break; in match()
5915 if (eptr >= md->end_subject) in match()
5921 if (c >= 256 || (md->ctypes[c] & ctype_word) == 0) break; in match()
5934 RMATCH(eptr, ecode, offset_top, md, eptrb, RM46); in match()
5951 if (eptr >= md->end_subject) in match()
5957 if (md->partial != 0 && /* Take care with CRLF partial */ in match()
5958 eptr + 1 >= md->end_subject && in match()
5963 md->hitend = TRUE; in match()
5964 if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL); in match()
5973 if (c > (unsigned int)(md->end_subject - eptr)) in match()
5975 eptr = md->end_subject; in match()
5984 if (eptr >= md->end_subject) in match()
5992 if (++eptr >= md->end_subject) break; in match()
5997 if (c != CHAR_LF && (md->bsr_anycrlf || in match()
6011 if (eptr >= md->end_subject) in match()
6032 if (eptr >= md->end_subject) in match()
6053 if (eptr >= md->end_subject) in match()
6074 if (eptr >= md->end_subject) in match()
6095 if (eptr >= md->end_subject) in match()
6100 if (MAX_255(*eptr) && (md->ctypes[*eptr] & ctype_digit) != 0) break; in match()
6108 if (eptr >= md->end_subject) in match()
6113 if (!MAX_255(*eptr) || (md->ctypes[*eptr] & ctype_digit) == 0) break; in match()
6121 if (eptr >= md->end_subject) in match()
6126 if (MAX_255(*eptr) && (md->ctypes[*eptr] & ctype_space) != 0) break; in match()
6134 if (eptr >= md->end_subject) in match()
6139 if (!MAX_255(*eptr) || (md->ctypes[*eptr] & ctype_space) == 0) break; in match()
6147 if (eptr >= md->end_subject) in match()
6152 if (MAX_255(*eptr) && (md->ctypes[*eptr] & ctype_word) != 0) break; in match()
6160 if (eptr >= md->end_subject) in match()
6165 if (!MAX_255(*eptr) || (md->ctypes[*eptr] & ctype_word) == 0) break; in match()
6178 RMATCH(eptr, ecode, offset_top, md, eptrb, RM47); in match()
6376 match_data *md = &match_block; in pcre_exec() local
6392 md->match_frames_base = &frame_zero; in pcre_exec()
6433 utf = md->utf = (re->options & PCRE_UTF8) != 0; in pcre_exec()
6434 md->partial = ((options & PCRE_PARTIAL_HARD) != 0)? 2 : in pcre_exec()
6453 return (errorcode <= PCRE_UTF8_ERR5 && md->partial > 1)? in pcre_exec()
6456 return (errorcode <= PCRE_UTF16_ERR1 && md->partial > 1)? in pcre_exec()
6496 md->name_table = (pcre_uchar *)re + re->name_table_offset; in pcre_exec()
6497 md->name_count = re->name_count; in pcre_exec()
6498 md->name_entry_size = re->name_entry_size; in pcre_exec()
6504 md->match_limit = MATCH_LIMIT; in pcre_exec()
6505 md->match_limit_recursion = MATCH_LIMIT_RECURSION; in pcre_exec()
6506 md->callout_data = NULL; in pcre_exec()
6520 md->match_limit = extra_data->match_limit; in pcre_exec()
6522 md->match_limit_recursion = extra_data->match_limit_recursion; in pcre_exec()
6524 md->callout_data = extra_data->callout_data; in pcre_exec()
6530 if ((re->flags & PCRE_MLSET) != 0 && re->limit_match < md->match_limit) in pcre_exec()
6531 md->match_limit = re->limit_match; in pcre_exec()
6534 re->limit_recursion < md->match_limit_recursion) in pcre_exec()
6535 md->match_limit_recursion = re->limit_recursion; in pcre_exec()
6551 md->start_code = (const pcre_uchar *)re + re->name_table_offset + in pcre_exec()
6554 md->start_subject = (PCRE_PUCHAR)subject; in pcre_exec()
6555 md->start_offset = start_offset; in pcre_exec()
6556 md->end_subject = md->start_subject + length; in pcre_exec()
6557 end_subject = md->end_subject; in pcre_exec()
6559 md->endonly = (re->options & PCRE_DOLLAR_ENDONLY) != 0; in pcre_exec()
6560 md->use_ucp = (re->options & PCRE_UCP) != 0; in pcre_exec()
6561 md->jscript_compat = (re->options & PCRE_JAVASCRIPT_COMPAT) != 0; in pcre_exec()
6562 md->ignore_skip_arg = 0; in pcre_exec()
6567 md->notbol = (options & PCRE_NOTBOL) != 0; in pcre_exec()
6568 md->noteol = (options & PCRE_NOTEOL) != 0; in pcre_exec()
6569 md->notempty = (options & PCRE_NOTEMPTY) != 0; in pcre_exec()
6570 md->notempty_atstart = (options & PCRE_NOTEMPTY_ATSTART) != 0; in pcre_exec()
6572 md->hitend = FALSE; in pcre_exec()
6573 md->mark = md->nomatch_mark = NULL; /* In case never set */ in pcre_exec()
6575 md->recursive = NULL; /* No recursion at top level */ in pcre_exec()
6576 md->hasthen = (re->flags & PCRE_HASTHEN) != 0; in pcre_exec()
6578 md->lcc = tables + lcc_offset; in pcre_exec()
6579 md->fcc = tables + fcc_offset; in pcre_exec()
6580 md->ctypes = tables + ctypes_offset; in pcre_exec()
6588 md->bsr_anycrlf = (re->options & PCRE_BSR_ANYCRLF) != 0; in pcre_exec()
6591 md->bsr_anycrlf = TRUE; in pcre_exec()
6593 md->bsr_anycrlf = FALSE; in pcre_exec()
6598 md->bsr_anycrlf = TRUE; in pcre_exec()
6602 md->bsr_anycrlf = FALSE; in pcre_exec()
6626 md->nltype = NLTYPE_ANYCRLF; in pcre_exec()
6630 md->nltype = NLTYPE_ANY; in pcre_exec()
6634 md->nltype = NLTYPE_FIXED; in pcre_exec()
6637 md->nllen = 2; in pcre_exec()
6638 md->nl[0] = (newline >> 8) & 255; in pcre_exec()
6639 md->nl[1] = newline & 255; in pcre_exec()
6643 md->nllen = 1; in pcre_exec()
6644 md->nl[0] = newline; in pcre_exec()
6652 if (md->partial && (re->flags & PCRE_NOPARTIAL) != 0) in pcre_exec()
6666 md->offset_vector = (int *)(PUBL(malloc))(ocount * sizeof(int)); in pcre_exec()
6667 if (md->offset_vector == NULL) return PCRE_ERROR_NOMEMORY; in pcre_exec()
6671 else md->offset_vector = offsets; in pcre_exec()
6672 md->offset_end = ocount; in pcre_exec()
6673 md->offset_max = (2*ocount)/3; in pcre_exec()
6674 md->capture_last = 0; in pcre_exec()
6682 if (md->offset_vector != NULL) in pcre_exec()
6684 register int *iptr = md->offset_vector + ocount; in pcre_exec()
6686 if (iend < md->offset_vector + 2) iend = md->offset_vector + 2; in pcre_exec()
6688 if (offsetcount > 0) md->offset_vector[0] = -1; in pcre_exec()
6689 if (offsetcount > 1) md->offset_vector[1] = -1; in pcre_exec()
6706 first_char2 = TABLE_GET(first_char, md->fcc, first_char); in pcre_exec()
6728 req_char2 = TABLE_GET(req_char, md->fcc, req_char); in pcre_exec()
6759 while (t < md->end_subject && !IS_NEWLINE(t)) in pcre_exec()
6767 while (t < md->end_subject && !IS_NEWLINE(t)) t++; in pcre_exec()
6798 if (start_match > md->start_subject + start_offset) in pcre_exec()
6820 (md->nltype == NLTYPE_ANY || md->nltype == NLTYPE_ANYCRLF) && in pcre_exec()
6850 if (((options | re->options) & PCRE_NO_START_OPTIMIZE) == 0 && !md->partial) in pcre_exec()
6923 pchars(start_match, end_subject - start_match, TRUE, md); in pcre_exec()
6930 md->start_match_ptr = start_match; in pcre_exec()
6931 md->start_used_ptr = start_match; in pcre_exec()
6932 md->match_call_count = 0; in pcre_exec()
6933 md->match_function_type = 0; in pcre_exec()
6934 md->end_offset_top = 0; in pcre_exec()
6935 md->skip_arg_count = 0; in pcre_exec()
6936 rc = match(start_match, md->start_code, start_match, 2, md, NULL, 0); in pcre_exec()
6937 if (md->hitend && start_partial == NULL) in pcre_exec()
6939 start_partial = md->start_used_ptr; in pcre_exec()
6954 md->ignore_skip_arg = md->skip_arg_count; in pcre_exec()
6961 if (md->start_match_ptr > start_match) in pcre_exec()
6963 new_start_match = md->start_match_ptr; in pcre_exec()
6974 md->ignore_skip_arg = 0; in pcre_exec()
7027 (md->nltype == NLTYPE_ANY || in pcre_exec()
7028 md->nltype == NLTYPE_ANYCRLF || in pcre_exec()
7029 md->nllen == 2)) in pcre_exec()
7032 md->mark = NULL; /* Reset for start of next match attempt */ in pcre_exec()
7063 memcpy(offsets + 2, md->offset_vector + 2, in pcre_exec()
7067 if (md->end_offset_top > arg_offset_max) md->capture_last |= OVFLBIT; in pcre_exec()
7069 (PUBL(free))(md->offset_vector); in pcre_exec()
7075 rc = ((md->capture_last & OVFLBIT) != 0 && in pcre_exec()
7076 md->end_offset_top >= arg_offset_max)? in pcre_exec()
7077 0 : md->end_offset_top/2; in pcre_exec()
7088 if (md->end_offset_top/2 <= re->top_bracket && offsets != NULL) in pcre_exec()
7093 iptr = offsets + md->end_offset_top; in pcre_exec()
7104 offsets[0] = (int)(md->start_match_ptr - md->start_subject); in pcre_exec()
7105 offsets[1] = (int)(md->end_match_ptr - md->start_subject); in pcre_exec()
7111 *(extra_data->mark) = (pcre_uchar *)md->mark; in pcre_exec()
7125 (PUBL(free))(md->offset_vector); in pcre_exec()
7144 md->mark = NULL; in pcre_exec()
7166 *(extra_data->mark) = (pcre_uchar *)md->nomatch_mark; in pcre_exec()