msvcrt: _towlower_l only lowercase 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
0e493a2d80
commit
6a71e7c9ee
|
@ -3633,7 +3633,6 @@ static void test_C_locale(void)
|
|||
ok(ret == exp, "expected %x, got %x for C locale\n", exp, ret);
|
||||
}
|
||||
else
|
||||
todo_wine_if(ret != i)
|
||||
ok(ret == i, "expected self %x, got %x for C locale\n", i, ret);
|
||||
|
||||
ret = p_towupper(i);
|
||||
|
@ -3664,7 +3663,6 @@ static void test_C_locale(void)
|
|||
ok(ret == exp, "expected %x, got %x for C locale\n", exp, ret);
|
||||
}
|
||||
else
|
||||
todo_wine_if(ret != j)
|
||||
ok(ret == j, "expected self %x, got %x for C locale\n", j, ret);
|
||||
|
||||
ret = p__towupper_l(j, locale);
|
||||
|
|
|
@ -2494,6 +2494,19 @@ int CDECL MSVCRT_towupper(MSVCRT_wint_t c)
|
|||
*/
|
||||
int CDECL MSVCRT__towlower_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 tolowerW(c);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue