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()
129 mbc_to_code(const UChar* p, const UChar* end) in mbc_to_code() argument
134 len = enclen(ONIG_ENCODING_SJIS, p); in mbc_to_code()
135 c = *p++; in mbc_to_code()
140 if (p >= end) break; in mbc_to_code()
141 c = *p++; in mbc_to_code()
150 UChar *p = buf; in code_to_mbc() local
152 if ((code & 0xff00) != 0) *p++ = (UChar )(((code >> 8) & 0xff)); in code_to_mbc()
153 *p++ = (UChar )(code & 0xff); in code_to_mbc()
156 if (enclen(ONIG_ENCODING_SJIS, buf) != (p - buf)) in code_to_mbc()
159 return p - buf; in code_to_mbc()
166 const UChar* p = *pp; in mbc_case_fold() local
168 if (ONIGENC_IS_MBC_ASCII(p)) { in mbc_case_fold()
169 *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p); in mbc_case_fold()
175 int len = enclen(ONIG_ENCODING_SJIS, p); in mbc_case_fold()
178 *lower++ = *p++; in mbc_case_fold()
214 const UChar *p; in left_adjust_char_head() local
218 p = s; in left_adjust_char_head()
220 if (SJIS_ISMB_TRAIL(*p)) { in left_adjust_char_head()
221 while (p > start) { in left_adjust_char_head()
222 if (! SJIS_ISMB_FIRST(*--p)) { in left_adjust_char_head()
223 p++; in left_adjust_char_head()
228 len = enclen(ONIG_ENCODING_SJIS, p); in left_adjust_char_head()
229 if (p + len > s) return (UChar* )p; in left_adjust_char_head()
230 p += len; in left_adjust_char_head()
231 return (UChar* )(p + ((s - p) & ~1)); in left_adjust_char_head()
262 property_name_to_ctype(OnigEncoding enc, UChar* p, UChar* end) in property_name_to_ctype() argument
265 int len = end - p; in property_name_to_ctype()
269 xmemcpy(q, p, (size_t )len); in property_name_to_ctype()