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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
108 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
109 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
110 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, F
120 int firstbyte = *p++;
122 s =
trans[0][firstbyte];
141 len =
enclen(enc, p, end);
143 if (len == 1)
return n;
145 for (i = 1; i <
len; i++) {
157 else if (code > 0xffffff)
159 else if (code & 0x800000)
return 3;
160 else if (code & 0x8000)
return 2;
171 if ((code & 0xff0000) != 0) {
172 first = (code >> 16) & 0xff;
174 else if ((code & 0xff00) != 0) {
175 first = (code >> 8) & 0xff;
189 if ((code & 0xff0000) != 0) *p++ = (
UChar )(((code >> 16) & 0xff));
190 if ((code & 0xff00) != 0) *p++ = (
UChar )(((code >> 8) & 0xff));
191 *p++ = (
UChar )(code & 0xff);
197 return (
int)(p -
buf);
216 len =
enclen(enc, p, end);
217 for (i = 0; i <
len; i++) {
234 if (s <= start)
return (
UChar* )s;
238 len =
enclen(enc, p, end);
239 if (p + len > s)
return (
UChar* )
p;
241 return (
UChar* )(p + ((s -
p) & ~1));
248 if (c <= 0x7e || c == 0x8e || c == 0x8f)
295 for (; p < end; p++) {
347 *ranges = PropertyList[ctype];
static int mbc_enc_len(const UChar *p, const UChar *e, OnigEncoding enc ARG_UNUSED)
unsigned int OnigCodePoint
static int property_name_to_ctype(OnigEncoding enc, UChar *p, UChar *end)
static int PropertyListNum
static const OnigCodePoint CR_Katakana[]
#define ONIGERR_TOO_BIG_WIDE_CHAR_VALUE
int onig_st_lookup_strend(hash_table_type *table, const UChar *str_key, const UChar *end_key, hash_data_type *value)
#define ONIGENC_IS_MBC_ASCII(p)
unsigned int OnigCaseFoldType
static int PropertyListSize
int onig_is_in_code_range(const UChar *p, OnigCodePoint code)
int onigenc_ascii_apply_all_case_fold(OnigCaseFoldType flag ARG_UNUSED, OnigApplyAllCaseFoldFunc f, void *arg, OnigEncoding enc ARG_UNUSED)
#define ENC_ALIAS(name, orig)
static const OnigCodePoint ** PropertyList
#define ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype)
static const OnigCodePoint CR_Hiragana[]
static const int EncLen_EUCJP[]
static int is_allowed_reverse_match(const UChar *s, const UChar *end, OnigEncoding enc ARG_UNUSED)
OnigEncodingDefine(euc_jp, EUC_JP)
#define enclen(enc, p, e)
static const signed char trans[][0x100]
#define PROPERTY_LIST_ADD_PROP(Name, CR)
#define ALLOCA_N(type, n)
static int code_to_mbc(OnigCodePoint code, UChar *buf, OnigEncoding enc)
#define ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(n)
int onigenc_is_mbc_newline_0x0a(const UChar *p, const UChar *end, OnigEncoding enc ARG_UNUSED)
static int init_property_list(void)
unsigned char buf[MIME_BUF_SIZE]
#define ONIG_NO_SUPPORT_CONFIG
#define ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(n)
register unsigned int len
int onigenc_ascii_get_case_fold_codes_by_str(OnigCaseFoldType flag ARG_UNUSED, const OnigUChar *p, const OnigUChar *end ARG_UNUSED, OnigCaseFoldCodeItem items[], OnigEncoding enc ARG_UNUSED)
static OnigCodePoint mbc_to_code(const UChar *p, const UChar *end, OnigEncoding enc)
static int get_ctype_code_range(OnigCtype ctype, OnigCodePoint *sb_out, const OnigCodePoint *ranges[], OnigEncoding enc ARG_UNUSED)
#define ONIGENC_MAX_STD_CTYPE
static int code_to_mbclen(OnigCodePoint code, OnigEncoding enc ARG_UNUSED)
#define ONIGENC_CONSTRUCT_MBCLEN_INVALID()
#define ENC_REPLICATE(name, orig)
static UChar * left_adjust_char_head(const UChar *start, const UChar *s, const UChar *end, OnigEncoding enc)
static hash_table_type * PropertyNameTable
#define ONIGENC_ASCII_CODE_TO_LOWER_CASE(c)
static int PropertyInited
#define ONIGENC_IS_CODE_ASCII(code)
static int is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
#define PROPERTY_LIST_INIT_CHECK
#define ONIGERR_INVALID_CODE_POINT_VALUE
#define CTYPE_IS_WORD_GRAPH_PRINT(ctype)
int onigenc_minimum_property_name_to_ctype(OnigEncoding enc, UChar *p, UChar *end)
static int mbc_case_fold(OnigCaseFoldType flag, const UChar **pp, const UChar *end, UChar *lower, OnigEncoding enc)