Permalink
Browse files

* enc/utf_{16,32}{be,le}.c: remove some ARG_UNUSED. replace struct

  OnigEncodingST by OnigEncoding.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information...
1 parent edc61cf commit 904572d2e5a35c6fde655aeb24b11fcb9f7b5ba3 @nurse nurse committed Jan 15, 2008
Showing with 37 additions and 32 deletions.
  1. +5 −0 ChangeLog
  2. +8 −8 enc/utf_16be.c
  3. +8 −8 enc/utf_16le.c
  4. +8 −8 enc/utf_32be.c
  5. +8 −8 enc/utf_32le.c
View
@@ -1,3 +1,8 @@
+Tue Jan 15 23:00:08 2008 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * enc/utf_{16,32}{be,le}.c: remove some ARG_UNUSED. replace struct
+ OnigEncodingST by OnigEncoding.
+
Tue Jan 15 22:30:43 2008 NARUSE, Yui <naruse@ruby-lang.org>
* encoding.c (ENC_REGISTER): use &OnigEncoding*.
View
@@ -53,14 +53,14 @@ static const int EncLen_UTF16[] = {
static int
utf16be_mbc_enc_len(const UChar* p, const OnigUChar* e ARG_UNUSED,
- struct OnigEncodingTypeST* enc ARG_UNUSED)
+ OnigEncoding enc ARG_UNUSED)
{
return EncLen_UTF16[*p];
}
static int
utf16be_is_mbc_newline(const UChar* p, const UChar* end,
- struct OnigEncodingTypeST* enc ARG_UNUSED)
+ OnigEncoding enc)
{
if (p + 1 < end) {
if (*(p+1) == 0x0a && *p == 0x00)
@@ -81,7 +81,7 @@ utf16be_is_mbc_newline(const UChar* p, const UChar* end,
static OnigCodePoint
utf16be_mbc_to_code(const UChar* p, const UChar* end ARG_UNUSED,
- struct OnigEncodingTypeST* enc ARG_UNUSED)
+ OnigEncoding enc)
{
OnigCodePoint code;
@@ -98,14 +98,14 @@ utf16be_mbc_to_code(const UChar* p, const UChar* end ARG_UNUSED,
static int
utf16be_code_to_mbclen(OnigCodePoint code,
- struct OnigEncodingTypeST* enc ARG_UNUSED)
+ OnigEncoding enc)
{
return (code > 0xffff ? 4 : 2);
}
static int
utf16be_code_to_mbc(OnigCodePoint code, UChar *buf,
- struct OnigEncodingTypeST* enc ARG_UNUSED)
+ OnigEncoding enc)
{
UChar* p = buf;
@@ -130,7 +130,7 @@ utf16be_code_to_mbc(OnigCodePoint code, UChar *buf,
static int
utf16be_mbc_case_fold(OnigCaseFoldType flag,
const UChar** pp, const UChar* end, UChar* fold,
- struct OnigEncodingTypeST* enc ARG_UNUSED)
+ OnigEncoding enc)
{
const UChar* p = *pp;
@@ -193,7 +193,7 @@ utf16be_is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* e
static UChar*
utf16be_left_adjust_char_head(const UChar* start, const UChar* s,
- struct OnigEncodingTypeST* enc ARG_UNUSED)
+ OnigEncoding enc ARG_UNUSED)
{
if (s <= start) return (UChar* )s;
@@ -211,7 +211,7 @@ static int
utf16be_get_case_fold_codes_by_str(OnigCaseFoldType flag,
const OnigUChar* p, const OnigUChar* end,
OnigCaseFoldCodeItem items[],
- struct OnigEncodingTypeST* enc ARG_UNUSED)
+ OnigEncoding enc)
{
return onigenc_unicode_get_case_fold_codes_by_str(enc,
flag, p, end, items);
View
@@ -53,14 +53,14 @@ static const int EncLen_UTF16[] = {
static int
utf16le_mbc_enc_len(const UChar* p, const OnigUChar* e ARG_UNUSED,
- struct OnigEncodingTypeST* enc ARG_UNUSED)
+ OnigEncoding enc ARG_UNUSED)
{
return EncLen_UTF16[*(p+1)];
}
static int
utf16le_is_mbc_newline(const UChar* p, const UChar* end,
- struct OnigEncodingTypeST* enc ARG_UNUSED)
+ OnigEncoding enc ARG_UNUSED)
{
if (p + 1 < end) {
if (*p == 0x0a && *(p+1) == 0x00)
@@ -81,7 +81,7 @@ utf16le_is_mbc_newline(const UChar* p, const UChar* end,
static OnigCodePoint
utf16le_mbc_to_code(const UChar* p, const UChar* end ARG_UNUSED,
- struct OnigEncodingTypeST* enc ARG_UNUSED)
+ OnigEncoding enc ARG_UNUSED)
{
OnigCodePoint code;
UChar c0 = *p;
@@ -100,14 +100,14 @@ utf16le_mbc_to_code(const UChar* p, const UChar* end ARG_UNUSED,
static int
utf16le_code_to_mbclen(OnigCodePoint code,
- struct OnigEncodingTypeST* enc ARG_UNUSED)
+ OnigEncoding enc ARG_UNUSED)
{
return (code > 0xffff ? 4 : 2);
}
static int
utf16le_code_to_mbc(OnigCodePoint code, UChar *buf,
- struct OnigEncodingTypeST* enc ARG_UNUSED)
+ OnigEncoding enc ARG_UNUSED)
{
UChar* p = buf;
@@ -133,7 +133,7 @@ utf16le_code_to_mbc(OnigCodePoint code, UChar *buf,
static int
utf16le_mbc_case_fold(OnigCaseFoldType flag,
const UChar** pp, const UChar* end, UChar* fold,
- struct OnigEncodingTypeST* enc ARG_UNUSED)
+ OnigEncoding enc)
{
const UChar* p = *pp;
@@ -194,7 +194,7 @@ utf16le_is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp,
static UChar*
utf16le_left_adjust_char_head(const UChar* start, const UChar* s,
- struct OnigEncodingTypeST* enc ARG_UNUSED)
+ OnigEncoding enc ARG_UNUSED)
{
if (s <= start) return (UChar* )s;
@@ -212,7 +212,7 @@ static int
utf16le_get_case_fold_codes_by_str(OnigCaseFoldType flag,
const OnigUChar* p, const OnigUChar* end,
OnigCaseFoldCodeItem items[],
- struct OnigEncodingTypeST* enc ARG_UNUSED)
+ OnigEncoding enc)
{
return onigenc_unicode_get_case_fold_codes_by_str(enc,
flag, p, end, items);
View
@@ -31,14 +31,14 @@
static int
utf32be_mbc_enc_len(const UChar* p ARG_UNUSED, const OnigUChar* e ARG_UNUSED,
- struct OnigEncodingTypeST* enc ARG_UNUSED)
+ OnigEncoding enc ARG_UNUSED)
{
return 4;
}
static int
utf32be_is_mbc_newline(const UChar* p, const UChar* end,
- struct OnigEncodingTypeST* enc ARG_UNUSED)
+ OnigEncoding enc ARG_UNUSED)
{
if (p + 3 < end) {
if (*(p+3) == 0x0a && *(p+2) == 0 && *(p+1) == 0 && *p == 0)
@@ -61,21 +61,21 @@ utf32be_is_mbc_newline(const UChar* p, const UChar* end,
static OnigCodePoint
utf32be_mbc_to_code(const UChar* p, const UChar* end ARG_UNUSED,
- struct OnigEncodingTypeST* enc ARG_UNUSED)
+ OnigEncoding enc ARG_UNUSED)
{
return (OnigCodePoint )(((p[0] * 256 + p[1]) * 256 + p[2]) * 256 + p[3]);
}
static int
utf32be_code_to_mbclen(OnigCodePoint code ARG_UNUSED,
- struct OnigEncodingTypeST* enc ARG_UNUSED)
+ OnigEncoding enc ARG_UNUSED)
{
return 4;
}
static int
utf32be_code_to_mbc(OnigCodePoint code, UChar *buf,
- struct OnigEncodingTypeST* enc ARG_UNUSED)
+ OnigEncoding enc ARG_UNUSED)
{
UChar* p = buf;
@@ -89,7 +89,7 @@ utf32be_code_to_mbc(OnigCodePoint code, UChar *buf,
static int
utf32be_mbc_case_fold(OnigCaseFoldType flag,
const UChar** pp, const UChar* end, UChar* fold,
- struct OnigEncodingTypeST* enc ARG_UNUSED)
+ OnigEncoding enc)
{
const UChar* p = *pp;
@@ -153,7 +153,7 @@ utf32be_is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* e
static UChar*
utf32be_left_adjust_char_head(const UChar* start, const UChar* s,
- struct OnigEncodingTypeST* enc ARG_UNUSED)
+ OnigEncoding enc ARG_UNUSED)
{
int rem;
@@ -167,7 +167,7 @@ static int
utf32be_get_case_fold_codes_by_str(OnigCaseFoldType flag,
const OnigUChar* p, const OnigUChar* end,
OnigCaseFoldCodeItem items[],
- struct OnigEncodingTypeST* enc ARG_UNUSED)
+ OnigEncoding enc)
{
return onigenc_unicode_get_case_fold_codes_by_str(enc,
flag, p, end, items);
View
@@ -31,14 +31,14 @@
static int
utf32le_mbc_enc_len(const UChar* p ARG_UNUSED, const OnigUChar* e ARG_UNUSED,
- struct OnigEncodingTypeST* enc ARG_UNUSED)
+ OnigEncoding enc ARG_UNUSED)
{
return 4;
}
static int
utf32le_is_mbc_newline(const UChar* p, const UChar* end,
- struct OnigEncodingTypeST* enc ARG_UNUSED)
+ OnigEncoding enc ARG_UNUSED)
{
if (p + 3 < end) {
if (*p == 0x0a && *(p+1) == 0 && *(p+2) == 0 && *(p+3) == 0)
@@ -61,21 +61,21 @@ utf32le_is_mbc_newline(const UChar* p, const UChar* end,
static OnigCodePoint
utf32le_mbc_to_code(const UChar* p, const UChar* end ARG_UNUSED,
- struct OnigEncodingTypeST* enc ARG_UNUSED)
+ OnigEncoding enc ARG_UNUSED)
{
return (OnigCodePoint )(((p[3] * 256 + p[2]) * 256 + p[1]) * 256 + p[0]);
}
static int
utf32le_code_to_mbclen(OnigCodePoint code ARG_UNUSED,
- struct OnigEncodingTypeST* enc ARG_UNUSED)
+ OnigEncoding enc ARG_UNUSED)
{
return 4;
}
static int
utf32le_code_to_mbc(OnigCodePoint code, UChar *buf,
- struct OnigEncodingTypeST* enc ARG_UNUSED)
+ OnigEncoding enc ARG_UNUSED)
{
UChar* p = buf;
@@ -89,7 +89,7 @@ utf32le_code_to_mbc(OnigCodePoint code, UChar *buf,
static int
utf32le_mbc_case_fold(OnigCaseFoldType flag,
const UChar** pp, const UChar* end, UChar* fold,
- struct OnigEncodingTypeST* enc ARG_UNUSED)
+ OnigEncoding enc)
{
const UChar* p = *pp;
@@ -153,7 +153,7 @@ utf32le_is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* e
static UChar*
utf32le_left_adjust_char_head(const UChar* start, const UChar* s,
- struct OnigEncodingTypeST* enc ARG_UNUSED)
+ OnigEncoding enc ARG_UNUSED)
{
int rem;
@@ -167,7 +167,7 @@ static int
utf32le_get_case_fold_codes_by_str(OnigCaseFoldType flag,
const OnigUChar* p, const OnigUChar* end,
OnigCaseFoldCodeItem items[],
- struct OnigEncodingTypeST* enc ARG_UNUSED)
+ OnigEncoding enc)
{
return onigenc_unicode_get_case_fold_codes_by_str(enc,
flag, p, end, items);

0 comments on commit 904572d

Please sign in to comment.