Lines Matching refs:p

63 utf8_mbc_enc_len(const UChar* p)  in utf8_mbc_enc_len()  argument
65 return EncLen_UTF8[*p]; in utf8_mbc_enc_len()
69 utf8_is_mbc_newline(const UChar* p, const UChar* end) in utf8_is_mbc_newline() argument
71 if (p < end) { in utf8_is_mbc_newline()
72 if (*p == 0x0a) return 1; in utf8_is_mbc_newline()
75 if (*p == 0x0d) return 1; in utf8_is_mbc_newline()
76 if (p + 1 < end) { in utf8_is_mbc_newline()
77 if (*(p+1) == 0x85 && *p == 0xc2) /* U+0085 */ in utf8_is_mbc_newline()
79 if (p + 2 < end) { in utf8_is_mbc_newline()
80 if ((*(p+2) == 0xa8 || *(p+2) == 0xa9) in utf8_is_mbc_newline()
81 && *(p+1) == 0x80 && *p == 0xe2) /* U+2028, U+2029 */ in utf8_is_mbc_newline()
92 utf8_mbc_to_code(const UChar* p, const UChar* end) in utf8_mbc_to_code() argument
97 len = enc_len(ONIG_ENCODING_UTF8, p); in utf8_mbc_to_code()
98 c = *p++; in utf8_mbc_to_code()
103 c = *p++; in utf8_mbc_to_code()
174 UChar *p = buf; in utf8_code_to_mbc() local
177 *p++ = (UChar )(((code>>6)& 0x1f) | 0xc0); in utf8_code_to_mbc()
180 *p++ = (UChar )(((code>>12) & 0x0f) | 0xe0); in utf8_code_to_mbc()
181 *p++ = UTF8_TRAILS(code, 6); in utf8_code_to_mbc()
184 *p++ = (UChar )(((code>>18) & 0x07) | 0xf0); in utf8_code_to_mbc()
185 *p++ = UTF8_TRAILS(code, 12); in utf8_code_to_mbc()
186 *p++ = UTF8_TRAILS(code, 6); in utf8_code_to_mbc()
189 *p++ = (UChar )(((code>>24) & 0x03) | 0xf8); in utf8_code_to_mbc()
190 *p++ = UTF8_TRAILS(code, 18); in utf8_code_to_mbc()
191 *p++ = UTF8_TRAILS(code, 12); in utf8_code_to_mbc()
192 *p++ = UTF8_TRAILS(code, 6); in utf8_code_to_mbc()
195 *p++ = (UChar )(((code>>30) & 0x01) | 0xfc); in utf8_code_to_mbc()
196 *p++ = UTF8_TRAILS(code, 24); in utf8_code_to_mbc()
197 *p++ = UTF8_TRAILS(code, 18); in utf8_code_to_mbc()
198 *p++ = UTF8_TRAILS(code, 12); in utf8_code_to_mbc()
199 *p++ = UTF8_TRAILS(code, 6); in utf8_code_to_mbc()
203 *p = 0xfe; in utf8_code_to_mbc()
207 *p = 0xff; in utf8_code_to_mbc()
215 *p++ = UTF8_TRAIL0(code); in utf8_code_to_mbc()
216 return p - buf; in utf8_code_to_mbc()
223 const UChar* p = *pp; in utf8_mbc_to_normalize() local
225 if (ONIGENC_IS_MBC_ASCII(p)) { in utf8_mbc_to_normalize()
227 *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p); in utf8_mbc_to_normalize()
230 *lower = *p; in utf8_mbc_to_normalize()
238 if (*p == 195) { /* 195 == '\303' */ in utf8_mbc_to_normalize()
239 int c = *(p + 1); in utf8_mbc_to_normalize()
244 *lower++ = *p; in utf8_mbc_to_normalize()
253 len = enc_len(ONIG_ENCODING_UTF8, p); in utf8_mbc_to_normalize()
254 if (lower != p) { in utf8_mbc_to_normalize()
257 *lower++ = *p++; in utf8_mbc_to_normalize()
268 const UChar* p = *pp; in utf8_is_mbc_ambiguous() local
270 if (ONIGENC_IS_MBC_ASCII(p)) { in utf8_is_mbc_ambiguous()
273 return ONIGENC_IS_ASCII_CODE_CASE_AMBIG(*p); in utf8_is_mbc_ambiguous()
277 (*pp) += enc_len(ONIG_ENCODING_UTF8, p); in utf8_is_mbc_ambiguous()
279 if (*p == 195) { /* 195 == '\303' */ in utf8_is_mbc_ambiguous()
280 int c = *(p + 1); in utf8_is_mbc_ambiguous()
3694 const UChar *p; in utf8_left_adjust_char_head() local
3697 p = s; in utf8_left_adjust_char_head()
3699 while (!utf8_islead(*p) && p > start) p--; in utf8_left_adjust_char_head()
3700 return (UChar* )p; in utf8_left_adjust_char_head()