summaryrefslogtreecommitdiff
path: root/wcsmbs/isoc99_swscanf.c
diff options
context:
space:
mode:
Diffstat (limited to 'wcsmbs/isoc99_swscanf.c')
-rw-r--r--wcsmbs/isoc99_swscanf.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/wcsmbs/isoc99_swscanf.c b/wcsmbs/isoc99_swscanf.c
index ff523db706..40401d0aa1 100644
--- a/wcsmbs/isoc99_swscanf.c
+++ b/wcsmbs/isoc99_swscanf.c
@@ -16,20 +16,22 @@
<http://www.gnu.org/licenses/>. */
#include <stdarg.h>
-#include <stdio.h>
-#include <libioP.h>
-#include <wchar.h>
+#include <libio/strfile.h>
/* Read formatted input from S, according to the format string FORMAT. */
-/* VARARGS2 */
+
int
__isoc99_swscanf (const wchar_t *s, const wchar_t *format, ...)
{
va_list arg;
int done;
+ _IO_strfile sf;
+ struct _IO_wide_data wd;
+ FILE *f = _IO_strfile_readw (&sf, &wd, s);
+ f->_flags2 |= _IO_FLAGS2_SCANF_STD;
va_start (arg, format);
- done = __isoc99_vswscanf (s, format, arg);
+ done = __vfwscanf_internal (f, format, arg, 0);
va_end (arg);
return done;