19 lines
315 B
C
19 lines
315 B
C
|
#include <stdio.h>
|
||
|
#include <fxlibc/scanf.h>
|
||
|
|
||
|
int sscanf(const char * restrict str, char const * restrict fmt, ...)
|
||
|
{
|
||
|
/* This is valid even if str=NULL. */
|
||
|
struct __scanf_input in = {
|
||
|
.str = str,
|
||
|
};
|
||
|
|
||
|
va_list args;
|
||
|
va_start(args, fmt);
|
||
|
|
||
|
int count = __scanf(&in, fmt, &args);
|
||
|
|
||
|
va_end(args);
|
||
|
return count;
|
||
|
}
|