ruby-changes:3579
From: ko1@a...
Date: Tue, 15 Jan 2008 23:02:47 +0900 (JST)
Subject: [ruby-changes:3579] naruse - Ruby:r15068 (trunk): * enc/utf_{16,32}{be,le}.c: remove some ARG_UNUSED. replace struct
naruse 2008-01-15 23:02:32 +0900 (Tue, 15 Jan 2008) New Revision: 15068 Modified files: trunk/ChangeLog trunk/enc/utf_16be.c trunk/enc/utf_16le.c trunk/enc/utf_32be.c trunk/enc/utf_32le.c Log: * enc/utf_{16,32}{be,le}.c: remove some ARG_UNUSED. replace struct OnigEncodingST by OnigEncoding. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/enc/utf_32le.c?r1=15068&r2=15067&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=15068&r2=15067&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/enc/utf_32be.c?r1=15068&r2=15067&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/enc/utf_16le.c?r1=15068&r2=15067&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/enc/utf_16be.c?r1=15068&r2=15067&diff_format=u Index: ChangeLog =================================================================== --- ChangeLog (revision 15067) +++ ChangeLog (revision 15068) @@ -1,3 +1,8 @@ +Tue Jan 15 23:00:08 2008 NARUSE, Yui <naruse@r...> + + * 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@r...> * encoding.c (ENC_REGISTER): use &OnigEncoding*. Index: enc/utf_32be.c =================================================================== --- enc/utf_32be.c (revision 15067) +++ enc/utf_32be.c (revision 15068) @@ -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 @@ 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 @@ 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 @@ 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 @@ 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); Index: enc/utf_16be.c =================================================================== --- enc/utf_16be.c (revision 15067) +++ enc/utf_16be.c (revision 15068) @@ -53,14 +53,14 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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); Index: enc/utf_32le.c =================================================================== --- enc/utf_32le.c (revision 15067) +++ enc/utf_32le.c (revision 15068) @@ -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 @@ 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 @@ 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 @@ 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 @@ 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); Index: enc/utf_16le.c =================================================================== --- enc/utf_16le.c (revision 15067) +++ enc/utf_16le.c (revision 15068) @@ -53,14 +53,14 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/