mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* transcode_data.h (transcode_invalid_byte_sequence): renamed from
transcode_invalid_input. (transcode_destination_buffer_full): renamed from transcode_obuf_full. (transcode_source_buffer_empty): renamed from transcode_ibuf_empty. (rb_econv_result_t): renamed from rb_trans_result_t. (rb_econv_elem_t): renamed from rb_trans_elem_t. (rb_econv_t): renamed from rb_trans_t. * transcode.c (UNIVERSAL_NEWLINE_DECODER): renamed from UNIVERSAL_NEWLINE. (CRLF_NEWLINE_ENCODER): renamed from CRLF_NEWLINE. (CR_NEWLINE_ENCODER): renamed from CR_NEWLINE. (rb_econv_open): renamed from rb_trans_open. (rb_econv_close): renamed from rb_trans_close. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
dd92751104
commit
bd9bd52954
4 changed files with 193 additions and 175 deletions
|
|
@ -112,13 +112,13 @@ struct rb_transcoder {
|
|||
};
|
||||
|
||||
typedef enum {
|
||||
transcode_invalid_input,
|
||||
transcode_invalid_byte_sequence,
|
||||
transcode_undefined_conversion,
|
||||
transcode_obuf_full,
|
||||
transcode_ibuf_empty,
|
||||
transcode_destination_buffer_full,
|
||||
transcode_source_buffer_empty,
|
||||
transcode_finished,
|
||||
transcode_output_followed_by_input,
|
||||
} rb_trans_result_t;
|
||||
} rb_econv_result_t;
|
||||
|
||||
typedef struct {
|
||||
const char *from;
|
||||
|
|
@ -128,15 +128,15 @@ typedef struct {
|
|||
unsigned char *out_data_start;
|
||||
unsigned char *out_data_end;
|
||||
unsigned char *out_buf_end;
|
||||
rb_trans_result_t last_result;
|
||||
} rb_trans_elem_t;
|
||||
rb_econv_result_t last_result;
|
||||
} rb_econv_elem_t;
|
||||
|
||||
typedef struct {
|
||||
rb_trans_elem_t *elems;
|
||||
rb_econv_elem_t *elems;
|
||||
int num_trans;
|
||||
int num_finished;
|
||||
rb_transcoding *last_tc;
|
||||
} rb_trans_t;
|
||||
} rb_econv_t;
|
||||
|
||||
void rb_declare_transcoder(const char *enc1, const char *enc2, const char *lib);
|
||||
void rb_register_transcoder(const rb_transcoder *);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue