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

ruby-changes:35177

From: nobu <ko1@a...>
Date: Sat, 23 Aug 2014 22:32:45 +0900 (JST)
Subject: [ruby-changes:35177] nobu:r47259 (trunk): * win32/win32.c (cmdglob): use inline function.

nobu	2014-08-23 22:32:32 +0900 (Sat, 23 Aug 2014)

  New Revision: 47259

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

  Log:
    * win32/win32.c (cmdglob): use inline function.

  Modified files:
    trunk/win32/win32.c
Index: win32/win32.c
===================================================================
--- win32/win32.c	(revision 47258)
+++ win32/win32.c	(revision 47259)
@@ -1485,7 +1485,6 @@ static NtCmdLineElement ** https://github.com/ruby/ruby/blob/trunk/win32/win32.c#L1485
 cmdglob(NtCmdLineElement *patt, NtCmdLineElement **tail, UINT cp)
 {
     char buffer[MAXPATHLEN], *buf = buffer;
-    char *p;
     NtCmdLineElement **last = tail;
     int status;
 
@@ -1494,9 +1493,7 @@ cmdglob(NtCmdLineElement *patt, NtCmdLin https://github.com/ruby/ruby/blob/trunk/win32/win32.c#L1493
 
     strlcpy(buf, patt->str, patt->len + 1);
     buf[patt->len] = '\0';
-    for (p = buf; *p; p = CharNextExA(cp, p, 0))
-	if (*p == '\\')
-	    *p = '/';
+    translate_char(buf, '\\', '/', cp);
     status = ruby_brace_glob(buf, 0, insert, (VALUE)&tail);
     if (buf != buffer)
 	free(buf);

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

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