Lines Matching refs:p

56   UChar* p = ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, start, s);  in onigenc_get_right_adjust_char_head()  local
57 if (p < s) { in onigenc_get_right_adjust_char_head()
58 p += enc_len(enc, p); in onigenc_get_right_adjust_char_head()
60 return p; in onigenc_get_right_adjust_char_head()
67 UChar* p = ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, start, s); in onigenc_get_right_adjust_char_head_with_prev() local
69 if (p < s) { in onigenc_get_right_adjust_char_head_with_prev()
70 if (prev) *prev = (const UChar* )p; in onigenc_get_right_adjust_char_head_with_prev()
71 p += enc_len(enc, p); in onigenc_get_right_adjust_char_head_with_prev()
76 return p; in onigenc_get_right_adjust_char_head_with_prev()
101 onigenc_step(OnigEncoding enc, const UChar* p, const UChar* end, int n) in onigenc_step() argument
103 UChar* q = (UChar* )p; in onigenc_step()
111 onigenc_strlen(OnigEncoding enc, const UChar* p, const UChar* end) in onigenc_strlen() argument
114 UChar* q = (UChar* )p; in onigenc_strlen()
127 UChar* p = (UChar* )s; in onigenc_strlen_null() local
130 if (*p == '\0') { in onigenc_strlen_null()
135 q = p + 1; in onigenc_strlen_null()
143 p += ONIGENC_MBC_ENC_LEN(enc, p); in onigenc_strlen_null()
152 UChar* p = (UChar* )s; in onigenc_str_bytelen_null() local
155 if (*p == '\0') { in onigenc_str_bytelen_null()
159 if (len == 1) return (int )(p - start); in onigenc_str_bytelen_null()
160 q = p + 1; in onigenc_str_bytelen_null()
166 if (len == 1) return (int )(p - start); in onigenc_str_bytelen_null()
168 p += ONIGENC_MBC_ENC_LEN(enc, p); in onigenc_str_bytelen_null()
602 onigenc_is_mbc_newline_0x0a(const UChar* p, const UChar* end) in onigenc_is_mbc_newline_0x0a() argument
604 if (p < end) { in onigenc_is_mbc_newline_0x0a()
605 if (*p == 0x0a) return 1; in onigenc_is_mbc_newline_0x0a()
612 onigenc_ascii_mbc_to_normalize(OnigAmbigType flag, const UChar** p, const UChar*end, in onigenc_ascii_mbc_to_normalize() argument
616 *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(**p); in onigenc_ascii_mbc_to_normalize()
619 *lower = **p; in onigenc_ascii_mbc_to_normalize()
622 (*p)++; in onigenc_ascii_mbc_to_normalize()
630 const UChar* p = *pp; in onigenc_ascii_is_mbc_ambiguous() local
634 return ONIGENC_IS_ASCII_CODE_CASE_AMBIG(*p); in onigenc_ascii_is_mbc_ambiguous()
642 onigenc_single_byte_mbc_enc_len(const UChar* p) in onigenc_single_byte_mbc_enc_len() argument
648 onigenc_single_byte_mbc_to_code(const UChar* p, const UChar* end) in onigenc_single_byte_mbc_to_code() argument
650 return (OnigCodePoint )(*p); in onigenc_single_byte_mbc_to_code()
691 onigenc_mbn_mbc_to_code(OnigEncoding enc, const UChar* p, const UChar* end) in onigenc_mbn_mbc_to_code() argument
696 len = enc_len(enc, p); in onigenc_mbn_mbc_to_code()
697 n = (OnigCodePoint )(*p++); in onigenc_mbn_mbc_to_code()
701 if (p >= end) break; in onigenc_mbn_mbc_to_code()
702 c = *p++; in onigenc_mbn_mbc_to_code()
713 const UChar *p = *pp; in onigenc_mbn_mbc_to_normalize() local
715 if (ONIGENC_IS_MBC_ASCII(p)) { in onigenc_mbn_mbc_to_normalize()
717 *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p); in onigenc_mbn_mbc_to_normalize()
720 *lower = *p; in onigenc_mbn_mbc_to_normalize()
726 len = enc_len(enc, p); in onigenc_mbn_mbc_to_normalize()
727 if (lower != p) { in onigenc_mbn_mbc_to_normalize()
730 *lower++ = *p++; in onigenc_mbn_mbc_to_normalize()
742 const UChar* p = *pp; in onigenc_mbn_is_mbc_ambiguous() local
744 if (ONIGENC_IS_MBC_ASCII(p)) { in onigenc_mbn_is_mbc_ambiguous()
747 return ONIGENC_IS_ASCII_CODE_CASE_AMBIG(*p); in onigenc_mbn_is_mbc_ambiguous()
754 (*pp) += enc_len(enc, p); in onigenc_mbn_is_mbc_ambiguous()
811 UChar *p = buf; in onigenc_mb2_code_to_mbc() local
814 *p++ = (UChar )((code >> 8) & 0xff); in onigenc_mb2_code_to_mbc()
816 *p++ = (UChar )(code & 0xff); in onigenc_mb2_code_to_mbc()
819 if (enc_len(enc, buf) != (p - buf)) in onigenc_mb2_code_to_mbc()
822 return p - buf; in onigenc_mb2_code_to_mbc()
828 UChar *p = buf; in onigenc_mb4_code_to_mbc() local
831 *p++ = (UChar )((code >> 24) & 0xff); in onigenc_mb4_code_to_mbc()
833 if ((code & 0xff0000) != 0 || p != buf) { in onigenc_mb4_code_to_mbc()
834 *p++ = (UChar )((code >> 16) & 0xff); in onigenc_mb4_code_to_mbc()
836 if ((code & 0xff00) != 0 || p != buf) { in onigenc_mb4_code_to_mbc()
837 *p++ = (UChar )((code >> 8) & 0xff); in onigenc_mb4_code_to_mbc()
839 *p++ = (UChar )(code & 0xff); in onigenc_mb4_code_to_mbc()
842 if (enc_len(enc, buf) != (p - buf)) in onigenc_mb4_code_to_mbc()
845 return p - buf; in onigenc_mb4_code_to_mbc()
881 onigenc_with_ascii_strncmp(OnigEncoding enc, const UChar* p, const UChar* end, in onigenc_with_ascii_strncmp() argument
887 if (p >= end) return (int )(*sascii); in onigenc_with_ascii_strncmp()
889 c = (int )ONIGENC_MBC_TO_CODE(enc, p, end); in onigenc_with_ascii_strncmp()
894 p += enc_len(enc, p); in onigenc_with_ascii_strncmp()
970 onigenc_mbc_to_lower(OnigEncoding enc, UChar* p, UChar* buf) in onigenc_mbc_to_lower() argument
974 c = m17n_codepoint(enc, p, p + enc_len(enc, *p)); in onigenc_mbc_to_lower()
987 UChar* p = *pp; in onigenc_is_mbc_ambiguous() local
989 len = enc_len(enc, *p); in onigenc_is_mbc_ambiguous()
991 c = m17n_codepoint(enc, p, p + len); in onigenc_is_mbc_ambiguous()
1004 UChar *p; in onigenc_get_left_adjust_char_head() local
1008 p = s; in onigenc_get_left_adjust_char_head()
1010 while (!m17n_islead(enc, *p) && p > start) p--; in onigenc_get_left_adjust_char_head()
1011 while (p + (len = enc_len(enc, *p)) < s) { in onigenc_get_left_adjust_char_head()
1012 p += len; in onigenc_get_left_adjust_char_head()
1014 if (p + len == s) return s; in onigenc_get_left_adjust_char_head()
1015 return p; in onigenc_get_left_adjust_char_head()