diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-06 15:39:00 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-06 15:39:00 +0000 |
commit | 0508672f0e31bd2b600118e9cc9fdb9a1ac423fe (patch) | |
tree | 1fdb105da4cba337d3aa41ba2452436506a4490b /include | |
parent | dd27b8f4577a96385a29d91e4bd75fb547213fc9 (diff) | |
download | ruby-0508672f0e31bd2b600118e9cc9fdb9a1ac423fe.tar.gz |
* include/ruby/encoding.h (ECONV_ERROR_HANDLER_MASK): defined.
(ECONV_DECODER_MASK): defined.
(ECONV_ENCODER_MASK): defined.
* io.c (make_writeconv): restrict ecflags for writeconv with
ECONV_ERROR_HANDLER_MASK.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
-rw-r--r-- | include/ruby/encoding.h | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h index 7a616a1934..d78ef11dc1 100644 --- a/include/ruby/encoding.h +++ b/include/ruby/encoding.h @@ -250,27 +250,32 @@ VALUE rb_econv_substr_append(rb_econv_t *ec, VALUE src, long byteoff, long bytes void rb_econv_binmode(rb_econv_t *ec); /* flags for rb_econv_open */ -#define ECONV_INVALID_MASK 0x000f -#define ECONV_INVALID_REPLACE 0x0002 -#define ECONV_UNDEF_MASK 0x00f0 -#define ECONV_UNDEF_REPLACE 0x0020 -#define ECONV_UNDEF_HEX_CHARREF 0x0030 +#define ECONV_ERROR_HANDLER_MASK 0x000000ff + +#define ECONV_INVALID_MASK 0x0000000f +#define ECONV_INVALID_REPLACE 0x00000002 + +#define ECONV_UNDEF_MASK 0x000000f0 +#define ECONV_UNDEF_REPLACE 0x00000020 +#define ECONV_UNDEF_HEX_CHARREF 0x00000030 /* usable only if destination encoding is ascii compatible */ -#define ECONV_UNIVERSAL_NEWLINE_DECODER 0x0100 +#define ECONV_DECODER_MASK 0x00000f00 +#define ECONV_UNIVERSAL_NEWLINE_DECODER 0x00000100 /* usable only if source encoding is ascii compatible */ -#define ECONV_CRLF_NEWLINE_ENCODER 0x0200 -#define ECONV_CR_NEWLINE_ENCODER 0x0400 -#define ECONV_XML_TEXT_ENCODER 0x0800 -#define ECONV_XML_ATTR_ENCODER 0x1000 +#define ECONV_ENCODER_MASK 0x0000f000 +#define ECONV_CRLF_NEWLINE_ENCODER 0x00001000 +#define ECONV_CR_NEWLINE_ENCODER 0x00002000 +#define ECONV_XML_TEXT_ENCODER 0x00004000 +#define ECONV_XML_ATTR_ENCODER 0x00008000 /* end of flags for rb_econv_open */ /* flags for rb_econv_convert */ -#define ECONV_PARTIAL_INPUT 0x10000 -#define ECONV_OUTPUT_FOLLOWED_BY_INPUT 0x20000 +#define ECONV_PARTIAL_INPUT 0x00010000 +#define ECONV_OUTPUT_FOLLOWED_BY_INPUT 0x00020000 /* end of flags for rb_econv_convert */ #endif /* RUBY_ENCODING_H */ |