summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-23 06:02:58 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-23 06:02:58 +0000
commitd4fabf0e36946a2ac8423a0817e282efa1ee1459 (patch)
tree08aed479413d135f5601abf40ffbc9ee92ffd7fb /include
parent860c2331039537c4d0c5c8c92ae1e89395f0edcc (diff)
* 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
Diffstat (limited to 'include')
-rw-r--r--include/ruby/encoding.h14
1 files changed, 11 insertions, 3 deletions
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