mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-17 04:12:34 +03:00
728f124678
Configured autobuild git-svn-id: svn://kolibrios.org@8687 a494cfbc-eb01-0410-851d-a64ba20cac60
22 lines
400 B
C
22 lines
400 B
C
//#include "format_scan.h"
|
|
#include <stdlib.h>
|
|
#include <errno.h>
|
|
|
|
int scanf ( const char * format, ...)
|
|
{
|
|
va_list arg;
|
|
int n;
|
|
va_start(arg, format);
|
|
|
|
if(__scanf_buffer == NULL) __scanf_buffer = malloc(STDIO_MAX_MEM);
|
|
if(__scanf_buffer == NULL) errno = ENOMEM; return ENOMEM;
|
|
|
|
*__scanf_buffer = 0;
|
|
n = vscanf(format, arg);
|
|
|
|
va_end(arg);
|
|
return n;
|
|
}
|
|
|
|
|