From c73db4ce616ba2fefd0b2dcd034600fa1a7e7bfa Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Thu, 28 Feb 2019 15:33:22 -0500 Subject: implement in terms of __scanf() --- src/stdio/vfscanf.c | 7 +++++++ src/stdio/vsscanf.c | 7 +++++++ 2 files changed, 14 insertions(+) (limited to 'src/stdio') diff --git a/src/stdio/vfscanf.c b/src/stdio/vfscanf.c index 44ce6ea2..6c0f97ee 100644 --- a/src/stdio/vfscanf.c +++ b/src/stdio/vfscanf.c @@ -1,7 +1,14 @@ #include +#include "nonstd/io.h" int vfscanf(FILE * restrict stream, const char * restrict format, va_list arg) { + int ret = 0; + struct io_options opt = {0}; + opt.fnname = __func__; + opt.stream = stream; + ret = __scanf(&opt, format, arg); + return ret; } /* diff --git a/src/stdio/vsscanf.c b/src/stdio/vsscanf.c index 534f30ea..d5322078 100644 --- a/src/stdio/vsscanf.c +++ b/src/stdio/vsscanf.c @@ -1,8 +1,15 @@ #include #include "stdarg.h" +#include "nonstd/io.h" int vsscanf(const char * restrict s, const char * restrict format, va_list arg) { + int ret = 0; + struct io_options opt = {0}; + opt.fnname = __func__; + opt.string = (char*)s; + ret = __scanf(&opt, format, arg); + return ret; } /* -- cgit v1.2.1