diff options
| author | Jakob Kaivo <jkk@ung.org> | 2019-02-28 14:23:47 -0500 |
|---|---|---|
| committer | Jakob Kaivo <jkk@ung.org> | 2019-02-28 14:23:47 -0500 |
| commit | b80fa04bb30db3748f64b1d8b8afe71a13575c5b (patch) | |
| tree | 6b5ac148fa00e0b7a28332e1f5efaa9f003d2d1f /src/wchar/vfwprintf.c | |
| parent | 7637bd6eddc3ee1e992dd465e9c978ca330c6492 (diff) | |
bring definition in line with other *printf functions
Diffstat (limited to 'src/wchar/vfwprintf.c')
| -rw-r--r-- | src/wchar/vfwprintf.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/wchar/vfwprintf.c b/src/wchar/vfwprintf.c index fbff917f..55662dff 100644 --- a/src/wchar/vfwprintf.c +++ b/src/wchar/vfwprintf.c @@ -2,22 +2,16 @@ #include "stdio.h" #include "stdarg.h" #include "stdlib.h" +#include "nonstd/io.h" int vfwprintf(FILE * restrict stream, const wchar_t * restrict format, va_list arg) { - /* - va_list ap; - va_copy(ap, arg); - int len = vsnwprintf(NULL, 0, format, arg); - wchar_t *buf = malloc((len + 1) * sizeof(wchar_t)); - len = vsnwprintf(buf, len, format, ap); - va_end(ap); - len = (int)fwrite(buf, sizeof(*buf), len, stream); - free(buf); - return len; - */ - (void)stream; (void)format; (void)arg; - return 0; + int ret = 0; + struct io_options opt = {0}; + opt.fnname = "vfwprintf"; + opt.stream = stream; + ret = __printf(&opt, NULL /* format */, arg); + return ret; } /* |
