Lines Matching refs:p
74 mbc_enc_len(const UChar* p) in mbc_enc_len() argument
76 return EncLen_SJIS[*p]; in mbc_enc_len()
80 is_valid_mbc_string(const UChar* p, const UChar* end) in is_valid_mbc_string() argument
82 while (p < end) { in is_valid_mbc_string()
83 if (*p < 0x80) { in is_valid_mbc_string()
84 p++; in is_valid_mbc_string()
86 else if (*p < 0xa1) { in is_valid_mbc_string()
87 if (*p == 0xa0 || *p == 0x80) in is_valid_mbc_string()
89 p++; in is_valid_mbc_string()
90 if (p >= end) return FALSE; in is_valid_mbc_string()
91 if (*p < 0x40 || *p > 0xfc || *p == 0x7f) in is_valid_mbc_string()
93 p++; in is_valid_mbc_string()
95 else if (*p < 0xe0) { in is_valid_mbc_string()
96 p++; in is_valid_mbc_string()
98 else if (*p < 0xfd) { in is_valid_mbc_string()
99 p++; in is_valid_mbc_string()
100 if (p >= end) return FALSE; in is_valid_mbc_string()
101 if (*p < 0x40 || *p > 0xfc || *p == 0x7f) in is_valid_mbc_string()
103 p++; in is_valid_mbc_string()
126 mbc_to_code(const UChar* p, const UChar* end) in mbc_to_code() argument
131 len = enclen(ONIG_ENCODING_SJIS, p); in mbc_to_code()
132 c = *p++; in mbc_to_code()
137 if (p >= end) break; in mbc_to_code()
138 c = *p++; in mbc_to_code()
147 UChar *p = buf; in code_to_mbc() local
149 if ((code & 0xff00) != 0) *p++ = (UChar )(((code >> 8) & 0xff)); in code_to_mbc()
150 *p++ = (UChar )(code & 0xff); in code_to_mbc()
152 return (int )(p - buf); in code_to_mbc()
159 const UChar* p = *pp; in mbc_case_fold() local
161 if (ONIGENC_IS_MBC_ASCII(p)) { in mbc_case_fold()
162 *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p); in mbc_case_fold()
168 int len = enclen(ONIG_ENCODING_SJIS, p); in mbc_case_fold()
171 *lower++ = *p++; in mbc_case_fold()
181 const UChar *p; in left_adjust_char_head() local
185 p = s; in left_adjust_char_head()
187 if (SJIS_ISMB_TRAIL(*p)) { in left_adjust_char_head()
188 while (p > start) { in left_adjust_char_head()
189 if (! SJIS_ISMB_FIRST(*--p)) { in left_adjust_char_head()
190 p++; in left_adjust_char_head()
195 len = enclen(ONIG_ENCODING_SJIS, p); in left_adjust_char_head()
196 if (p + len > s) return (UChar* )p; in left_adjust_char_head()
197 p += len; in left_adjust_char_head()
198 return (UChar* )(p + ((s - p) & ~1)); in left_adjust_char_head()
229 property_name_to_ctype(OnigEncoding enc, UChar* p, UChar* end) in property_name_to_ctype() argument
232 int len = (int )(end - p); in property_name_to_ctype()
236 xmemcpy(q, p, (size_t )len); in property_name_to_ctype()