X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/7b00c0c43f52e9d27168e67a26aac19065cdb40c..ad3c9f2af814c84582fdd1649e49ec4f68572c5a:/stdio/FreeBSD/fwprintf.c?ds=sidebyside diff --git a/stdio/FreeBSD/fwprintf.c b/stdio/FreeBSD/fwprintf.c index dcd6c38..5fefd4a 100644 --- a/stdio/FreeBSD/fwprintf.c +++ b/stdio/FreeBSD/fwprintf.c @@ -27,6 +27,8 @@ #include __FBSDID("$FreeBSD: src/lib/libc/stdio/fwprintf.c,v 1.1 2002/09/21 13:00:30 tjr Exp $"); +#include "xlocale_private.h" + #include #include #include @@ -38,7 +40,21 @@ fwprintf(FILE * __restrict fp, const wchar_t * __restrict fmt, ...) va_list ap; va_start(ap, fmt); - ret = vfwprintf(fp, fmt, ap); + ret = vfwprintf_l(fp, __current_locale(), fmt, ap); + va_end(ap); + + return (ret); +} + +int +fwprintf_l(FILE * __restrict fp, locale_t loc, const wchar_t * __restrict fmt, ...) +{ + int ret; + va_list ap; + + /* no need to call NORMALIZE_LOCALE(loc) because vfwprintf_l will */ + va_start(ap, fmt); + ret = vfwprintf_l(fp, loc, fmt, ap); va_end(ap); return (ret);