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) == 0x85) && *p == 0x00)
97 if (*p == 0x20 && (*(p+1) == 0x29 || *(p+1) == 0x28))
111 code = ((((p[0] << 8) + p[1]) & 0x03ff) << 10)
112 + (((p[2] << 8) + p[3]) & 0x03ff) + 0x10000;
115 code = p[0] * 256 + p[1];
124 return (code > 0xffff ? 4 : 2);
134 unsigned int high = (code >> 10) + 0xD7C0;
135 unsigned int low = (code & 0x3FF) + 0xDC00;
136 *p++ = (high >> 8) & 0xFF;
138 *p++ = (low >> 8) & 0xFF;
143 *p++ = (
UChar )((code & 0xff00) >> 8);
144 *p++ = (
UChar )(code & 0xff);
158 #ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI
196 v = ONIGENC_IS_UNICODE_ISO_8859_1_BIT_CTYPE(c,
201 if (c >= 0xaa && c <= 0xba)
217 if (s <= start)
return (
UChar* )
s;
219 if ((s - start) % 2 == 1) {
236 flag, p, end, items);
int onigenc_unicode_is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
unsigned int OnigCodePoint
#define OnigEncodingDefine(f, n)
static OnigCodePoint utf16be_mbc_to_code(const UChar *p, const UChar *end ARG_UNUSED, OnigEncoding enc)
unsigned int OnigCaseFoldType
static int utf16be_code_to_mbclen(OnigCodePoint code, OnigEncoding enc)
#define ENC_ALIAS(name, orig)
#define ONIGENC_IS_ASCII_CODE(code)
int onigenc_unicode_property_name_to_ctype(OnigEncoding enc, UChar *name, UChar *end)
static int utf16be_code_to_mbc(OnigCodePoint code, UChar *buf, OnigEncoding enc)
static const int EncLen_UTF16[]
#define UTF16_IS_SURROGATE_SECOND(c)
int onigenc_unicode_mbc_case_fold(OnigEncoding enc, OnigCaseFoldType flag ARG_UNUSED, const UChar **pp, const UChar *end, UChar *fold)
int onigenc_always_false_is_allowed_reverse_match(const UChar *s ARG_UNUSED, const UChar *end ARG_UNUSED, OnigEncoding enc ARG_UNUSED)
unsigned char buf[MIME_BUF_SIZE]
int onigenc_unicode_apply_all_case_fold(OnigCaseFoldType flag, OnigApplyAllCaseFoldFunc f, void *arg, OnigEncoding enc ARG_UNUSED)
#define ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(n)
#define ONIGENC_CASE_FOLD_TURKISH_AZERI
static int utf16be_get_case_fold_codes_by_str(OnigCaseFoldType flag, const OnigUChar *p, const OnigUChar *end, OnigCaseFoldCodeItem items[], OnigEncoding enc)
static UChar * utf16be_left_adjust_char_head(const UChar *start, const UChar *s, const UChar *end, OnigEncoding enc ARG_UNUSED)
#define ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(n)
static int utf16be_mbc_case_fold(OnigCaseFoldType flag, const UChar **pp, const UChar *end, UChar *fold, OnigEncoding enc)
#define UTF16_IS_SURROGATE(c)
#define ONIGENC_CONSTRUCT_MBCLEN_INVALID()
static int utf16be_mbc_enc_len(const UChar *p, const OnigUChar *e ARG_UNUSED, OnigEncoding enc ARG_UNUSED)
static int utf16be_is_mbc_newline(const UChar *p, const UChar *end, OnigEncoding enc)
int onigenc_unicode_get_case_fold_codes_by_str(OnigEncoding enc, OnigCaseFoldType flag, const OnigUChar *p, const OnigUChar *end, OnigCaseFoldCodeItem items[])
#define ONIGENC_ASCII_CODE_TO_LOWER_CASE(c)
#define INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR
#define UTF16_IS_SURROGATE_FIRST(c)
int onigenc_utf16_32_get_ctype_code_range(OnigCtype ctype, OnigCodePoint *sb_out, const OnigCodePoint *ranges[], struct OnigEncodingTypeST *enc ARG_UNUSED)