msvcrt: Use isspace_l in string to number conversion functions.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2019-11-22 16:41:23 +01:00 committed by Alexandre Julliard
parent a4357043ff
commit e2423823fc
2 changed files with 5 additions and 5 deletions

View File

@ -1066,6 +1066,7 @@ int __cdecl MSVCRT_iswspace(MSVCRT_wint_t);
int __cdecl MSVCRT_iswdigit(MSVCRT_wint_t);
int __cdecl MSVCRT_isleadbyte(int);
int __cdecl MSVCRT__isleadbyte_l(int, MSVCRT__locale_t);
int __cdecl MSVCRT__isspace_l(int, MSVCRT__locale_t);
void __cdecl MSVCRT__lock_file(MSVCRT_FILE*);
void __cdecl MSVCRT__unlock_file(MSVCRT_FILE*);

View File

@ -350,9 +350,8 @@ static double strtod_helper(const char *str, char **end, MSVCRT__locale_t locale
else
locinfo = locale->locinfo;
/* FIXME: use *_l functions */
p = str;
while(isspace(*p))
while(MSVCRT__isspace_l((unsigned char)*p, locale))
p++;
if(*p == '-') {
@ -957,7 +956,7 @@ __int64 CDECL MSVCRT_strtoi64_l(const char *nptr, char **endptr, int base, MSVCR
if (!MSVCRT_CHECK_PMT(base == 0 || base >= 2)) return 0;
if (!MSVCRT_CHECK_PMT(base <= 36)) return 0;
while(isspace(*nptr)) nptr++;
while(MSVCRT__isspace_l((unsigned char)*nptr, locale)) nptr++;
if(*nptr == '-') {
negative = TRUE;
@ -1050,7 +1049,7 @@ int __cdecl MSVCRT_atoi(const char *str)
if(!str)
return 0;
while(isspace(*str)) str++;
while(MSVCRT__isspace_l((unsigned char)*str, NULL)) str++;
if(*str == '+') {
str++;
@ -1209,7 +1208,7 @@ unsigned __int64 CDECL MSVCRT_strtoui64_l(const char *nptr, char **endptr, int b
if (!MSVCRT_CHECK_PMT(base == 0 || base >= 2)) return 0;
if (!MSVCRT_CHECK_PMT(base <= 36)) return 0;
while(isspace(*nptr)) nptr++;
while(MSVCRT__isspace_l((unsigned char)*nptr, locale)) nptr++;
if(*nptr == '-') {
negative = TRUE;