From 1020bae15556648470b69ee2fb94a995fe491e32 Mon Sep 17 00:00:00 2001 From: Daniel Lehman Date: Wed, 2 Feb 2022 17:28:50 -0800 Subject: [PATCH] include: Add _sscanf_l. Signed-off-by: Daniel Lehman --- include/msvcrt/stdio.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/msvcrt/stdio.h b/include/msvcrt/stdio.h index e53929b94bc..ce198542285 100644 --- a/include/msvcrt/stdio.h +++ b/include/msvcrt/stdio.h @@ -359,6 +359,18 @@ static inline int WINAPIV _snscanf_l(const char *buffer, size_t size, const char return ret; } +static inline int WINAPIV _sscanf_l(const char *buffer, const char *format, _locale_t locale, ...) __WINE_CRT_SCANF_ATTR(2, 4); +static inline int WINAPIV _sscanf_l(const char *buffer, const char *format, _locale_t locale, ...) +{ + int ret; + va_list args; + + va_start(args, locale); + ret = __stdio_common_vsscanf(_CRT_INTERNAL_LOCAL_SCANF_OPTIONS, buffer, -1, format, locale, args); + va_end(args); + return ret; +} + static inline int WINAPIV fscanf(FILE *file, const char *format, ...) __WINE_CRT_SCANF_ATTR(2, 3); static inline int WINAPIV fscanf(FILE *file, const char *format, ...) { @@ -432,6 +444,7 @@ static inline int vsnprintf(char *buffer, size_t size, const char *format, va_li { return _vsnprintf(buffer,size,format,args); } _ACRTIMP int WINAPIV _snscanf_l(const char*,size_t,const char*,_locale_t,...) __WINE_CRT_SCANF_ATTR(3, 5); +_ACRTIMP int WINAPIV _sscanf_l(const char *,const char*,_locale_t,...) __WINE_CRT_SCANF_ATTR(2, 4); _ACRTIMP int WINAPIV fscanf(FILE*,const char*,...) __WINE_CRT_SCANF_ATTR(2, 3); _ACRTIMP int WINAPIV fscanf_s(FILE*,const char*,...) __WINE_CRT_SCANF_ATTR(2, 3); _ACRTIMP int WINAPIV scanf(const char*,...) __WINE_CRT_SCANF_ATTR(1, 2); -- 2.34.1