Lines Matching refs:ptr

85 PCRE2_SPTR ptr = *ptrptr;  in find_text_end()  local
87 for (; ptr < ptrend; ptr++) in find_text_end()
91 if (ptr[0] == CHAR_BACKSLASH && ptr < ptrend - 1 && ptr[1] == CHAR_E) in find_text_end()
94 ptr += 1; in find_text_end()
98 else if (*ptr == CHAR_RIGHT_CURLY_BRACKET) in find_text_end()
104 else if (*ptr == CHAR_COLON && !last && nestlevel == 0) goto EXIT; in find_text_end()
106 else if (*ptr == CHAR_DOLLAR_SIGN) in find_text_end()
108 if (ptr < ptrend - 1 && ptr[1] == CHAR_LEFT_CURLY_BRACKET) in find_text_end()
111 ptr += 1; in find_text_end()
115 else if (*ptr == CHAR_BACKSLASH) in find_text_end()
121 if (ptr < ptrend - 1) switch (ptr[1]) in find_text_end()
127 ptr += 1; in find_text_end()
131 ptr += 1; /* Must point after \ */ in find_text_end()
132 erc = PRIV(check_escape)(&ptr, ptrend, &ch, &errorcode, in find_text_end()
134 ptr -= 1; /* Back to last code unit of escape */ in find_text_end()
161 *ptrptr = ptr; in find_text_end()
242 PCRE2_SPTR ptr; in pcre2_substitute() local
473 ptr = replacement; in pcre2_substitute()
476 CHECKMEMCPY(ptr, rlength); in pcre2_substitute()
491 if (ptr >= repend) in pcre2_substitute()
495 ptr = ptrstack[--ptrstackptr]; in pcre2_substitute()
503 if (ptr[0] == CHAR_BACKSLASH && ptr < repend - 1 && ptr[1] == CHAR_E) in pcre2_substitute()
506 ptr += 2; in pcre2_substitute()
514 if (*ptr == CHAR_DOLLAR_SIGN) in pcre2_substitute()
528 if (++ptr >= repend) goto BAD; in pcre2_substitute()
529 if ((next = *ptr) == CHAR_DOLLAR_SIGN) goto LOADLITERAL; in pcre2_substitute()
538 if (++ptr >= repend) goto BAD; in pcre2_substitute()
539 next = *ptr; in pcre2_substitute()
545 if (++ptr >= repend) goto BAD; in pcre2_substitute()
546 next = *ptr; in pcre2_substitute()
553 while (++ptr < repend) in pcre2_substitute()
555 next = *ptr; in pcre2_substitute()
568 while (++ptr < repend && *ptr >= CHAR_0 && *ptr <= CHAR_9); in pcre2_substitute()
586 if (++ptr >= repend) break; in pcre2_substitute()
587 next = *ptr; in pcre2_substitute()
599 !star && ptr < repend - 2 && next == CHAR_COLON) in pcre2_substitute()
601 special = *(++ptr); in pcre2_substitute()
608 text1_start = ++ptr; in pcre2_substitute()
609 rc = find_text_end(code, &ptr, repend, special == CHAR_MINUS); in pcre2_substitute()
611 text1_end = ptr; in pcre2_substitute()
613 if (special == CHAR_PLUS && *ptr == CHAR_COLON) in pcre2_substitute()
615 text2_start = ++ptr; in pcre2_substitute()
616 rc = find_text_end(code, &ptr, repend, TRUE); in pcre2_substitute()
618 text2_end = ptr; in pcre2_substitute()
624 if (ptr >= repend || *ptr != CHAR_RIGHT_CURLY_BRACKET) in pcre2_substitute()
631 ptr++; in pcre2_substitute()
732 ptrstack[ptrstackptr++] = ptr; in pcre2_substitute()
737 ptr = text1_start; in pcre2_substitute()
742 ptr = text2_start; in pcre2_substitute()
798 *ptr == CHAR_BACKSLASH) in pcre2_substitute()
802 if (ptr < repend - 1) switch (ptr[1]) in pcre2_substitute()
806 ptr += 2; in pcre2_substitute()
812 ptr += 2; in pcre2_substitute()
817 ptr += 2; in pcre2_substitute()
823 ptr += 2; in pcre2_substitute()
830 ptr++; /* Point after \ */ in pcre2_substitute()
831 rc = PRIV(check_escape)(&ptr, repend, &ch, &errorcode, in pcre2_substitute()
858 GETCHARINCTEST(ch, ptr); /* Get character value, increment pointer */ in pcre2_substitute()
983 *blength = (PCRE2_SIZE)(ptr - replacement); in pcre2_substitute()