From 6270ad5b7fb3eb5293358096d993610dda283ce8 Mon Sep 17 00:00:00 2001 From: akr Date: Mon, 8 Sep 2008 14:33:17 +0000 Subject: * include/ruby/encoding.h (rb_econv_asciicompat_encoding): renamed from rb_econv_stateless_encoding to apply stateless ASCII incompatible encodings such as UTF-16BE. * io.c (make_writeconv): use rb_econv_asciicompat_encoding. * transcode_data.h (rb_transcoder_asciicompat_type_t): renamed from rb_transcoder_stateful_type_t. (rb_transcoder): use rb_transcoder_asciicompat_type_t. * transcode.c: follow the type change. (asciicompat_encoding_i): renamed from stateless_encoding_i. (rb_econv_asciicompat_encoding): renamed from rb_econv_stateless_encoding. (econv_s_asciicompat_encoding): method renamed. * tool/transcode-tblgen.rb: follow the type change. * enc/trans/utf_16_32.trans: follow the type change. rb_from_UTF_16BE to UTF-8 is asciicompat_decoder. rb_from_UTF_16LE to UTF-8 is asciicompat_decoder. rb_from_UTF_32BE to UTF-8 is asciicompat_decoder. rb_from_UTF_32LE to UTF-8 is asciicompat_decoder. UTF-8 to rb_to_UTF_16BE is asciicompat_encoder. UTF-8 to rb_to_UTF_16LE is asciicompat_encoder. UTF-8 to rb_to_UTF_32BE is asciicompat_encoder. UTF-8 to rb_to_UTF_32LE is asciicompat_encoder. * enc/trans/newline.trans: follow the type change. universal newline decoder is asciicompat_converter. * enc/trans/escape.trans: follow the type change. * enc/trans/iso2022.trans: ditto. * enc/trans/japanese.trans: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- enc/trans/escape.trans | 2 +- enc/trans/iso2022.trans | 8 ++++---- enc/trans/japanese.trans | 4 ++-- enc/trans/newline.trans | 6 +++--- enc/trans/utf_16_32.trans | 16 ++++++++-------- 5 files changed, 18 insertions(+), 18 deletions(-) (limited to 'enc/trans') diff --git a/enc/trans/escape.trans b/enc/trans/escape.trans index cc1513724b..63836c37a6 100644 --- a/enc/trans/escape.trans +++ b/enc/trans/escape.trans @@ -79,7 +79,7 @@ rb_escape_xml_attr_quote = { 1, /* input_unit_length */ 1, /* max_input */ 7, /* max_output */ - stateful_encoder, /* stateful_type */ + asciicompat_encoder, /* asciicompat_type */ 1, escape_xml_attr_quote_init, escape_xml_attr_quote_init, NULL, NULL, NULL, fun_so_escape_xml_attr_quote, escape_xml_attr_quote_finish diff --git a/enc/trans/iso2022.trans b/enc/trans/iso2022.trans index b3dd7f0742..f8a9c2c2e1 100644 --- a/enc/trans/iso2022.trans +++ b/enc/trans/iso2022.trans @@ -114,7 +114,7 @@ rb_iso2022jp_decoder = { 1, /* input_unit_length */ 3, /* max_input */ 3, /* max_output */ - stateful_decoder, /* stateful_type */ + asciicompat_decoder, /* asciicompat_type */ 1, iso2022jp_init, iso2022jp_init, /* state_size, state_init, state_fini */ NULL, fun_si_iso2022jp_decoder, NULL, fun_so_iso2022jp_decoder }; @@ -196,7 +196,7 @@ rb_iso2022jp_encoder = { 1, /* input_unit_length */ 3, /* max_input */ 5, /* max_output */ - stateful_encoder, /* stateful_type */ + asciicompat_encoder, /* asciicompat_type */ 1, iso2022jp_init, iso2022jp_init, /* state_size, state_init, state_fini */ NULL, NULL, NULL, fun_so_iso2022jp_encoder, finish_iso2022jp_encoder, @@ -218,7 +218,7 @@ rb_stateless_iso2022jp_to_eucjp = { 1, /* input_unit_length */ 3, /* max_input */ 2, /* max_output */ - stateless_converter, /* stateful_type */ + asciicompat_converter, /* asciicompat_type */ 0, NULL, NULL, /* state_size, state_init, state_fini */ NULL, NULL, NULL, fun_so_stateless_iso2022jp_to_eucjp, }; @@ -239,7 +239,7 @@ rb_eucjp_to_stateless_iso2022jp = { 1, /* input_unit_length */ 3, /* max_input */ 3, /* max_output */ - stateless_converter, /* stateful_type */ + asciicompat_converter, /* asciicompat_type */ 0, NULL, NULL, /* state_size, state_init, state_fini */ NULL, NULL, NULL, fun_so_eucjp_to_stateless_iso2022jp, }; diff --git a/enc/trans/japanese.trans b/enc/trans/japanese.trans index 64f38fbfc6..12321f587f 100644 --- a/enc/trans/japanese.trans +++ b/enc/trans/japanese.trans @@ -73,7 +73,7 @@ rb_eucjp2sjis = { 1, /* input_unit_length */ 3, /* max_input */ 2, /* max_output */ - stateless_converter, /* stateful_type */ + asciicompat_converter, /* asciicompat_type */ 0, NULL, NULL, /* state_size, state_init, state_fini */ NULL, NULL, NULL, fun_so_eucjp2sjis }; @@ -85,7 +85,7 @@ rb_sjis2eucjp = { 1, /* input_unit_length */ 2, /* max_input */ 2, /* max_output */ - stateless_converter, /* stateful_type */ + asciicompat_converter, /* asciicompat_type */ 0, NULL, NULL, /* state_size, state_init, state_fini */ NULL, NULL, NULL, fun_so_sjis2eucjp }; diff --git a/enc/trans/newline.trans b/enc/trans/newline.trans index 9e5229f9a6..db49a9f003 100644 --- a/enc/trans/newline.trans +++ b/enc/trans/newline.trans @@ -92,7 +92,7 @@ rb_universal_newline = { 1, /* input_unit_length */ 1, /* max_input */ 1, /* max_output */ - stateful_decoder, /* stateful_type */ + asciicompat_converter, /* asciicompat_type */ 2, universal_newline_init, universal_newline_init, /* state_size, state_init, state_fini */ NULL, NULL, NULL, fun_so_universal_newline, universal_newline_finish @@ -105,7 +105,7 @@ rb_crlf_newline = { 1, /* input_unit_length */ 1, /* max_input */ 2, /* max_output */ - stateless_converter, /* stateful_type */ + asciicompat_converter, /* asciicompat_type */ 0, NULL, NULL, /* state_size, state_init, state_fini */ NULL, NULL, NULL, NULL }; @@ -117,7 +117,7 @@ rb_cr_newline = { 1, /* input_unit_length */ 1, /* max_input */ 1, /* max_output */ - stateless_converter, /* stateful_type */ + asciicompat_converter, /* asciicompat_type */ 0, NULL, NULL, /* state_size, state_init, state_fini */ NULL, NULL, NULL, NULL }; diff --git a/enc/trans/utf_16_32.trans b/enc/trans/utf_16_32.trans index 9ffff341a9..88648266c6 100644 --- a/enc/trans/utf_16_32.trans +++ b/enc/trans/utf_16_32.trans @@ -266,7 +266,7 @@ rb_from_UTF_16BE = { 2, /* input_unit_length */ 4, /* max_input */ 4, /* max_output */ - stateless_converter, /* stateful_type */ + asciicompat_decoder, /* asciicompat_type */ 0, NULL, NULL, /* state_size, state_init, state_fini */ NULL, NULL, NULL, fun_so_from_utf_16be }; @@ -278,7 +278,7 @@ rb_to_UTF_16BE = { 1, /* input_unit_length */ 4, /* max_input */ 4, /* max_output */ - stateless_converter, /* stateful_type */ + asciicompat_encoder, /* asciicompat_type */ 0, NULL, NULL, /* state_size, state_init, state_fini */ NULL, NULL, NULL, fun_so_to_utf_16be }; @@ -290,7 +290,7 @@ rb_from_UTF_16LE = { 2, /* input_unit_length */ 4, /* max_input */ 4, /* max_output */ - stateless_converter, /* stateful_type */ + asciicompat_decoder, /* asciicompat_type */ 0, NULL, NULL, /* state_size, state_init, state_fini */ NULL, NULL, NULL, fun_so_from_utf_16le }; @@ -302,7 +302,7 @@ rb_to_UTF_16LE = { 1, /* input_unit_length */ 4, /* max_input */ 4, /* max_output */ - stateless_converter, /* stateful_type */ + asciicompat_encoder, /* asciicompat_type */ 0, NULL, NULL, /* state_size, state_init, state_fini */ NULL, NULL, NULL, fun_so_to_utf_16le }; @@ -314,7 +314,7 @@ rb_from_UTF_32BE = { 4, /* input_unit_length */ 4, /* max_input */ 4, /* max_output */ - stateless_converter, /* stateful_type */ + asciicompat_decoder, /* asciicompat_type */ 0, NULL, NULL, /* state_size, state_init, state_fini */ NULL, NULL, NULL, fun_so_from_utf_32be }; @@ -326,7 +326,7 @@ rb_to_UTF_32BE = { 1, /* input_unit_length */ 4, /* max_input */ 4, /* max_output */ - stateless_converter, /* stateful_type */ + asciicompat_encoder, /* asciicompat_type */ 0, NULL, NULL, /* state_size, state_init, state_fini */ NULL, NULL, NULL, fun_so_to_utf_32be }; @@ -338,7 +338,7 @@ rb_from_UTF_32LE = { 4, /* input_unit_length */ 4, /* max_input */ 4, /* max_output */ - stateless_converter, /* stateful_type */ + asciicompat_decoder, /* asciicompat_type */ 0, NULL, NULL, /* state_size, state_init, state_fini */ NULL, NULL, NULL, fun_so_from_utf_32le }; @@ -350,7 +350,7 @@ rb_to_UTF_32LE = { 1, /* input_unit_length */ 4, /* max_input */ 4, /* max_output */ - stateless_converter, /* stateful_type */ + asciicompat_encoder, /* asciicompat_type */ 0, NULL, NULL, /* state_size, state_init, state_fini */ NULL, NULL, NULL, fun_so_to_utf_32le }; -- cgit v1.2.3