[前][次][番号順一覧][スレッド一覧]

ruby-changes:12873

From: naruse <ko1@a...>
Date: Fri, 21 Aug 2009 15:17:27 +0900 (JST)
Subject: [ruby-changes:12873] Ruby:r24606 (trunk): Rename FMODE_STRIP_BOM to FMODE_SETENC_BY_BOM.

naruse	2009-08-21 15:17:06 +0900 (Fri, 21 Aug 2009)

  New Revision: 24606

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24606

  Log:
    Rename FMODE_STRIP_BOM to FMODE_SETENC_BY_BOM.
    * include/ruby/io.h, io.c (FMODE_SETENC_BY_BOM):
      renamed from FMODE_STRIP_BOM.

  Modified files:
    trunk/ChangeLog
    trunk/include/ruby/io.h
    trunk/io.c

Index: include/ruby/io.h
===================================================================
--- include/ruby/io.h	(revision 24605)
+++ include/ruby/io.h	(revision 24606)
@@ -94,7 +94,7 @@
 #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)
 
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 24605)
+++ ChangeLog	(revision 24606)
@@ -1,3 +1,8 @@
+Fri Aug 21 15:13:08 2009  NARUSE, Yui  <naruse@r...>
+
+	* include/ruby/io.h, io.c (FMODE_SETENC_BY_BOM):
+	  renamed from FMODE_STRIP_BOM.
+
 Thu Aug 20 01:24:55 2009  NARUSE, Yui  <naruse@r...>
 
 	* io.c (rb_io_fmode_modestr): change modestr syntax for BOM
Index: io.c
===================================================================
--- io.c	(revision 24605)
+++ io.c	(revision 24606)
@@ -3989,7 +3989,7 @@
     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 @@
             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 @@
     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 @@
     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;
 }
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]