aboutsummaryrefslogtreecommitdiff
path: root/libio/swscanf.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/swscanf.c')
-rw-r--r--libio/swscanf.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libio/swscanf.c b/libio/swscanf.c
index c8686bcbaf..90f721cc51 100644
--- a/libio/swscanf.c
+++ b/libio/swscanf.c
@@ -15,20 +15,22 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <libioP.h>
#include <stdarg.h>
-#include <wchar.h>
+#include "strfile.h"
/* Read formatted input from S, according to the format string FORMAT. */
-/* VARARGS2 */
+
int
__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);
va_start (arg, format);
- done = __vswscanf (s, format, arg);
+ done = __vfwscanf_internal (f, format, arg, 0);
va_end (arg);
return done;