diff options
| author | Jakob Kaivo <jkk@ung.org> | 2019-02-28 15:33:22 -0500 |
|---|---|---|
| committer | Jakob Kaivo <jkk@ung.org> | 2019-02-28 15:33:22 -0500 |
| commit | c73db4ce616ba2fefd0b2dcd034600fa1a7e7bfa (patch) | |
| tree | 31d6192a2acff238755b0c6bfc3292a35cff996b /src/wchar | |
| parent | 3cf39d63902bdbdff2450e542a80e103ceb34571 (diff) | |
implement in terms of __scanf()
Diffstat (limited to 'src/wchar')
| -rw-r--r-- | src/wchar/vfwscanf.c | 7 | ||||
| -rw-r--r-- | src/wchar/vswscanf.c | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/wchar/vfwscanf.c b/src/wchar/vfwscanf.c index 75451ac6..d2e90c5f 100644 --- a/src/wchar/vfwscanf.c +++ b/src/wchar/vfwscanf.c @@ -1,8 +1,15 @@ #include "stdio.h" #include <wchar.h> +#include "nonstd/io.h" int vfwscanf(FILE * restrict stream, const wchar_t * restrict format, va_list arg) { + int ret = 0; + struct io_options opt = {0}; + opt.fnname = __func__; + opt.stream = stream; + ret = __scanf(&opt, (const char*)format, arg); + return ret; } /* diff --git a/src/wchar/vswscanf.c b/src/wchar/vswscanf.c index b0896b75..b0f1271a 100644 --- a/src/wchar/vswscanf.c +++ b/src/wchar/vswscanf.c @@ -1,7 +1,14 @@ #include <wchar.h> +#include "nonstd/io.h" int vswscanf(const wchar_t * restrict s, const wchar_t * restrict format, va_list arg) { + int ret = 0; + struct io_options opt = {0}; + opt.fnname = __func__; + opt.string = (char*)s; + ret = __scanf(&opt, (const char*)format, arg); + return ret; } /* |
