]> git.saurik.com Git - apple/libc.git/blobdiff - stdio/FreeBSD/vscanf.c
Libc-825.24.tar.gz
[apple/libc.git] / stdio / FreeBSD / vscanf.c
index 7792970ac6356f25de34f422eda6621828301af9..397382e49b1acc32b170fa11583073980f7dc940 100644 (file)
@@ -36,6 +36,8 @@ static char sccsid[] = "@(#)vscanf.c  8.1 (Berkeley) 6/4/93";
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD: src/lib/libc/stdio/vscanf.c,v 1.13 2007/01/09 00:28:08 imp Exp $");
 
+#include "xlocale_private.h"
+
 #include "namespace.h"
 #include <stdio.h>
 #include "un-namespace.h"
@@ -50,7 +52,22 @@ vscanf(fmt, ap)
        int retval;
 
        FLOCKFILE(stdin);
-       retval = __svfscanf(stdin, fmt, ap);
+       retval = __svfscanf_l(stdin, __current_locale(), fmt, ap);
+       FUNLOCKFILE(stdin);
+       return (retval);
+}
+
+int
+vscanf_l(loc, fmt, ap)
+       locale_t loc;
+       const char * __restrict fmt;
+       __va_list ap;
+{
+       int retval;
+
+       NORMALIZE_LOCALE(loc);
+       FLOCKFILE(stdin);
+       retval = __svfscanf_l(stdin, loc, fmt, ap);
        FUNLOCKFILE(stdin);
        return (retval);
 }