From d4fabf0e36946a2ac8423a0817e282efa1ee1459 Mon Sep 17 00:00:00 2001 From: akr Date: Sat, 23 Aug 2008 06:02:58 +0000 Subject: * include/ruby/encoding.h (ECONV_INVALID_MASK): defined. (ECONV_INVALID_IGNORE): defined. (ECONV_INVALID_REPLACE): defined. (ECONV_UNDEF_MASK): defined. (ECONV_UNDEF_IGNORE): defined. (ECONV_UNDEF_REPLACE): defined. * transcode.c (INVALID_IGNORE): removed. (INVALID_REPLACE): removed. (UNDEF_IGNORE): removed. (UNDEF_REPLACE): removed. (rb_econv_convert0): renamed from rb_econv_convert. (rb_econv_convert): defined to call rb_econv_convert0 with replace/ignore behavior moved from transcode_loop. (transcode_loop): replace/ignore behavior removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/encoding.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'include/ruby/encoding.h') diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h index 03aac871fe..1f0feae98e 100644 --- a/include/ruby/encoding.h +++ b/include/ruby/encoding.h @@ -277,9 +277,17 @@ VALUE rb_econv_string(rb_econv_t *ec, VALUE src, long off, long len, VALUE dst, void rb_econv_binmode(rb_econv_t *ec); /* flags for rb_econv_open */ -#define ECONV_UNIVERSAL_NEWLINE_DECODER 0x100 -#define ECONV_CRLF_NEWLINE_ENCODER 0x200 -#define ECONV_CR_NEWLINE_ENCODER 0x400 +#define ECONV_INVALID_MASK 0x000f +#define ECONV_INVALID_IGNORE 0x0001 +#define ECONV_INVALID_REPLACE 0x0002 + +#define ECONV_UNDEF_MASK 0x00f0 +#define ECONV_UNDEF_IGNORE 0x0010 +#define ECONV_UNDEF_REPLACE 0x0020 + +#define ECONV_UNIVERSAL_NEWLINE_DECODER 0x0100 +#define ECONV_CRLF_NEWLINE_ENCODER 0x0200 +#define ECONV_CR_NEWLINE_ENCODER 0x0400 /* flags for rb_econv_convert */ #define ECONV_PARTIAL_INPUT 0x10000 -- cgit v1.2.3