mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* transcode_data.h (rb_transcoder): typedef at first.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
425098de96
commit
c1361132bc
2 changed files with 9 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Tue Aug 12 07:00:02 2008 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* transcode_data.h (rb_transcoder): typedef at first.
|
||||||
|
|
||||||
Tue Aug 12 06:48:35 2008 Tanaka Akira <akr@fsij.org>
|
Tue Aug 12 06:48:35 2008 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* transcode.c (rb_trans_conv): find second last error.
|
* transcode.c (rb_trans_conv): find second last error.
|
||||||
|
|
|
@ -56,10 +56,12 @@ typedef struct byte_lookup {
|
||||||
#define TWOTRAIL /* legal but undefined if two more trailing UTF-8 */
|
#define TWOTRAIL /* legal but undefined if two more trailing UTF-8 */
|
||||||
#define THREETRAIL /* legal but undefined if three more trailing UTF-8 */
|
#define THREETRAIL /* legal but undefined if three more trailing UTF-8 */
|
||||||
|
|
||||||
|
typedef struct rb_transcoder rb_transcoder;
|
||||||
|
|
||||||
/* dynamic structure, one per conversion (similar to iconv_t) */
|
/* dynamic structure, one per conversion (similar to iconv_t) */
|
||||||
/* may carry conversion state (e.g. for iso-2022-jp) */
|
/* may carry conversion state (e.g. for iso-2022-jp) */
|
||||||
typedef struct rb_transcoding {
|
typedef struct rb_transcoding {
|
||||||
const struct rb_transcoder *transcoder;
|
const rb_transcoder *transcoder;
|
||||||
|
|
||||||
int flags;
|
int flags;
|
||||||
|
|
||||||
|
@ -82,7 +84,7 @@ typedef struct rb_transcoding {
|
||||||
(tc)->readbuf.ptr)
|
(tc)->readbuf.ptr)
|
||||||
|
|
||||||
/* static structure, one per supported encoding pair */
|
/* static structure, one per supported encoding pair */
|
||||||
typedef struct rb_transcoder {
|
struct rb_transcoder {
|
||||||
const char *from_encoding;
|
const char *from_encoding;
|
||||||
const char *to_encoding;
|
const char *to_encoding;
|
||||||
const BYTE_LOOKUP *conv_tree_start;
|
const BYTE_LOOKUP *conv_tree_start;
|
||||||
|
@ -94,7 +96,7 @@ typedef struct rb_transcoder {
|
||||||
int (*func_io)(rb_transcoding*, VALUE, const unsigned char*); /* info -> output */
|
int (*func_io)(rb_transcoding*, VALUE, const unsigned char*); /* info -> output */
|
||||||
int (*func_so)(rb_transcoding*, const unsigned char*, size_t, unsigned char*); /* start -> output */
|
int (*func_so)(rb_transcoding*, const unsigned char*, size_t, unsigned char*); /* start -> output */
|
||||||
int (*finish_func)(rb_transcoding*, unsigned char*); /* -> output */
|
int (*finish_func)(rb_transcoding*, unsigned char*); /* -> output */
|
||||||
} rb_transcoder;
|
};
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
transcode_invalid_input,
|
transcode_invalid_input,
|
||||||
|
|
Loading…
Reference in a new issue