diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | enc/utf_16be.c | 16 | ||||
-rw-r--r-- | enc/utf_16le.c | 16 | ||||
-rw-r--r-- | enc/utf_32be.c | 16 | ||||
-rw-r--r-- | enc/utf_32le.c | 16 |
5 files changed, 37 insertions, 32 deletions
@@ -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*. diff --git a/enc/utf_16be.c b/enc/utf_16be.c index 42f8af1f4a..ab5ee1d4a3 100644 --- a/enc/utf_16be.c +++ b/enc/utf_16be.c @@ -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); diff --git a/enc/utf_16le.c b/enc/utf_16le.c index bd3757aff2..355d9c23eb 100644 --- a/enc/utf_16le.c +++ b/enc/utf_16le.c @@ -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); diff --git a/enc/utf_32be.c b/enc/utf_32be.c index 5f8c2a3ece..bbf70cdb81 100644 --- a/enc/utf_32be.c +++ b/enc/utf_32be.c @@ -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); diff --git a/enc/utf_32le.c b/enc/utf_32le.c index 26bbc5d84c..e9da83f20f 100644 --- a/enc/utf_32le.c +++ b/enc/utf_32le.c @@ -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); |