Lines Matching refs:offsets

599 	int				*offsets;			/* Array of subpattern offsets */  in php_pcre_match_impl()  local
677 offsets = (int *)safe_emalloc(size_offsets, sizeof(int), 0); in php_pcre_match_impl()
678 memset(offsets, 0, size_offsets*sizeof(int)); in php_pcre_match_impl()
695 exoptions|g_notempty, offsets, size_offsets); in php_pcre_match_impl()
713 …if ((offsets[1] - offsets[0] < 0) || pcre_get_substring_list(subject, offsets, count, &stringlist)… in php_pcre_match_impl()
715 efree(offsets); in php_pcre_match_impl()
727 offsets[(i<<1)+1] - offsets[i<<1], offsets[i<<1], NULL); in php_pcre_match_impl()
730 offsets[(i<<1)+1] - offsets[i<<1], 1); in php_pcre_match_impl()
761 offsets[(i<<1)+1] - offsets[i<<1], offsets[i<<1], subpat_names[i]); in php_pcre_match_impl()
765 offsets[(i<<1)+1] - offsets[i<<1], 1); in php_pcre_match_impl()
768 offsets[(i<<1)+1] - offsets[i<<1], 1); in php_pcre_match_impl()
783 offsets[(i<<1)+1] - offsets[i<<1], in php_pcre_match_impl()
784 offsets[i<<1], subpat_names[i]); in php_pcre_match_impl()
788 offsets[(i<<1)+1] - offsets[i<<1], 1); in php_pcre_match_impl()
791 offsets[(i<<1)+1] - offsets[i<<1], 1); in php_pcre_match_impl()
810 offsets[0] = start_offset; in php_pcre_match_impl()
811 offsets[1] = start_offset + unit_len; in php_pcre_match_impl()
823 g_notempty = (offsets[1] == offsets[0])? PCRE_NOTEMPTY_ATSTART | PCRE_ANCHORED : 0; in php_pcre_match_impl()
826 start_offset = offsets[1]; in php_pcre_match_impl()
846 efree(offsets); in php_pcre_match_impl()
915 static int preg_do_repl_func(zval *function, char *subject, int *offsets, char **subpat_names, int … in preg_do_repl_func() argument
927 …add_assoc_stringl(subpats, subpat_names[i], &subject[offsets[i<<1]] , offsets[(i<<1)+1] - offsets[… in preg_do_repl_func()
929 add_next_index_stringl(subpats, &subject[offsets[i<<1]], offsets[(i<<1)+1] - offsets[i<<1], 1); in preg_do_repl_func()
945 result_len = offsets[1] - offsets[0]; in preg_do_repl_func()
946 *result = estrndup(&subject[offsets[0]], result_len); in preg_do_repl_func()
958 int *offsets, int count, char **result TSRMLS_DC) in preg_do_eval() argument
993 match = subject + offsets[backref<<1]; in preg_do_eval()
994 match_len = offsets[(backref<<1)+1] - offsets[backref<<1]; in preg_do_eval()
1074 int *offsets; /* Array of subpattern offsets */ in php_pcre_replace_impl() local
1147 offsets = (int *)safe_emalloc(size_offsets, sizeof(int), 0); in php_pcre_replace_impl()
1161 exoptions|g_notempty, offsets, size_offsets); in php_pcre_replace_impl()
1174 if (count > 0 && (offsets[1] - offsets[0] >= 0) && (limit == -1 || limit > 0)) { in php_pcre_replace_impl()
1179 match = subject + offsets[0]; in php_pcre_replace_impl()
1181 new_len = *result_len + offsets[0] - start_offset; /* part before the match */ in php_pcre_replace_impl()
1186 offsets, count, &eval_result TSRMLS_CC); in php_pcre_replace_impl()
1190 …eval_result_len = preg_do_repl_func(replace_val, subject, offsets, subpat_names, count, mark, &eva… in php_pcre_replace_impl()
1204 new_len += offsets[(backref<<1)+1] - offsets[backref<<1]; in php_pcre_replace_impl()
1246 match_len = offsets[(backref<<1)+1] - offsets[backref<<1]; in php_pcre_replace_impl()
1247 memcpy(walkbuf, subject + offsets[backref<<1], match_len); in php_pcre_replace_impl()
1272 offsets[0] = start_offset; in php_pcre_replace_impl()
1273 offsets[1] = start_offset + unit_len; in php_pcre_replace_impl()
1302 g_notempty = (offsets[1] == offsets[0])? PCRE_NOTEMPTY_ATSTART | PCRE_ANCHORED : 0; in php_pcre_replace_impl()
1305 start_offset = offsets[1]; in php_pcre_replace_impl()
1308 efree(offsets); in php_pcre_replace_impl()
1572 int *offsets; /* Array of subpattern offsets */ in php_pcre_split_impl() local
1613 offsets = (int *)safe_emalloc(size_offsets, sizeof(int), 0); in php_pcre_split_impl()
1625 exoptions|g_notempty, offsets, size_offsets); in php_pcre_split_impl()
1637 if (count > 0 && (offsets[1] - offsets[0] >= 0)) { in php_pcre_split_impl()
1638 if (!no_empty || &subject[offsets[0]] != last_match) { in php_pcre_split_impl()
1642 add_offset_pair(return_value, last_match, &subject[offsets[0]]-last_match, next_offset, NULL); in php_pcre_split_impl()
1646 &subject[offsets[0]]-last_match, 1); in php_pcre_split_impl()
1654 last_match = &subject[offsets[1]]; in php_pcre_split_impl()
1655 next_offset = offsets[1]; in php_pcre_split_impl()
1660 match_len = offsets[(i<<1)+1] - offsets[i<<1]; in php_pcre_split_impl()
1664 add_offset_pair(return_value, &subject[offsets[i<<1]], match_len, offsets[i<<1], NULL); in php_pcre_split_impl()
1667 &subject[offsets[i<<1]], in php_pcre_split_impl()
1689 exoptions, offsets, size_offsets); in php_pcre_split_impl()
1695 offsets[0] = start_offset; in php_pcre_split_impl()
1696 offsets[1] = start_offset + 1; in php_pcre_split_impl()
1709 g_notempty = (offsets[1] == offsets[0])? PCRE_NOTEMPTY_ATSTART | PCRE_ANCHORED : 0; in php_pcre_split_impl()
1712 start_offset = offsets[1]; in php_pcre_split_impl()
1731 efree(offsets); in php_pcre_split_impl()
1854 int *offsets; /* Array of subpattern offsets */ in php_pcre_grep_impl() local
1883 offsets = (int *)safe_emalloc(size_offsets, sizeof(int), 0); in php_pcre_grep_impl()
1903 0, offsets, size_offsets); in php_pcre_grep_impl()
1942 efree(offsets); in php_pcre_grep_impl()