X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/9385eb3d10ebe5eb398c52040ec3dbfba9b0cdcf..aa54d2fad3d9038b43475aa93c76795c5141a993:/stdio/FreeBSD/wscanf.c diff --git a/stdio/FreeBSD/wscanf.c b/stdio/FreeBSD/wscanf.c index 8629027..99dc48d 100644 --- a/stdio/FreeBSD/wscanf.c +++ b/stdio/FreeBSD/wscanf.c @@ -27,6 +27,8 @@ #include __FBSDID("$FreeBSD: src/lib/libc/stdio/wscanf.c,v 1.1 2002/09/23 12:40:06 tjr Exp $"); +#include "xlocale_private.h" + #include #include #include @@ -38,7 +40,21 @@ wscanf(const wchar_t * __restrict fmt, ...) int r; va_start(ap, fmt); - r = vfwscanf(stdin, fmt, ap); + r = vfwscanf_l(stdin, __current_locale(), fmt, ap); + va_end(ap); + + return (r); +} + +int +wscanf_l(locale_t loc, const wchar_t * __restrict fmt, ...) +{ + va_list ap; + int r; + + /* no need to call NORMALIZE_LOCALE(loc) because vfwscanf_l will */ + va_start(ap, fmt); + r = vfwscanf_l(stdin, loc, fmt, ap); va_end(ap); return (r);