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

ruby-changes:33516

From: nobu <ko1@a...>
Date: Wed, 16 Apr 2014 11:46:59 +0900 (JST)
Subject: [ruby-changes:33516] nobu:r45597 (trunk): win32.c: CharNextExA with cp

nobu	2014-04-16 11:46:53 +0900 (Wed, 16 Apr 2014)

  New Revision: 45597

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

  Log:
    win32.c: CharNextExA with cp
    
    * win32/win32.c (dln_find_1): use CharNextExA() instead of CharNext()
      to respect the given code page.

  Modified files:
    trunk/win32/win32.c
Index: win32/win32.c
===================================================================
--- win32/win32.c	(revision 45596)
+++ win32/win32.c	(revision 45597)
@@ -64,6 +64,8 @@ static char *w32_getenv(const char *name https://github.com/ruby/ruby/blob/trunk/win32/win32.c#L64
 #define DLN_FIND_EXTRA_ARG ,cp
 #define rb_w32_stati64(path, st) w32_stati64(path, st, cp)
 #define getenv(name) w32_getenv(name, cp)
+#undef CharNext
+#define CharNext(p) CharNextExA(cp, (p), 0)
 #define dln_find_exe_r rb_w32_udln_find_exe_r
 #define dln_find_file_r rb_w32_udln_find_file_r
 #include "dln.h"
@@ -74,6 +76,7 @@ static char *w32_getenv(const char *name https://github.com/ruby/ruby/blob/trunk/win32/win32.c#L76
 #undef dln_find_file_r
 #define dln_find_exe_r(fname, path, buf, size) rb_w32_udln_find_exe_r(fname, path, buf, size, cp)
 #define dln_find_file_r(fname, path, buf, size) rb_w32_udln_find_file_r(fname, path, buf, size, cp)
+#undef CharNext			/* no default cp version */
 
 #undef stat
 #undef fclose

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

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