Module: wine Branch: master Commit: e2423823fc318b0e1a8818d659ac670f75670ee9 URL: https://source.winehq.org/git/wine.git/?a=commit;h=e2423823fc318b0e1a8818d65...
Author: Piotr Caban piotr@codeweavers.com Date: Fri Nov 22 16:41:23 2019 +0100
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
---
dlls/msvcrt/msvcrt.h | 1 + dlls/msvcrt/string.c | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index a5c92497a9..4a7e6f4219 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -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*); diff --git a/dlls/msvcrt/string.c b/dlls/msvcrt/string.c index 346cba7e72..10249592bb 100644 --- a/dlls/msvcrt/string.c +++ b/dlls/msvcrt/string.c @@ -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;