kolibrios/programs/develop/ktcc/trunk/libc.obj/source/stdio/fscanf.c
turbocat ec9a93aa6a libc.obj:
- now using vsscanf from BaseLibc;
 - delete extra pragma
 - disable sort includes(clang-format)

git-svn-id: svn://kolibrios.org@9868 a494cfbc-eb01-0410-851d-a64ba20cac60
2022-08-02 13:30:05 +00:00

24 lines
489 B
C

#include <limits.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
int vfscanf(FILE* stream, const char* format, va_list arg)
{
static char scanf_buffer[STDIO_MAX_MEM];
fgets(scanf_buffer, STDIO_MAX_MEM-1, stream);
return vsscanf(scanf_buffer, format, arg);
}
int fscanf(FILE* stream, const char* format, ...)
{
va_list arg;
int n;
va_start(arg, format);
n = vfscanf(stream, format, arg);
va_end(arg);
return n;
}