Loading...
--- Libc/Libc-763.13/stdio/FreeBSD/vscanf.c
+++ Libc/Libc-1669.0.4/stdio/FreeBSD/vscanf.c
@@ -36,6 +36,8 @@
#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"
@@ -43,14 +45,24 @@
#include "local.h"
int
-vscanf(fmt, ap)
- const char * __restrict fmt;
- __va_list ap;
+vscanf(const char * __restrict fmt, __va_list 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(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);
+}