Commit e2423823 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Use isspace_l in string to number conversion functions.

parent a4357043
...@@ -1066,6 +1066,7 @@ int __cdecl MSVCRT_iswspace(MSVCRT_wint_t); ...@@ -1066,6 +1066,7 @@ int __cdecl MSVCRT_iswspace(MSVCRT_wint_t);
int __cdecl MSVCRT_iswdigit(MSVCRT_wint_t); int __cdecl MSVCRT_iswdigit(MSVCRT_wint_t);
int __cdecl MSVCRT_isleadbyte(int); int __cdecl MSVCRT_isleadbyte(int);
int __cdecl MSVCRT__isleadbyte_l(int, MSVCRT__locale_t); 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__lock_file(MSVCRT_FILE*);
void __cdecl MSVCRT__unlock_file(MSVCRT_FILE*); void __cdecl MSVCRT__unlock_file(MSVCRT_FILE*);
......
...@@ -350,9 +350,8 @@ static double strtod_helper(const char *str, char **end, MSVCRT__locale_t locale ...@@ -350,9 +350,8 @@ static double strtod_helper(const char *str, char **end, MSVCRT__locale_t locale
else else
locinfo = locale->locinfo; locinfo = locale->locinfo;
/* FIXME: use *_l functions */
p = str; p = str;
while(isspace(*p)) while(MSVCRT__isspace_l((unsigned char)*p, locale))
p++; p++;
if(*p == '-') { if(*p == '-') {
...@@ -957,7 +956,7 @@ __int64 CDECL MSVCRT_strtoi64_l(const char *nptr, char **endptr, int base, MSVCR ...@@ -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 == 0 || base >= 2)) return 0;
if (!MSVCRT_CHECK_PMT(base <= 36)) 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 == '-') { if(*nptr == '-') {
negative = TRUE; negative = TRUE;
...@@ -1050,7 +1049,7 @@ int __cdecl MSVCRT_atoi(const char *str) ...@@ -1050,7 +1049,7 @@ int __cdecl MSVCRT_atoi(const char *str)
if(!str) if(!str)
return 0; return 0;
while(isspace(*str)) str++; while(MSVCRT__isspace_l((unsigned char)*str, NULL)) str++;
if(*str == '+') { if(*str == '+') {
str++; str++;
...@@ -1209,7 +1208,7 @@ unsigned __int64 CDECL MSVCRT_strtoui64_l(const char *nptr, char **endptr, int b ...@@ -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 == 0 || base >= 2)) return 0;
if (!MSVCRT_CHECK_PMT(base <= 36)) 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 == '-') { if(*nptr == '-') {
negative = TRUE; negative = TRUE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment