diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-07-23 09:39:30 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-07-23 09:39:30 +0000 |
commit | 83c2d8a221461d442e86db009b1d4edba3f559bf (patch) | |
tree | a6f3b3fd17ac060558423ec3eac44ab6be4b1944 /utf8.c | |
parent | 622580678f3f23bb04e1df627b7e7cfef2244017 (diff) | |
download | ruby-83c2d8a221461d442e86db009b1d4edba3f559bf.tar.gz ruby-83c2d8a221461d442e86db009b1d4edba3f559bf.tar.xz ruby-83c2d8a221461d442e86db009b1d4edba3f559bf.zip |
* include/ruby/oniguruma.h: upgrade to Oniguruma 5.9.0. fixes
some memory violation. [ruby-dev:31070]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'utf8.c')
-rw-r--r-- | utf8.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -2,7 +2,7 @@ utf8.c - Oniguruma (regular expression library) **********************************************************************/ /*- - * Copyright (c) 2002-2006 K.Kosako <sndgk393 AT ybb DOT ne DOT jp> + * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -72,7 +72,9 @@ utf8_is_mbc_newline(const UChar* p, const UChar* end) if (*p == 0x0a) return 1; #ifdef USE_UNICODE_ALL_LINE_TERMINATORS +#ifndef USE_CRNL_AS_LINE_TERMINATOR if (*p == 0x0d) return 1; +#endif if (p + 1 < end) { if (*(p+1) == 0x85 && *p == 0xc2) /* U+0085 */ return 1; @@ -133,7 +135,7 @@ utf8_code_to_mbclen(OnigCodePoint code) else if (code == INVALID_CODE_FF) return 1; #endif else - return ONIGENCERR_TOO_BIG_WIDE_CHAR_VALUE; + return ONIGENC_ERR_TOO_BIG_WIDE_CHAR_VALUE; } #if 0 @@ -154,7 +156,7 @@ utf8_code_to_mbc_first(OnigCodePoint code) else if ((code & 0x80000000) == 0) return ((code>>30) & 0x01) | 0xfc; else { - return ONIGENCERR_TOO_BIG_WIDE_CHAR_VALUE; + return ONIGENC_ERR_TOO_BIG_WIDE_CHAR_VALUE; } } } @@ -209,7 +211,7 @@ utf8_code_to_mbc(OnigCodePoint code, UChar *buf) } #endif else { - return ONIGENCERR_TOO_BIG_WIDE_CHAR_VALUE; + return ONIGENC_ERR_TOO_BIG_WIDE_CHAR_VALUE; } *p++ = UTF8_TRAIL0(code); |