fxlibc/src/stdio/fscanf.c
Slyvtt 09b33ca2fa
stdlib: scanf implementation by SlyVTT
Authored-By: Slyvtt <pillot.sylvain@gmail.com>
2023-05-26 21:04:37 +02:00

17 lines
No EOL
266 B
C

#include <stdio.h>
#include <fxlibc/scanf.h>
int fscanf(FILE * restrict fp, char const * restrict fmt, ...)
{
struct __scanf_input in = {
.fp = fp,
};
va_list args;
va_start(args, fmt);
int count = __scanf(&in, fmt, &args);
va_end(args);
return count;
}