mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-03-01 20:45:37 +08:00
* dcrt0.cc (globify): Make multibyte-aware.
This commit is contained in:
parent
a74869c027
commit
0351fbd504
@ -1,3 +1,7 @@
|
|||||||
|
2009-04-17 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* dcrt0.cc (globify): Make multibyte-aware.
|
||||||
|
|
||||||
2009-04-17 Corinna Vinschen <corinna@vinschen.de>
|
2009-04-17 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* flock.cc (class inode_t): Add i_wait member and matching methods
|
* flock.cc (class inode_t): Add i_wait member and matching methods
|
||||||
|
@ -229,7 +229,15 @@ globify (char *word, char **&argv, int &argc, int &argvlen)
|
|||||||
else if (s[1] == quote || s[1] == '\\')
|
else if (s[1] == quote || s[1] == '\\')
|
||||||
s++;
|
s++;
|
||||||
*p++ = '\\';
|
*p++ = '\\';
|
||||||
*p++ = *s;
|
size_t cnt = mbtowc (NULL, s, MB_CUR_MAX);
|
||||||
|
if (cnt <= 1 || cnt == (size_t)-1)
|
||||||
|
*p++ = *s;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
--s;
|
||||||
|
while (cnt-- > 0)
|
||||||
|
*p++ = *++s;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (*s == quote)
|
if (*s == quote)
|
||||||
p--;
|
p--;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user