Lines Matching refs:offsets

593 	int				*offsets;			/* Array of subpattern offsets */  in php_pcre_match_impl()  local
665 offsets = (int *)safe_emalloc(size_offsets, sizeof(int), 0); in php_pcre_match_impl()
666 memset(offsets, 0, size_offsets*sizeof(int)); in php_pcre_match_impl()
683 exoptions|g_notempty, offsets, size_offsets); in php_pcre_match_impl()
701 …if ((offsets[1] - offsets[0] < 0) || pcre_get_substring_list(subject, offsets, count, &stringlist)… in php_pcre_match_impl()
703 efree(offsets); in php_pcre_match_impl()
715 offsets[(i<<1)+1] - offsets[i<<1], offsets[i<<1], NULL); in php_pcre_match_impl()
718 offsets[(i<<1)+1] - offsets[i<<1], 1); in php_pcre_match_impl()
741 offsets[(i<<1)+1] - offsets[i<<1], offsets[i<<1], subpat_names[i]); in php_pcre_match_impl()
745 offsets[(i<<1)+1] - offsets[i<<1], 1); in php_pcre_match_impl()
748 offsets[(i<<1)+1] - offsets[i<<1], 1); in php_pcre_match_impl()
759 offsets[(i<<1)+1] - offsets[i<<1], in php_pcre_match_impl()
760 offsets[i<<1], subpat_names[i]); in php_pcre_match_impl()
764 offsets[(i<<1)+1] - offsets[i<<1], 1); in php_pcre_match_impl()
767 offsets[(i<<1)+1] - offsets[i<<1], 1); in php_pcre_match_impl()
782 offsets[0] = start_offset; in php_pcre_match_impl()
783 offsets[1] = start_offset + unit_len; in php_pcre_match_impl()
795 g_notempty = (offsets[1] == offsets[0])? PCRE_NOTEMPTY | PCRE_ANCHORED : 0; in php_pcre_match_impl()
798 start_offset = offsets[1]; in php_pcre_match_impl()
814 efree(offsets); in php_pcre_match_impl()
883 static int preg_do_repl_func(zval *function, char *subject, int *offsets, char **subpat_names, int … in preg_do_repl_func() argument
895 …add_assoc_stringl(subpats, subpat_names[i], &subject[offsets[i<<1]] , offsets[(i<<1)+1] - offsets[… in preg_do_repl_func()
897 add_next_index_stringl(subpats, &subject[offsets[i<<1]], offsets[(i<<1)+1] - offsets[i<<1], 1); in preg_do_repl_func()
910 result_len = offsets[1] - offsets[0]; in preg_do_repl_func()
911 *result = estrndup(&subject[offsets[0]], result_len); in preg_do_repl_func()
923 int *offsets, int count, char **result TSRMLS_DC) in preg_do_eval() argument
958 match = subject + offsets[backref<<1]; in preg_do_eval()
959 match_len = offsets[(backref<<1)+1] - offsets[backref<<1]; in preg_do_eval()
1039 int *offsets; /* Array of subpattern offsets */ in php_pcre_replace_impl() local
1107 offsets = (int *)safe_emalloc(size_offsets, sizeof(int), 0); in php_pcre_replace_impl()
1121 exoptions|g_notempty, offsets, size_offsets); in php_pcre_replace_impl()
1134 if (count > 0 && (offsets[1] - offsets[0] >= 0) && (limit == -1 || limit > 0)) { in php_pcre_replace_impl()
1139 match = subject + offsets[0]; in php_pcre_replace_impl()
1141 new_len = *result_len + offsets[0] - start_offset; /* part before the match */ in php_pcre_replace_impl()
1146 offsets, count, &eval_result TSRMLS_CC); in php_pcre_replace_impl()
1150 …eval_result_len = preg_do_repl_func(replace_val, subject, offsets, subpat_names, count, &eval_resu… in php_pcre_replace_impl()
1164 new_len += offsets[(backref<<1)+1] - offsets[backref<<1]; in php_pcre_replace_impl()
1206 match_len = offsets[(backref<<1)+1] - offsets[backref<<1]; in php_pcre_replace_impl()
1207 memcpy(walkbuf, subject + offsets[backref<<1], match_len); in php_pcre_replace_impl()
1232 offsets[0] = start_offset; in php_pcre_replace_impl()
1233 offsets[1] = start_offset + unit_len; in php_pcre_replace_impl()
1262 g_notempty = (offsets[1] == offsets[0])? PCRE_NOTEMPTY | PCRE_ANCHORED : 0; in php_pcre_replace_impl()
1265 start_offset = offsets[1]; in php_pcre_replace_impl()
1268 efree(offsets); in php_pcre_replace_impl()
1525 int *offsets; /* Array of subpattern offsets */ in php_pcre_split_impl() local
1563 offsets = (int *)safe_emalloc(size_offsets, sizeof(int), 0); in php_pcre_split_impl()
1575 exoptions|g_notempty, offsets, size_offsets); in php_pcre_split_impl()
1587 if (count > 0 && (offsets[1] - offsets[0] >= 0)) { in php_pcre_split_impl()
1588 if (!no_empty || &subject[offsets[0]] != last_match) { in php_pcre_split_impl()
1592 add_offset_pair(return_value, last_match, &subject[offsets[0]]-last_match, next_offset, NULL); in php_pcre_split_impl()
1596 &subject[offsets[0]]-last_match, 1); in php_pcre_split_impl()
1604 last_match = &subject[offsets[1]]; in php_pcre_split_impl()
1605 next_offset = offsets[1]; in php_pcre_split_impl()
1610 match_len = offsets[(i<<1)+1] - offsets[i<<1]; in php_pcre_split_impl()
1614 add_offset_pair(return_value, &subject[offsets[i<<1]], match_len, offsets[i<<1], NULL); in php_pcre_split_impl()
1617 &subject[offsets[i<<1]], in php_pcre_split_impl()
1639 exoptions, offsets, size_offsets); in php_pcre_split_impl()
1645 offsets[0] = start_offset; in php_pcre_split_impl()
1646 offsets[1] = start_offset + 1; in php_pcre_split_impl()
1659 g_notempty = (offsets[1] == offsets[0])? PCRE_NOTEMPTY | PCRE_ANCHORED : 0; in php_pcre_split_impl()
1662 start_offset = offsets[1]; in php_pcre_split_impl()
1681 efree(offsets); in php_pcre_split_impl()
1804 int *offsets; /* Array of subpattern offsets */ in php_pcre_grep_impl() local
1829 offsets = (int *)safe_emalloc(size_offsets, sizeof(int), 0); in php_pcre_grep_impl()
1849 0, offsets, size_offsets); in php_pcre_grep_impl()
1888 efree(offsets); in php_pcre_grep_impl()