* regex/regcomp.c (xwcrtomb): Fix one explicable and one inexcplicable C
warning.
This commit is contained in:
parent
15a9e17656
commit
d67a6ce4a8
|
@ -1,3 +1,8 @@
|
||||||
|
2010-02-14 Christopher Faylor <me+cygwin@cgf.cx>
|
||||||
|
|
||||||
|
* regex/regcomp.c (xwcrtomb): Fix one explicable and one inexcplicable
|
||||||
|
C warning.
|
||||||
|
|
||||||
2010-02-13 Corinna Vinschen <corinna@vinschen.de>
|
2010-02-13 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* regex/regcomp.c (xwcrtomb): Don't convert Unicode chars outside the
|
* regex/regcomp.c (xwcrtomb): Don't convert Unicode chars outside the
|
||||||
|
|
|
@ -1175,8 +1175,8 @@ xwcrtomb (char *s, wint_t wc, mbstate_t *ps)
|
||||||
code isn't surrogate pair aware, so we handle this here. Convert
|
code isn't surrogate pair aware, so we handle this here. Convert
|
||||||
value to UTF-16 surrogate and call wcsrtombs to convert the "string"
|
value to UTF-16 surrogate and call wcsrtombs to convert the "string"
|
||||||
to the correct multibyte representation, if any. */
|
to the correct multibyte representation, if any. */
|
||||||
wchar_t ws[2], *wsp = ws;
|
wchar_t ws[2];
|
||||||
size_t n;
|
const wchar_t *wsp = ws;
|
||||||
|
|
||||||
wc -= 0x10000;
|
wc -= 0x10000;
|
||||||
ws[0] = 0xd800 | (wc >> 10);
|
ws[0] = 0xd800 | (wc >> 10);
|
||||||
|
|
Loading…
Reference in New Issue