Lines Matching refs:offsets
761 int *offsets; /* Array of subpattern offsets */ in php_pcre_match_impl() local
843 offsets = (int *)do_alloca(size_offsets * sizeof(int), use_heap); in php_pcre_match_impl()
845 offsets = (int *)safe_emalloc(size_offsets, sizeof(int), 0); in php_pcre_match_impl()
847 memset(offsets, 0, size_offsets*sizeof(int)); in php_pcre_match_impl()
875 no_utf_check|g_notempty, offsets, size_offsets, jit_stack); in php_pcre_match_impl()
879 no_utf_check|g_notempty, offsets, size_offsets); in php_pcre_match_impl()
897 if (offsets[1] - offsets[0] < 0) { in php_pcre_match_impl()
902 free_alloca(offsets, use_heap); in php_pcre_match_impl()
904 efree(offsets); in php_pcre_match_impl()
916 add_offset_pair(&match_sets[i], subject + offsets[i<<1], in php_pcre_match_impl()
917 offsets[(i<<1)+1] - offsets[i<<1], offsets[i<<1], NULL, unmatched_as_null); in php_pcre_match_impl()
921 if (offsets[i<<1] < 0) { in php_pcre_match_impl()
928 add_next_index_stringl(&match_sets[i], subject + offsets[i<<1], in php_pcre_match_impl()
929 offsets[(i<<1)+1] - offsets[i<<1]); in php_pcre_match_impl()
962 add_offset_pair(&result_set, subject + offsets[i<<1], in php_pcre_match_impl()
963 offsets[(i<<1)+1] - offsets[i<<1], offsets[i<<1], subpat_names[i], unmatched_as_null); in php_pcre_match_impl()
968 if (offsets[i<<1] < 0) { in php_pcre_match_impl()
975 add_assoc_stringl(&result_set, subpat_names[i], subject + offsets[i<<1], in php_pcre_match_impl()
976 offsets[(i<<1)+1] - offsets[i<<1]); in php_pcre_match_impl()
979 if (offsets[i<<1] < 0) { in php_pcre_match_impl()
986 add_next_index_stringl(&result_set, subject + offsets[i<<1], in php_pcre_match_impl()
987 offsets[(i<<1)+1] - offsets[i<<1]); in php_pcre_match_impl()
994 add_offset_pair(&result_set, subject + offsets[i<<1], in php_pcre_match_impl()
995 offsets[(i<<1)+1] - offsets[i<<1], offsets[i<<1], NULL, unmatched_as_null); in php_pcre_match_impl()
999 if (offsets[i<<1] < 0) { in php_pcre_match_impl()
1006 add_next_index_stringl(&result_set, subject + offsets[i<<1], in php_pcre_match_impl()
1007 offsets[(i<<1)+1] - offsets[i<<1]); in php_pcre_match_impl()
1024 add_offset_pair(subpats, subject + offsets[i<<1], in php_pcre_match_impl()
1025 offsets[(i<<1)+1] - offsets[i<<1], in php_pcre_match_impl()
1026 offsets[i<<1], subpat_names[i], unmatched_as_null); in php_pcre_match_impl()
1031 if (offsets[i<<1] < 0) { in php_pcre_match_impl()
1038 add_assoc_stringl(subpats, subpat_names[i], subject + offsets[i<<1], in php_pcre_match_impl()
1039 offsets[(i<<1)+1] - offsets[i<<1]); in php_pcre_match_impl()
1042 if (offsets[i<<1] < 0) { in php_pcre_match_impl()
1049 add_next_index_stringl(subpats, subject + offsets[i<<1], in php_pcre_match_impl()
1050 offsets[(i<<1)+1] - offsets[i<<1]); in php_pcre_match_impl()
1057 add_offset_pair(subpats, subject + offsets[i<<1], in php_pcre_match_impl()
1058 offsets[(i<<1)+1] - offsets[i<<1], in php_pcre_match_impl()
1059 offsets[i<<1], NULL, unmatched_as_null); in php_pcre_match_impl()
1063 if (offsets[i<<1] < 0) { in php_pcre_match_impl()
1070 add_next_index_stringl(subpats, subject + offsets[i<<1], in php_pcre_match_impl()
1071 offsets[(i<<1)+1] - offsets[i<<1]); in php_pcre_match_impl()
1085 start_offset = offsets[1]; in php_pcre_match_impl()
1091 g_notempty = (start_offset == offsets[0]) ? PCRE_NOTEMPTY_ATSTART | PCRE_ANCHORED : 0; in php_pcre_match_impl()
1135 free_alloca(offsets, use_heap); in php_pcre_match_impl()
1137 efree(offsets); in php_pcre_match_impl()
1209 …nc(zend_fcall_info *fci, zend_fcall_info_cache *fcc, char *subject, int *offsets, char **subpat_na… in preg_do_repl_func() argument
1220 …add_assoc_stringl(&arg, subpat_names[i], &subject[offsets[i<<1]] , offsets[(i<<1)+1] - offsets[i<<… in preg_do_repl_func()
1222 add_next_index_stringl(&arg, &subject[offsets[i<<1]], offsets[(i<<1)+1] - offsets[i<<1]); in preg_do_repl_func()
1226 add_next_index_stringl(&arg, &subject[offsets[i<<1]], offsets[(i<<1)+1] - offsets[i<<1]); in preg_do_repl_func()
1246 result_str = zend_string_init(&subject[offsets[0]], offsets[1] - offsets[0], 0); in preg_do_repl_func()
1286 int *offsets; /* Array of subpattern offsets */ in php_pcre_replace_impl() local
1324 offsets = (int *)do_alloca(size_offsets * sizeof(int), use_heap); in php_pcre_replace_impl()
1326 offsets = (int *)safe_emalloc(size_offsets, sizeof(int), 0); in php_pcre_replace_impl()
1338 free_alloca(offsets, use_heap); in php_pcre_replace_impl()
1340 efree(offsets); in php_pcre_replace_impl()
1371 no_utf_check|g_notempty, offsets, size_offsets, jit_stack); in php_pcre_replace_impl()
1375 no_utf_check|g_notempty, offsets, size_offsets); in php_pcre_replace_impl()
1389 if (count > 0 && (offsets[1] - offsets[0] >= 0) && limit) { in php_pcre_replace_impl()
1397 match = subject + offsets[0]; in php_pcre_replace_impl()
1399 new_len = result_len + offsets[0] - start_offset; /* part before the match */ in php_pcre_replace_impl()
1415 new_len += offsets[(backref<<1)+1] - offsets[backref<<1]; in php_pcre_replace_impl()
1458 match_len = offsets[(backref<<1)+1] - offsets[backref<<1]; in php_pcre_replace_impl()
1459 memcpy(walkbuf, subject + offsets[backref<<1], match_len); in php_pcre_replace_impl()
1478 start_offset = offsets[1]; in php_pcre_replace_impl()
1484 g_notempty = (start_offset == offsets[0]) ? PCRE_NOTEMPTY_ATSTART | PCRE_ANCHORED : 0; in php_pcre_replace_impl()
1530 free_alloca(offsets, use_heap); in php_pcre_replace_impl()
1532 efree(offsets); in php_pcre_replace_impl()
1549 int *offsets; /* Array of subpattern offsets */ in php_pcre_replace_func_impl() local
1583 offsets = (int *)do_alloca(size_offsets * sizeof(int), use_heap); in php_pcre_replace_func_impl()
1585 offsets = (int *)safe_emalloc(size_offsets, sizeof(int), 0); in php_pcre_replace_func_impl()
1597 free_alloca(offsets, use_heap); in php_pcre_replace_func_impl()
1599 efree(offsets); in php_pcre_replace_func_impl()
1631 no_utf_check|g_notempty, offsets, size_offsets, jit_stack); in php_pcre_replace_func_impl()
1635 no_utf_check|g_notempty, offsets, size_offsets); in php_pcre_replace_func_impl()
1649 if (count > 0 && (offsets[1] - offsets[0] >= 0) && limit) { in php_pcre_replace_func_impl()
1655 match = subject + offsets[0]; in php_pcre_replace_func_impl()
1657 new_len = result_len + offsets[0] - start_offset; /* part before the match */ in php_pcre_replace_func_impl()
1660 eval_result = preg_do_repl_func(fci, fcc, subject, offsets, subpat_names, count, mark); in php_pcre_replace_func_impl()
1688 start_offset = offsets[1]; in php_pcre_replace_func_impl()
1694 g_notempty = (start_offset == offsets[0]) ? PCRE_NOTEMPTY_ATSTART | PCRE_ANCHORED : 0; in php_pcre_replace_func_impl()
1745 free_alloca(offsets, use_heap); in php_pcre_replace_func_impl()
1747 efree(offsets); in php_pcre_replace_func_impl()
2242 int *offsets; /* Array of subpattern offsets */ in php_pcre_split_impl() local
2280 offsets = (int *)do_alloca(size_offsets * sizeof(int), use_heap); in php_pcre_split_impl()
2282 offsets = (int *)safe_emalloc(size_offsets, sizeof(int), 0); in php_pcre_split_impl()
2304 no_utf_check|g_notempty, offsets, size_offsets, jit_stack); in php_pcre_split_impl()
2309 no_utf_check|g_notempty, offsets, size_offsets); in php_pcre_split_impl()
2321 if (count > 0 && (offsets[1] - offsets[0] >= 0)) { in php_pcre_split_impl()
2322 if (!no_empty || &ZSTR_VAL(subject_str)[offsets[0]] != last_match) { in php_pcre_split_impl()
2326 …add_offset_pair(return_value, last_match, (int)(&ZSTR_VAL(subject_str)[offsets[0]]-last_match), ne… in php_pcre_split_impl()
2329 ZVAL_STRINGL(&tmp, last_match, &ZSTR_VAL(subject_str)[offsets[0]]-last_match); in php_pcre_split_impl()
2338 last_match = &ZSTR_VAL(subject_str)[offsets[1]]; in php_pcre_split_impl()
2339 next_offset = offsets[1]; in php_pcre_split_impl()
2344 match_len = offsets[(i<<1)+1] - offsets[i<<1]; in php_pcre_split_impl()
2348 …add_offset_pair(return_value, &ZSTR_VAL(subject_str)[offsets[i<<1]], match_len, offsets[i<<1], NUL… in php_pcre_split_impl()
2350 ZVAL_STRINGL(&tmp, &ZSTR_VAL(subject_str)[offsets[i<<1]], match_len); in php_pcre_split_impl()
2358 start_offset = offsets[1]; in php_pcre_split_impl()
2364 g_notempty = (start_offset == offsets[0])? PCRE_NOTEMPTY_ATSTART | PCRE_ANCHORED : 0; in php_pcre_split_impl()
2404 free_alloca(offsets, use_heap); in php_pcre_split_impl()
2406 efree(offsets); in php_pcre_split_impl()
2579 int *offsets; /* Array of subpattern offsets */ in php_pcre_grep_impl() local
2604 offsets = (int *)do_alloca(size_offsets * sizeof(int), use_heap); in php_pcre_grep_impl()
2606 offsets = (int *)safe_emalloc(size_offsets, sizeof(int), 0); in php_pcre_grep_impl()
2628 no_utf_check, offsets, size_offsets, jit_stack); in php_pcre_grep_impl()
2633 no_utf_check, offsets, size_offsets); in php_pcre_grep_impl()
2664 free_alloca(offsets, use_heap); in php_pcre_grep_impl()
2666 efree(offsets); in php_pcre_grep_impl()