diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-17 07:42:23 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-17 07:42:23 +0000 |
commit | 0424e152c684a85f4b0691f1e84aec203115333d (patch) | |
tree | ccb4af1c7fa12a09934f315edba0b9d839e57ceb /enc/utf_32be.c | |
parent | 5362e7fcddf70d16fc4261383f99175c90881353 (diff) | |
download | ruby-0424e152c684a85f4b0691f1e84aec203115333d.tar.gz |
* Merge Onigmo-5.13.1. [ruby-dev:45057] [Feature #5820]
https://github.com/k-takata/Onigmo
cp reg{comp,enc,error,exec,parse,syntax}.c reg{enc,int,parse}.h
cp oniguruma.h
cp tool/enc-unicode.rb
cp -r enc/
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enc/utf_32be.c')
-rw-r--r-- | enc/utf_32be.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/enc/utf_32be.c b/enc/utf_32be.c index 2671448d44..43c07e2e8f 100644 --- a/enc/utf_32be.c +++ b/enc/utf_32be.c @@ -44,11 +44,7 @@ utf32be_is_mbc_newline(const UChar* p, const UChar* end, if (*(p+3) == 0x0a && *(p+2) == 0 && *(p+1) == 0 && *p == 0) return 1; #ifdef USE_UNICODE_ALL_LINE_TERMINATORS - if (( -#ifndef USE_CRNL_AS_LINE_TERMINATOR - *(p+3) == 0x0d || -#endif - *(p+3) == 0x85) + if ((*(p+3) == 0x0b || *(p+3) == 0x0c || *(p+3) == 0x0d || *(p+3) == 0x85) && *(p+2) == 0 && *(p+1) == 0 && *p == 0x00) return 1; if (*(p+2) == 0x20 && (*(p+3) == 0x29 || *(p+3) == 0x28) @@ -159,7 +155,7 @@ utf32be_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,7 +185,9 @@ OnigEncodingDefine(utf_32be, UTF_32BE) = { onigenc_unicode_is_code_ctype, onigenc_utf16_32_get_ctype_code_range, utf32be_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-4BE", "UTF-32BE") |