diff options
author | duerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-20 06:12:48 +0000 |
---|---|---|
committer | duerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-20 06:12:48 +0000 |
commit | 3d0c7bea4d2ad108889d0c4d81d41c4ff03f2a77 (patch) | |
tree | 049a03fa66fe12d5409b58e01596aa121402d390 /transcode_data.h | |
parent | 66aeb2f7080dea92703f10546fb3cbcc946f6fa3 (diff) | |
download | ruby-3d0c7bea4d2ad108889d0c4d81d41c4ff03f2a77.tar.gz |
Sun Jan 20 15:08:08 2008 Martin Duerst <duerst@it.aoyama.ac.jp>
* enc/trans/utf_16_32.c: new file, currently implementing
UTF-16BE conversions only.
* test/ruby/test_transcode.rb: Added tests for UTF-16BE;
made check_both_ways() use force_encoding differently.
* transcode_data.h, transcode.c: Support for more conversion
functions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'transcode_data.h')
-rw-r--r-- | transcode_data.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/transcode_data.h b/transcode_data.h index 65929390b9..8d0c8ccf33 100644 --- a/transcode_data.h +++ b/transcode_data.h @@ -35,6 +35,9 @@ typedef struct byte_lookup { #define UNDEF (PType 0x09) /* legal but undefined */ #define ZERObt (PType 0x0A) /* zero bytes of payload, i.e. remove */ #define FUNii (PType 0x0B) /* function from info to info */ +#define FUNsi (PType 0x0D) /* function from start to info */ +#define FUNio (PType 0x0E) /* function from info to output */ +#define FUNso (PType 0x0F) /* function from start to output */ #define o1(b1) (PType((((unsigned char)(b1))<<8)|ONEbt)) #define o2(b1,b2) (PType((((unsigned char)(b1))<<8)|(((unsigned char)(b2))<<16)|TWObt)) @@ -72,7 +75,10 @@ typedef struct rb_transcoder { struct rb_transcoder *, struct rb_transcoding *); void (*postprocessor)(char**, char**, char*, char*, struct rb_transcoder *, struct rb_transcoding *); - VALUE (*func_ii)(VALUE); /* function from info to info */ + VALUE (*func_ii)(VALUE); /* info -> info */ + VALUE (*func_si)(const unsigned char* const); /* start -> info */ + int (*func_io)(VALUE, const unsigned char*); /* info -> output */ + int (*func_so)(const unsigned char*, unsigned char*); /* start -> output */ } rb_transcoder; void rb_declare_transcoder(const char *enc1, const char *enc2, const char *lib); |