* dcrt0.cc (globify): Only call mbtowc for non-ascii chars.
This commit is contained in:
parent
1b8e360e06
commit
855762d6f4
|
@ -1,3 +1,7 @@
|
||||||
|
2009-04-18 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* dcrt0.cc (globify): Only call mbtowc for non-ascii chars.
|
||||||
|
|
||||||
2009-04-17 Corinna Vinschen <corinna@vinschen.de>
|
2009-04-17 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* dcrt0.cc (globify): Make multibyte-aware.
|
* dcrt0.cc (globify): Make multibyte-aware.
|
||||||
|
|
|
@ -229,7 +229,7 @@ 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++ = '\\';
|
||||||
size_t cnt = mbtowc (NULL, s, MB_CUR_MAX);
|
size_t cnt = isascii (*s) ? 1 : mbtowc (NULL, s, MB_CUR_MAX);
|
||||||
if (cnt <= 1 || cnt == (size_t)-1)
|
if (cnt <= 1 || cnt == (size_t)-1)
|
||||||
*p++ = *s;
|
*p++ = *s;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue