forked from KolibriOS/kolibrios
ec9a93aa6a
- 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
24 lines
489 B
C
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;
|
|
}
|