diff options
Diffstat (limited to 'enc/utf_32le.c')
-rw-r--r-- | enc/utf_32le.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/enc/utf_32le.c b/enc/utf_32le.c index aa448200c6..31693eed05 100644 --- a/enc/utf_32le.c +++ b/enc/utf_32le.c @@ -44,11 +44,7 @@ utf32le_is_mbc_newline(const UChar* p, const UChar* end, if (*p == 0x0a && *(p+1) == 0 && *(p+2) == 0 && *(p+3) == 0) return 1; #ifdef USE_UNICODE_ALL_LINE_TERMINATORS - if (( -#ifndef USE_CRNL_AS_LINE_TERMINATOR - *p == 0x0d || -#endif - *p == 0x85) + if ((*p == 0x0b ||*p == 0x0c ||*p == 0x0d || *p == 0x85) && *(p+1) == 0x00 && (p+2) == 0x00 && *(p+3) == 0x00) return 1; if (*(p+1) == 0x20 && (*p == 0x29 || *p == 0x28) @@ -159,7 +155,7 @@ utf32le_left_adjust_char_head(const UChar* start, const UChar* s, const UChar* e if (s <= start) return (UChar* )s; - rem = (s - start) % 4; + rem = (int )((s - start) % 4); return (UChar* )(s - rem); } @@ -189,6 +185,8 @@ OnigEncodingDefine(utf_32le, UTF_32LE) = { onigenc_unicode_is_code_ctype, onigenc_utf16_32_get_ctype_code_range, utf32le_left_adjust_char_head, - onigenc_always_false_is_allowed_reverse_match + onigenc_always_false_is_allowed_reverse_match, + 0, + ONIGENC_FLAG_UNICODE, }; ENC_ALIAS("UCS-4LE", "UTF-32LE") |