1 #include "stdio_impl.h"
2
do_read(FILE * f,unsigned char * buf,size_t len)3 static size_t do_read(FILE *f, unsigned char *buf, size_t len)
4 {
5 return __string_read(f, buf, len);
6 }
7
vsscanf(const char * restrict s,const char * restrict fmt,va_list ap)8 int vsscanf(const char *restrict s, const char *restrict fmt, va_list ap)
9 {
10 FILE f = {
11 .buf = (void *)s, .cookie = (void *)s,
12 .read = do_read, .lock = -1
13 };
14 return vfscanf(&f, fmt, ap);
15 }
16
17 weak_alias(vsscanf,__isoc99_vsscanf);
18