Lines Matching refs:p

64 mbc_enc_len(const UChar* p)  in mbc_enc_len()  argument
66 return EncLen_UTF8[*p]; in mbc_enc_len()
70 is_valid_mbc_string(const UChar* p, const UChar* end) in is_valid_mbc_string() argument
74 while (p < end) { in is_valid_mbc_string()
75 if (! utf8_islead(*p)) in is_valid_mbc_string()
78 len = mbc_enc_len(p++); in is_valid_mbc_string()
81 if (p == end) in is_valid_mbc_string()
84 if (! utf8_istail(*p++)) in is_valid_mbc_string()
94 is_mbc_newline(const UChar* p, const UChar* end) in is_mbc_newline() argument
96 if (p < end) { in is_mbc_newline()
97 if (*p == 0x0a) return 1; in is_mbc_newline()
101 if (*p == 0x0d) return 1; in is_mbc_newline()
103 if (p + 1 < end) { in is_mbc_newline()
104 if (*(p+1) == 0x85 && *p == 0xc2) /* U+0085 */ in is_mbc_newline()
106 if (p + 2 < end) { in is_mbc_newline()
107 if ((*(p+2) == 0xa8 || *(p+2) == 0xa9) in is_mbc_newline()
108 && *(p+1) == 0x80 && *p == 0xe2) /* U+2028, U+2029 */ in is_mbc_newline()
119 mbc_to_code(const UChar* p, const UChar* end) in mbc_to_code() argument
124 len = mbc_enc_len(p); in mbc_to_code()
125 if (len > end - p) len = end - p; in mbc_to_code()
127 c = *p++; in mbc_to_code()
132 c = *p++; in mbc_to_code()
175 UChar *p = buf; in code_to_mbc() local
178 *p++ = (UChar )(((code>>6)& 0x1f) | 0xc0); in code_to_mbc()
181 *p++ = (UChar )(((code>>12) & 0x0f) | 0xe0); in code_to_mbc()
182 *p++ = UTF8_TRAILS(code, 6); in code_to_mbc()
185 *p++ = (UChar )(((code>>18) & 0x07) | 0xf0); in code_to_mbc()
186 *p++ = UTF8_TRAILS(code, 12); in code_to_mbc()
187 *p++ = UTF8_TRAILS(code, 6); in code_to_mbc()
190 *p++ = (UChar )(((code>>24) & 0x03) | 0xf8); in code_to_mbc()
191 *p++ = UTF8_TRAILS(code, 18); in code_to_mbc()
192 *p++ = UTF8_TRAILS(code, 12); in code_to_mbc()
193 *p++ = UTF8_TRAILS(code, 6); in code_to_mbc()
196 *p++ = (UChar )(((code>>30) & 0x01) | 0xfc); in code_to_mbc()
197 *p++ = UTF8_TRAILS(code, 24); in code_to_mbc()
198 *p++ = UTF8_TRAILS(code, 18); in code_to_mbc()
199 *p++ = UTF8_TRAILS(code, 12); in code_to_mbc()
200 *p++ = UTF8_TRAILS(code, 6); in code_to_mbc()
204 *p = 0xfe; in code_to_mbc()
208 *p = 0xff; in code_to_mbc()
216 *p++ = UTF8_TRAIL0(code); in code_to_mbc()
217 return p - buf; in code_to_mbc()
225 const UChar* p = *pp; in mbc_case_fold() local
227 if (ONIGENC_IS_MBC_ASCII(p)) { in mbc_case_fold()
230 if (*p == 0x49) { in mbc_case_fold()
239 *fold = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p); in mbc_case_fold()
253 const UChar* p = *pp;
255 if (ONIGENC_IS_MBC_ASCII(p)) {
257 return ONIGENC_IS_ASCII_CODE_CASE_AMBIG(*p);
260 (*pp) += enclen(ONIG_ENCODING_UTF8, p);
262 if (*p == 0xc3) {
263 int c = *(p + 1);
298 const UChar *p; in left_adjust_char_head() local
301 p = s; in left_adjust_char_head()
303 while (!utf8_islead(*p) && p > start) p--; in left_adjust_char_head()
304 return (UChar* )p; in left_adjust_char_head()
309 const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) in get_case_fold_codes_by_str() argument
312 flag, p, end, items); in get_case_fold_codes_by_str()