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 ARG_UNUSED) in mbc_to_code() argument
99 len = enclen(ONIG_ENCODING_UTF8, p); in mbc_to_code()
100 c = *p++; in mbc_to_code()
105 c = *p++; in mbc_to_code()
148 UChar *p = buf; in code_to_mbc() local
151 *p++ = (UChar )(((code>>6)& 0x1f) | 0xc0); in code_to_mbc()
154 *p++ = (UChar )(((code>>12) & 0x0f) | 0xe0); in code_to_mbc()
155 *p++ = UTF8_TRAILS(code, 6); in code_to_mbc()
158 *p++ = (UChar )(((code>>18) & 0x07) | 0xf0); in code_to_mbc()
159 *p++ = UTF8_TRAILS(code, 12); in code_to_mbc()
160 *p++ = UTF8_TRAILS(code, 6); in code_to_mbc()
163 *p++ = (UChar )(((code>>24) & 0x03) | 0xf8); in code_to_mbc()
164 *p++ = UTF8_TRAILS(code, 18); in code_to_mbc()
165 *p++ = UTF8_TRAILS(code, 12); in code_to_mbc()
166 *p++ = UTF8_TRAILS(code, 6); in code_to_mbc()
169 *p++ = (UChar )(((code>>30) & 0x01) | 0xfc); in code_to_mbc()
170 *p++ = UTF8_TRAILS(code, 24); in code_to_mbc()
171 *p++ = UTF8_TRAILS(code, 18); in code_to_mbc()
172 *p++ = UTF8_TRAILS(code, 12); in code_to_mbc()
173 *p++ = UTF8_TRAILS(code, 6); in code_to_mbc()
177 *p = 0xfe; in code_to_mbc()
181 *p = 0xff; in code_to_mbc()
189 *p++ = UTF8_TRAIL0(code); in code_to_mbc()
190 return p - buf; in code_to_mbc()
198 const UChar* p = *pp; in mbc_case_fold() local
200 if (ONIGENC_IS_MBC_ASCII(p)) { in mbc_case_fold()
203 if (*p == 0x49) { in mbc_case_fold()
212 *fold = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p); in mbc_case_fold()
226 const UChar* p = *pp;
228 if (ONIGENC_IS_MBC_ASCII(p)) {
230 return ONIGENC_IS_ASCII_CODE_CASE_AMBIG(*p);
233 (*pp) += enclen(ONIG_ENCODING_UTF8, p);
235 if (*p == 0xc3) {
236 int c = *(p + 1);
271 const UChar *p; in left_adjust_char_head() local
274 p = s; in left_adjust_char_head()
276 while (!utf8_islead(*p) && p > start) p--; in left_adjust_char_head()
277 return (UChar* )p; in left_adjust_char_head()
282 const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) in get_case_fold_codes_by_str() argument
285 flag, p, end, items); in get_case_fold_codes_by_str()