kolibrios/contrib/kolibri-libc/source/stdio/scanf.c
Magomed Kostoev (mkostoevr) 1f4d74f500 Relocate kolibri-libc from GitHub
git-svn-id: svn://kolibrios.org@8622 a494cfbc-eb01-0410-851d-a64ba20cac60
2021-03-02 17:58:11 +00:00

21 lines
349 B
C

#include "format_scan.h"
#include <stdlib.h>
int scanf ( const char * format, ...)
{
va_list arg;
int n;
va_start(arg, format);
if(__scanf_buffer == NULL) __scanf_buffer = malloc(4096);
if(__scanf_buffer == NULL) return -3;
*__scanf_buffer = 0;
n = vscanf(format, arg);
va_end(arg);
return n;
}