msvcrt: _towupper_l only uppercase a-z in C locale.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com> Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6a71e7c9ee
commit
2c308c9fa2
|
@ -3642,7 +3642,6 @@ static void test_C_locale(void)
|
||||||
ok(ret == exp, "expected %x, got %x for C locale\n", exp, ret);
|
ok(ret == exp, "expected %x, got %x for C locale\n", exp, ret);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
todo_wine_if(ret != i)
|
|
||||||
ok(ret == i, "expected self %x, got %x for C locale\n", i, ret);
|
ok(ret == i, "expected self %x, got %x for C locale\n", i, ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3672,7 +3671,6 @@ static void test_C_locale(void)
|
||||||
ok(ret == exp, "expected %x, got %x for C locale\n", exp, ret);
|
ok(ret == exp, "expected %x, got %x for C locale\n", exp, ret);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
todo_wine_if(ret != j)
|
|
||||||
ok(ret == j, "expected self %x, got %x for C locale\n", j, ret);
|
ok(ret == j, "expected self %x, got %x for C locale\n", j, ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2478,6 +2478,19 @@ MSVCRT_size_t CDECL MSVCRT_wcsnlen(const MSVCRT_wchar_t *s, MSVCRT_size_t maxlen
|
||||||
*/
|
*/
|
||||||
int CDECL MSVCRT__towupper_l(MSVCRT_wint_t c, MSVCRT__locale_t locale)
|
int CDECL MSVCRT__towupper_l(MSVCRT_wint_t c, MSVCRT__locale_t locale)
|
||||||
{
|
{
|
||||||
|
MSVCRT_pthreadlocinfo locinfo;
|
||||||
|
|
||||||
|
if(!locale)
|
||||||
|
locinfo = get_locinfo();
|
||||||
|
else
|
||||||
|
locinfo = locale->locinfo;
|
||||||
|
|
||||||
|
if(!locinfo->lc_handle[MSVCRT_LC_CTYPE]) {
|
||||||
|
if(c >= 'a' && c <= 'z')
|
||||||
|
return c + 'A' - 'a';
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
|
||||||
return toupperW(c);
|
return toupperW(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue