Lines Matching refs:p
63 mbc_enc_len(const UChar* p) in mbc_enc_len() argument
65 return EncLen_UTF8[*p]; in mbc_enc_len()
69 is_mbc_newline(const UChar* p, const UChar* end) in is_mbc_newline() argument
71 if (p < end) { in is_mbc_newline()
72 if (*p == 0x0a) return 1; in is_mbc_newline()
76 if (*p == 0x0d) return 1; in is_mbc_newline()
78 if (p + 1 < end) { in is_mbc_newline()
79 if (*(p+1) == 0x85 && *p == 0xc2) /* U+0085 */ in is_mbc_newline()
81 if (p + 2 < end) { in is_mbc_newline()
82 if ((*(p+2) == 0xa8 || *(p+2) == 0xa9) in is_mbc_newline()
83 && *(p+1) == 0x80 && *p == 0xe2) /* U+2028, U+2029 */ in is_mbc_newline()
94 mbc_to_code(const UChar* p, const UChar* end) in mbc_to_code() argument
99 len = mbc_enc_len(p); in mbc_to_code()
100 if (len > end - p) len = end - p; in mbc_to_code()
102 c = *p++; in mbc_to_code()
107 c = *p++; in mbc_to_code()
150 UChar *p = buf; in code_to_mbc() local
153 *p++ = (UChar )(((code>>6)& 0x1f) | 0xc0); in code_to_mbc()
156 *p++ = (UChar )(((code>>12) & 0x0f) | 0xe0); in code_to_mbc()
157 *p++ = UTF8_TRAILS(code, 6); in code_to_mbc()
160 *p++ = (UChar )(((code>>18) & 0x07) | 0xf0); in code_to_mbc()
161 *p++ = UTF8_TRAILS(code, 12); in code_to_mbc()
162 *p++ = UTF8_TRAILS(code, 6); in code_to_mbc()
165 *p++ = (UChar )(((code>>24) & 0x03) | 0xf8); in code_to_mbc()
166 *p++ = UTF8_TRAILS(code, 18); in code_to_mbc()
167 *p++ = UTF8_TRAILS(code, 12); in code_to_mbc()
168 *p++ = UTF8_TRAILS(code, 6); in code_to_mbc()
171 *p++ = (UChar )(((code>>30) & 0x01) | 0xfc); in code_to_mbc()
172 *p++ = UTF8_TRAILS(code, 24); in code_to_mbc()
173 *p++ = UTF8_TRAILS(code, 18); in code_to_mbc()
174 *p++ = UTF8_TRAILS(code, 12); in code_to_mbc()
175 *p++ = UTF8_TRAILS(code, 6); in code_to_mbc()
179 *p = 0xfe; in code_to_mbc()
183 *p = 0xff; in code_to_mbc()
191 *p++ = UTF8_TRAIL0(code); in code_to_mbc()
192 return p - buf; in code_to_mbc()
200 const UChar* p = *pp; in mbc_case_fold() local
202 if (ONIGENC_IS_MBC_ASCII(p)) { in mbc_case_fold()
205 if (*p == 0x49) { in mbc_case_fold()
214 *fold = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p); in mbc_case_fold()
228 const UChar* p = *pp;
230 if (ONIGENC_IS_MBC_ASCII(p)) {
232 return ONIGENC_IS_ASCII_CODE_CASE_AMBIG(*p);
235 (*pp) += enclen(ONIG_ENCODING_UTF8, p);
237 if (*p == 0xc3) {
238 int c = *(p + 1);
273 const UChar *p; in left_adjust_char_head() local
276 p = s; in left_adjust_char_head()
278 while (!utf8_islead(*p) && p > start) p--; in left_adjust_char_head()
279 return (UChar* )p; in left_adjust_char_head()
284 const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) in get_case_fold_codes_by_str() argument
287 flag, p, end, items); in get_case_fold_codes_by_str()