musl/src/stdio/vsscanf.c

19 lines
381 B
C
Raw Normal View History

#include "stdio_impl.h"
#include "libc.h"
2011-02-12 00:22:29 -05:00
static size_t do_read(FILE *f, unsigned char *buf, size_t len)
2011-02-12 00:22:29 -05:00
{
return __string_read(f, buf, len);
2011-02-12 00:22:29 -05:00
}
int vsscanf(const char *restrict s, const char *restrict fmt, va_list ap)
2011-02-12 00:22:29 -05:00
{
FILE f = {
.buf = (void *)s, .cookie = (void *)s,
.read = do_read, .lock = -1
};
return vfscanf(&f, fmt, ap);
2011-02-12 00:22:29 -05:00
}
weak_alias(vsscanf,__isoc99_vsscanf);