Lines Matching refs:p
167 UChar* p = ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, start, s); in onigenc_get_right_adjust_char_head() local
168 if (p < s) { in onigenc_get_right_adjust_char_head()
169 p += enclen(enc, p); in onigenc_get_right_adjust_char_head()
171 return p; in onigenc_get_right_adjust_char_head()
178 UChar* p = ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, start, s); in onigenc_get_right_adjust_char_head_with_prev() local
180 if (p < s) { in onigenc_get_right_adjust_char_head_with_prev()
181 if (prev) *prev = (const UChar* )p; in onigenc_get_right_adjust_char_head_with_prev()
182 p += enclen(enc, p); in onigenc_get_right_adjust_char_head_with_prev()
186 *prev = onigenc_get_prev_char_head(enc, start, p); in onigenc_get_right_adjust_char_head_with_prev()
188 return p; in onigenc_get_right_adjust_char_head_with_prev()
213 onigenc_step(OnigEncoding enc, const UChar* p, const UChar* end, int n) in onigenc_step() argument
215 UChar* q = (UChar* )p; in onigenc_step()
223 onigenc_strlen(OnigEncoding enc, const UChar* p, const UChar* end) in onigenc_strlen() argument
226 UChar* q = (UChar* )p; in onigenc_strlen()
239 UChar* p = (UChar* )s; in onigenc_strlen_null() local
242 if (*p == '\0') { in onigenc_strlen_null()
247 q = p + 1; in onigenc_strlen_null()
255 p += ONIGENC_MBC_ENC_LEN(enc, p); in onigenc_strlen_null()
264 UChar* p = (UChar* )s; in onigenc_str_bytelen_null() local
267 if (*p == '\0') { in onigenc_str_bytelen_null()
271 if (len == 1) return (int )(p - start); in onigenc_str_bytelen_null()
272 q = p + 1; in onigenc_str_bytelen_null()
278 if (len == 1) return (int )(p - start); in onigenc_str_bytelen_null()
280 p += ONIGENC_MBC_ENC_LEN(enc, p); in onigenc_str_bytelen_null()
529 const OnigUChar* p, const OnigUChar* end ARG_UNUSED, in onigenc_ascii_get_case_fold_codes_by_str() argument
532 if (0x41 <= *p && *p <= 0x5a) { in onigenc_ascii_get_case_fold_codes_by_str()
535 items[0].code[0] = (OnigCodePoint )(*p + 0x20); in onigenc_ascii_get_case_fold_codes_by_str()
538 else if (0x61 <= *p && *p <= 0x7a) { in onigenc_ascii_get_case_fold_codes_by_str()
541 items[0].code[0] = (OnigCodePoint )(*p - 0x20); in onigenc_ascii_get_case_fold_codes_by_str()
589 const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) in onigenc_get_case_fold_codes_by_str_with_map() argument
591 if (0x41 <= *p && *p <= 0x5a) { in onigenc_get_case_fold_codes_by_str_with_map()
594 items[0].code[0] = (OnigCodePoint )(*p + 0x20); in onigenc_get_case_fold_codes_by_str_with_map()
595 if (*p == 0x53 && ess_tsett_flag != 0 && end > p + 1 in onigenc_get_case_fold_codes_by_str_with_map()
596 && (*(p+1) == 0x53 || *(p+1) == 0x73)) { in onigenc_get_case_fold_codes_by_str_with_map()
606 else if (0x61 <= *p && *p <= 0x7a) { in onigenc_get_case_fold_codes_by_str_with_map()
609 items[0].code[0] = (OnigCodePoint )(*p - 0x20); in onigenc_get_case_fold_codes_by_str_with_map()
610 if (*p == 0x73 && ess_tsett_flag != 0 && end > p + 1 in onigenc_get_case_fold_codes_by_str_with_map()
611 && (*(p+1) == 0x73 || *(p+1) == 0x53)) { in onigenc_get_case_fold_codes_by_str_with_map()
621 else if (*p == 0xdf && ess_tsett_flag != 0) { in onigenc_get_case_fold_codes_by_str_with_map()
648 if (*p == map[i].from) { in onigenc_get_case_fold_codes_by_str_with_map()
654 else if (*p == map[i].to) { in onigenc_get_case_fold_codes_by_str_with_map()
676 onigenc_is_mbc_newline_0x0a(const UChar* p, const UChar* end) in onigenc_is_mbc_newline_0x0a() argument
678 if (p < end) { in onigenc_is_mbc_newline_0x0a()
679 if (*p == 0x0a) return 1; in onigenc_is_mbc_newline_0x0a()
686 onigenc_ascii_mbc_case_fold(OnigCaseFoldType flag ARG_UNUSED, const UChar** p, in onigenc_ascii_mbc_case_fold() argument
689 *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(**p); in onigenc_ascii_mbc_case_fold()
691 (*p)++; in onigenc_ascii_mbc_case_fold()
696 onigenc_single_byte_mbc_enc_len(const UChar* p ARG_UNUSED) in onigenc_single_byte_mbc_enc_len()
702 onigenc_single_byte_mbc_to_code(const UChar* p, const UChar* end ARG_UNUSED) in onigenc_single_byte_mbc_to_code() argument
704 return (OnigCodePoint )(*p); in onigenc_single_byte_mbc_to_code()
750 const UChar* p, const UChar* end) in onigenc_length_check_is_valid_mbc_string() argument
752 while (p < end) { in onigenc_length_check_is_valid_mbc_string()
753 p += enclen(enc, p); in onigenc_length_check_is_valid_mbc_string()
756 if (p != end) in onigenc_length_check_is_valid_mbc_string()
769 onigenc_mbn_mbc_to_code(OnigEncoding enc, const UChar* p, const UChar* end) in onigenc_mbn_mbc_to_code() argument
774 len = enclen(enc, p); in onigenc_mbn_mbc_to_code()
775 n = (OnigCodePoint )(*p++); in onigenc_mbn_mbc_to_code()
779 if (p >= end) break; in onigenc_mbn_mbc_to_code()
780 c = *p++; in onigenc_mbn_mbc_to_code()
792 const UChar *p = *pp; in onigenc_mbn_mbc_case_fold() local
794 if (ONIGENC_IS_MBC_ASCII(p)) { in onigenc_mbn_mbc_case_fold()
795 *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p); in onigenc_mbn_mbc_case_fold()
802 len = enclen(enc, p); in onigenc_mbn_mbc_case_fold()
804 *lower++ = *p++; in onigenc_mbn_mbc_case_fold()
814 UChar *p = buf; in onigenc_mb2_code_to_mbc() local
817 *p++ = (UChar )((code >> 8) & 0xff); in onigenc_mb2_code_to_mbc()
819 *p++ = (UChar )(code & 0xff); in onigenc_mb2_code_to_mbc()
822 if (enclen(enc, buf) != (p - buf)) in onigenc_mb2_code_to_mbc()
825 return (int )(p - buf); in onigenc_mb2_code_to_mbc()
831 UChar *p = buf; in onigenc_mb4_code_to_mbc() local
834 *p++ = (UChar )((code >> 24) & 0xff); in onigenc_mb4_code_to_mbc()
836 if ((code & 0xff0000) != 0 || p != buf) { in onigenc_mb4_code_to_mbc()
837 *p++ = (UChar )((code >> 16) & 0xff); in onigenc_mb4_code_to_mbc()
839 if ((code & 0xff00) != 0 || p != buf) { in onigenc_mb4_code_to_mbc()
840 *p++ = (UChar )((code >> 8) & 0xff); in onigenc_mb4_code_to_mbc()
842 *p++ = (UChar )(code & 0xff); in onigenc_mb4_code_to_mbc()
845 if (enclen(enc, buf) != (p - buf)) in onigenc_mb4_code_to_mbc()
848 return (int )(p - buf); in onigenc_mb4_code_to_mbc()
852 onigenc_minimum_property_name_to_ctype(OnigEncoding enc, UChar* p, UChar* end) in onigenc_minimum_property_name_to_ctype() argument
875 len = onigenc_strlen(enc, p, end); in onigenc_minimum_property_name_to_ctype()
878 onigenc_with_ascii_strncmp(enc, p, end, pb->name, pb->len) == 0) in onigenc_minimum_property_name_to_ctype()
926 onigenc_with_ascii_strncmp(OnigEncoding enc, const UChar* p, const UChar* end, in onigenc_with_ascii_strncmp() argument
932 if (p >= end) return (int )(*sascii); in onigenc_with_ascii_strncmp()
934 c = (int )ONIGENC_MBC_TO_CODE(enc, p, end); in onigenc_with_ascii_strncmp()
939 p += enclen(enc, p); in onigenc_with_ascii_strncmp()