diff options
Diffstat (limited to 'enc')
-rw-r--r-- | enc/trans/iso2022.erb.c | 10 | ||||
-rw-r--r-- | enc/trans/utf_16_32.erb.c | 40 |
2 files changed, 40 insertions, 10 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 }; diff --git a/enc/trans/utf_16_32.erb.c b/enc/trans/utf_16_32.erb.c index 86f1ed4727..aea2ab50a8 100644 --- a/enc/trans/utf_16_32.erb.c +++ b/enc/trans/utf_16_32.erb.c @@ -231,7 +231,10 @@ fun_so_to_utf_32le(rb_transcoding* t, const unsigned char* s, size_t l, unsigned static const rb_transcoder rb_from_UTF_16BE = { - "UTF-16BE", "UTF-8", &from_UTF_16BE, 2, 4, + "UTF-16BE", "UTF-8", &from_UTF_16BE, + 2, /* input_unit_length */ + 4, /* max_input */ + 4, /* max_output */ NULL, NULL, NULL, &fun_so_from_utf_16be }; @@ -252,7 +255,10 @@ rb_from_UTF_16BE = { static const rb_transcoder rb_to_UTF_16BE = { - "UTF-8", "UTF-16BE", &to_UTF_16BE, 1, 4, + "UTF-8", "UTF-16BE", &to_UTF_16BE, + 1, /* input_unit_length */ + 4, /* max_input */ + 4, /* max_output */ NULL, NULL, NULL, &fun_so_to_utf_16be }; @@ -265,13 +271,19 @@ rb_to_UTF_16BE = { static const rb_transcoder rb_from_UTF_16LE = { - "UTF-16LE", "UTF-8", &from_UTF_16LE, 2, 4, + "UTF-16LE", "UTF-8", &from_UTF_16LE, + 2, /* input_unit_length */ + 4, /* max_input */ + 4, /* max_output */ NULL, NULL, NULL, &fun_so_from_utf_16le }; static const rb_transcoder rb_to_UTF_16LE = { - "UTF-8", "UTF-16LE", &to_UTF_16BE, 1, 4, + "UTF-8", "UTF-16LE", &to_UTF_16BE, + 1, /* input_unit_length */ + 4, /* max_input */ + 4, /* max_output */ NULL, NULL, NULL, &fun_so_to_utf_16le }; @@ -284,13 +296,19 @@ rb_to_UTF_16LE = { static const rb_transcoder rb_from_UTF_32BE = { - "UTF-32BE", "UTF-8", &from_UTF_32BE, 4, 4, + "UTF-32BE", "UTF-8", &from_UTF_32BE, + 4, /* input_unit_length */ + 4, /* max_input */ + 4, /* max_output */ NULL, NULL, NULL, &fun_so_from_utf_32be }; static const rb_transcoder rb_to_UTF_32BE = { - "UTF-8", "UTF-32BE", &to_UTF_16BE, 1, 4, + "UTF-8", "UTF-32BE", &to_UTF_16BE, + 1, /* input_unit_length */ + 4, /* max_input */ + 4, /* max_output */ NULL, NULL, NULL, &fun_so_to_utf_32be }; @@ -303,13 +321,19 @@ rb_to_UTF_32BE = { static const rb_transcoder rb_from_UTF_32LE = { - "UTF-32LE", "UTF-8", &from_UTF_32LE, 4, 4, + "UTF-32LE", "UTF-8", &from_UTF_32LE, + 4, /* input_unit_length */ + 4, /* max_input */ + 4, /* max_output */ NULL, NULL, NULL, &fun_so_from_utf_32le }; static const rb_transcoder rb_to_UTF_32LE = { - "UTF-8", "UTF-32LE", &to_UTF_16BE, 1, 4, + "UTF-8", "UTF-32LE", &to_UTF_16BE, + 1, /* input_unit_length */ + 4, /* max_input */ + 4, /* max_output */ NULL, NULL, NULL, &fun_so_to_utf_32le }; |