diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-09 06:02:01 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-09 06:02:01 +0000 |
commit | 139234e1a091ac3167d3bebdfcd29b3952665334 (patch) | |
tree | c1f7be47d34829813983af23e46340bf806d4ff4 /enc/trans/iso2022.erb.c | |
parent | 750cb61e65f35feb70ad855ab3353485cfd75b0c (diff) | |
download | ruby-139234e1a091ac3167d3bebdfcd29b3952665334.tar.gz |
* transcode_data.h (rb_transcoding): add fields for restartable
transcoding.
(rb_transcoder): add max_input field.
from_unit_length field is renamed to input_unit_length.
* tool/transcode-tblgen.rb: generate max_input field.
* enc/trans/iso2022.erb.c: follow rb_transcoder change.
* enc/trans/utf_16_32.erb.c: ditto.
* transcode.c (PARTIAL_INPUT): new constant.
(transcode_char_start): new function.
(transcode_result_t): new type.
(transcode_restartable): new function.
(more_output_buffer): new function.
(transcode_loop): use transcode_restartable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enc/trans/iso2022.erb.c')
-rw-r--r-- | enc/trans/iso2022.erb.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/enc/trans/iso2022.erb.c b/enc/trans/iso2022.erb.c index 72553f4054..3209fad163 100644 --- a/enc/trans/iso2022.erb.c +++ b/enc/trans/iso2022.erb.c @@ -57,7 +57,10 @@ fun_so_iso2022jp_to_eucjp(rb_transcoding* t, const unsigned char* s, size_t l, u static const rb_transcoder rb_ISO_2022_JP_to_EUC_JP = { - "ISO-2022-JP", "EUC-JP", &iso2022jp_to_eucjp, 1, 3, + "ISO-2022-JP", "EUC-JP", &iso2022jp_to_eucjp, + 1, /* input_unit_length */ + 3, /* max_input */ + 3, /* max_output */ NULL, fun_si_iso2022jp_to_eucjp, NULL, fun_so_iso2022jp_to_eucjp }; @@ -129,7 +132,10 @@ finish_eucjp_to_iso2022jp(rb_transcoding *t, unsigned char *o) static const rb_transcoder rb_EUC_JP_to_ISO_2022_JP = { - "EUC-JP", "ISO-2022-JP", &eucjp_to_iso2022jp, 1, 5, + "EUC-JP", "ISO-2022-JP", &eucjp_to_iso2022jp, + 1, /* input_unit_length */ + 3, /* max_input */ + 5, /* max_output */ NULL, NULL, NULL, fun_so_eucjp_to_iso2022jp, finish_eucjp_to_iso2022jp }; |