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