msvcrt: Don't use tolowerW.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2020-07-16 14:47:03 +02:00 committed by Alexandre Julliard
parent 4f5a4b83b6
commit bc47bff4a8
3 changed files with 6 additions and 5 deletions

View File

@ -3179,8 +3179,8 @@ int CDECL MSVCRT__wstat64(const MSVCRT_wchar_t* path, struct MSVCRT__stat64 * bu
/* executable? */
if (plen > 6 && path[plen-4] == '.') /* shortest exe: "\x.exe" */
{
ULONGLONG ext = tolowerW(path[plen-1]) | (tolowerW(path[plen-2]) << 16) |
((ULONGLONG)tolowerW(path[plen-3]) << 32);
ULONGLONG ext = MSVCRT_towlower(path[plen-1]) | (MSVCRT_towlower(path[plen-2]) << 16) |
((ULONGLONG)MSVCRT_towlower(path[plen-3]) << 32);
if (ext == WCEXE || ext == WCBAT || ext == WCCMD || ext == WCCOM)
mode |= ALL_S_IEXEC;
}

View File

@ -1199,6 +1199,7 @@ char* __cdecl MSVCRT__itoa(int, char*, int);
double parse_double(MSVCRT_wchar_t (*)(void*), void (*)(void*), void*, MSVCRT_pthreadlocinfo, int*);
int __cdecl MSVCRT_wcsncmp(const MSVCRT_wchar_t*, const MSVCRT_wchar_t*, MSVCRT_size_t);
int __cdecl MSVCRT__wcsnicmp(const MSVCRT_wchar_t*, const MSVCRT_wchar_t*, MSVCRT_size_t);
int __cdecl MSVCRT_towlower(MSVCRT_wint_t);
/* Maybe one day we'll enable the invalid parameter handlers with the full set of information (msvcrXXd)
* #define MSVCRT_INVALID_PMT(x) MSVCRT_call_invalid_parameter_handler(x, __FUNCTION__, __FILE__, __LINE__, 0)

View File

@ -411,7 +411,7 @@ int CDECL MSVCRT__wcslwr_s_l( MSVCRT_wchar_t* str, MSVCRT_size_t n, MSVCRT__loca
while (n--)
{
if (!*ptr) return 0;
*ptr = tolowerW(*ptr);
*ptr = MSVCRT__towlower_l(*ptr, locale);
ptr++;
}
@ -2345,7 +2345,7 @@ __int64 CDECL MSVCRT__wcstoi64_l(const MSVCRT_wchar_t *nptr,
} else if(*nptr == '+')
nptr++;
if((base==0 || base==16) && wctoint(*nptr, 1)==0 && tolowerW(*(nptr+1))=='x') {
if((base==0 || base==16) && wctoint(*nptr, 1)==0 && (nptr[1]=='x' || nptr[1]=='X')) {
base = 16;
nptr += 2;
}
@ -2518,7 +2518,7 @@ unsigned __int64 CDECL MSVCRT__wcstoui64_l(const MSVCRT_wchar_t *nptr,
} else if(*nptr == '+')
nptr++;
if((base==0 || base==16) && wctoint(*nptr, 1)==0 && tolowerW(*(nptr+1))=='x') {
if((base==0 || base==16) && wctoint(*nptr, 1)==0 && (nptr[1]=='x' || nptr[1]=='X')) {
base = 16;
nptr += 2;
}