summaryrefslogtreecommitdiff
path: root/regenc.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-23 09:39:30 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-23 09:39:30 +0000
commite1def8a98713beef25e048c5333d418624f7d192 (patch)
treea6f3b3fd17ac060558423ec3eac44ab6be4b1944 /regenc.c
parent46eb6e9428918e78e852562a6926adc76f81ed97 (diff)
downloadruby-e1def8a98713beef25e048c5333d418624f7d192.tar.gz
* include/ruby/oniguruma.h: upgrade to Oniguruma 5.9.0. fixes
some memory violation. [ruby-dev:31070] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regenc.c')
-rw-r--r--regenc.c23
1 files changed, 5 insertions, 18 deletions
diff --git a/regenc.c b/regenc.c
index 9f50cb63db..50fef7c070 100644
--- a/regenc.c
+++ b/regenc.c
@@ -169,10 +169,7 @@ onigenc_str_bytelen_null(OnigEncoding enc, const UChar* s)
}
}
-const UChar* OnigEncAsciiToLowerCaseTable = (const UChar* )0;
-
-#ifndef USE_EXTERNAL_LOWER_CASE_CONV_TABLE
-static const UChar BuiltInAsciiToLowerCaseTable[] = {
+const UChar OnigEncAsciiToLowerCaseTable[] = {
'\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
'\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
'\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
@@ -206,7 +203,6 @@ static const UChar BuiltInAsciiToLowerCaseTable[] = {
'\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
'\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377',
};
-#endif /* not USE_EXTERNAL_LOWER_CASE_CONV_TABLE */
#ifdef USE_UPPER_CASE_TABLE
const UChar OnigEncAsciiToUpperCaseTable[256] = {
@@ -355,17 +351,8 @@ const UChar OnigEncISO_8859_1_ToUpperCaseTable[256] = {
extern void
onigenc_set_default_caseconv_table(const UChar* table)
{
- if (table == (const UChar* )0) {
-#ifndef USE_EXTERNAL_LOWER_CASE_CONV_TABLE
- table = BuiltInAsciiToLowerCaseTable;
-#else
- return ;
-#endif
- }
-
- if (table != OnigEncAsciiToLowerCaseTable) {
- OnigEncAsciiToLowerCaseTable = table;
- }
+ /* nothing */
+ /* obsoleted. */
}
extern UChar*
@@ -732,7 +719,7 @@ onigenc_mb2_code_to_mbc(OnigEncoding enc, OnigCodePoint code, UChar *buf)
#if 1
if (enc_len(enc, buf) != (p - buf))
- return ONIGENCERR_INVALID_WIDE_CHAR_VALUE;
+ return ONIGENC_ERR_INVALID_WIDE_CHAR_VALUE;
#endif
return p - buf;
}
@@ -755,7 +742,7 @@ onigenc_mb4_code_to_mbc(OnigEncoding enc, OnigCodePoint code, UChar *buf)
#if 1
if (enc_len(enc, buf) != (p - buf))
- return ONIGENCERR_INVALID_WIDE_CHAR_VALUE;
+ return ONIGENC_ERR_INVALID_WIDE_CHAR_VALUE;
#endif
return p - buf;
}