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

ruby-changes:5012

From: ko1@a...
Date: Wed, 21 May 2008 17:48:27 +0900 (JST)
Subject: [ruby-changes:5012] naruse - Ruby:r16505 (trunk): * ext/nkf/nkf-utf8/nkf.c (nkf_enc_find_index):

naruse	2008-05-21 17:48:10 +0900 (Wed, 21 May 2008)

  New Revision: 16505

  Modified files:
    trunk/ChangeLog
    trunk/ext/nkf/nkf-utf8/nkf.c

  Log:
    * ext/nkf/nkf-utf8/nkf.c (nkf_enc_find_index):
      use strcasecmp. [ruby-dev:34787]

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=16505&r2=16504&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ext/nkf/nkf-utf8/nkf.c?r1=16505&r2=16504&diff_format=u

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 16504)
+++ ChangeLog	(revision 16505)
@@ -1,3 +1,8 @@
+Wed May 21 17:46:17 2008  NARUSE, Yui  <naruse@r...>
+
+	* ext/nkf/nkf-utf8/nkf.c (nkf_enc_find_index):
+	  use strcasecmp. [ruby-dev:34787]
+
 Wed May 21 16:48:22 2008  Yukihiro Matsumoto  <matz@r...>
 
 	* array.c (rb_ary_compact_bang): avoid forceful realloc.
Index: ext/nkf/nkf-utf8/nkf.c
===================================================================
--- ext/nkf/nkf-utf8/nkf.c	(revision 16504)
+++ ext/nkf/nkf-utf8/nkf.c	(revision 16505)
@@ -678,7 +678,7 @@
     int i, index = -1;
     if (*name == 'X' && *(name+1) == '-') name += 2;
     for (i = 0; encoding_name_to_id_table[i].id >= 0; i++) {
-	if (strcmp(name, encoding_name_to_id_table[i].name) == 0) {
+	if (strcasecmp(name, encoding_name_to_id_table[i].name) == 0) {
 	    return encoding_name_to_id_table[i].id;
 	}
     }

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

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