1 #include "stdio_impl.h"
4 static size_t string_read(FILE *f
, unsigned char *buf
, size_t len
)
8 char *end
= memchr(src
, 0, k
);
11 memcpy(buf
, src
, len
);
12 f
->rpos
= (void *)(src
+len
);
13 f
->rend
= (void *)(src
+k
);
18 int vsscanf(const char *restrict s
, const char *restrict fmt
, va_list ap
)
21 .buf
= (void *)s
, .cookie
= (void *)s
,
22 .read
= string_read
, .lock
= -1
24 return vfscanf(&f
, fmt
, ap
);
27 weak_alias(vsscanf
,__isoc99_vsscanf
);