diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-14 14:28:10 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-14 14:28:10 +0000 |
commit | c82aee31b41f0772dd0491c6bfa5cb90b47d0d5a (patch) | |
tree | 534a3869838473b1443fcfa11c036773d0962d93 /transcode_data.h | |
parent | 87779b507e5b845e81e16dc597a989bc6f2183be (diff) |
* include/ruby/encoding.h (rb_econv_result_t): moved from
transcode_data.h.
(rb_econv_elem_t): ditto.
(rb_econv_t): ditto. source_encoding and destination_encoding field
is added.
(rb_econv_open): declared.
(rb_econv_convert): ditto.
(rb_econv_close): ditto.
* transcode.c (rb_econv_open_by_transcoder_entries): initialize
source_encoding and destination_encoding field as NULL.
(rb_econv_open): make it external linkage.
(rb_econv_close): ditto.
(rb_econv_convert): ditto. renamed from rb_econv_conv.
(make_encoding): new function.
(econv_init): use make_encoding and store rb_encoding* in
rb_econv_t.
(econv_source_encoding): new method
Encoding::Converter#source_encoding.
(econv_destination_encoding): new method
Encoding::Converter#destination_encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'transcode_data.h')
-rw-r--r-- | transcode_data.h | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/transcode_data.h b/transcode_data.h index 855984e46f..b53a1813df 100644 --- a/transcode_data.h +++ b/transcode_data.h @@ -111,33 +111,6 @@ struct rb_transcoder { int (*finish_func)(rb_transcoding*, unsigned char*); /* -> output */ }; -typedef enum { - econv_invalid_byte_sequence, - econv_undefined_conversion, - econv_destination_buffer_full, - econv_source_buffer_empty, - econv_finished, - econv_output_followed_by_input, -} rb_econv_result_t; - -typedef struct { - const char *from; - const char *to; - rb_transcoding *tc; - unsigned char *out_buf_start; - unsigned char *out_data_start; - unsigned char *out_data_end; - unsigned char *out_buf_end; - rb_econv_result_t last_result; -} rb_econv_elem_t; - -typedef struct { - rb_econv_elem_t *elems; - int num_trans; - int num_finished; - rb_transcoding *last_tc; -} rb_econv_t; - void rb_declare_transcoder(const char *enc1, const char *enc2, const char *lib); void rb_register_transcoder(const rb_transcoder *); |