From 7fa73456098b5554896f3637bacbbf695f801250 Mon Sep 17 00:00:00 2001 From: naruse Date: Fri, 21 Aug 2009 06:17:06 +0000 Subject: [PATCH] Rename FMODE_STRIP_BOM to FMODE_SETENC_BY_BOM. * include/ruby/io.h, io.c (FMODE_SETENC_BY_BOM): renamed from FMODE_STRIP_BOM. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ include/ruby/io.h | 2 +- io.c | 8 ++++---- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index d5fa990494..2f3303e480 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Aug 21 15:13:08 2009 NARUSE, Yui + + * include/ruby/io.h, io.c (FMODE_SETENC_BY_BOM): + renamed from FMODE_STRIP_BOM. + Thu Aug 20 01:24:55 2009 NARUSE, Yui * io.c (rb_io_fmode_modestr): change modestr syntax for BOM diff --git a/include/ruby/io.h b/include/ruby/io.h index 7d9512aa92..45384db586 100644 --- a/include/ruby/io.h +++ b/include/ruby/io.h @@ -94,7 +94,7 @@ typedef struct rb_io_t { #define FMODE_TEXTMODE 0x00001000 #define FMODE_EOF 0x00002000 /* #define FMODE_PREP 0x00010000 */ -#define FMODE_STRIP_BOM 0x00100000 +#define FMODE_SETENC_BY_BOM 0x00100000 #define GetOpenFile(obj,fp) rb_io_check_closed((fp) = RFILE(rb_io_taint_check(obj))->fptr) diff --git a/io.c b/io.c index fe2a6cd1f6..b7e278083c 100644 --- a/io.c +++ b/io.c @@ -3989,7 +3989,7 @@ rb_io_modestr_fmode(const char *modestr) if ((fmode & FMODE_BINMODE) && (fmode & FMODE_TEXTMODE)) goto error; if (p && io_encname_bom_p(p, 0)) - fmode |= FMODE_STRIP_BOM; + fmode |= FMODE_SETENC_BY_BOM; return fmode; } @@ -4334,7 +4334,7 @@ rb_io_extract_modeenc(VALUE *vmode_p, VALUE *vperm_p, VALUE opthash, has_enc = 1; parse_mode_enc(p+1, &enc, &enc2); if (io_encname_bom_p(p+1, 0)) - fmode |= FMODE_STRIP_BOM; + fmode |= FMODE_SETENC_BY_BOM; } else { rb_encoding *e; @@ -4634,7 +4634,7 @@ rb_file_open_generic(VALUE io, VALUE filename, int oflags, int fmode, convconfig fptr->pathv = rb_str_new_frozen(filename); fptr->fd = rb_sysopen(fptr->pathv, oflags, perm); io_check_tty(fptr); - if (fmode & FMODE_STRIP_BOM) io_set_encoding_by_bom(io); + if (fmode & FMODE_SETENC_BY_BOM) io_set_encoding_by_bom(io); return io; } @@ -6400,7 +6400,7 @@ rb_io_initialize(int argc, VALUE *argv, VALUE io) else if (fileno(stderr) == fd) fp->stdio_file = stderr; - if (fmode & FMODE_STRIP_BOM) io_set_encoding_by_bom(io); + if (fmode & FMODE_SETENC_BY_BOM) io_set_encoding_by_bom(io); return io; }