3 /* vfscanf( FILE *, const char *, va_list )
5 This file is part of the Public Domain C Library (PDCLib).
6 Permission is granted to use, modify, and / or redistribute at will.
15 int vfscanf( FILE * _PDCLIB_restrict stream, const char * _PDCLIB_restrict format, va_list arg )
17 struct _PDCLIB_status_t status;
26 status.stream = stream;
27 va_copy( status.arg, arg );
28 // FIXME: This whole shebang should operate on STREAM, not S...
29 while ( *format != '\0' )
32 if ( ( *format != '%' ) || ( ( rc = _PDCLIB_scan( format, &status ) ) == format ) )
34 /* No conversion specifier, match verbatim */
35 if ( isspace( *format ) )
37 /* Whitespace char in format string: Skip all whitespaces */
38 /* No whitespaces in input do not result in matching error */
39 while ( isspace( *status.s ) )
47 /* Non-whitespace char in format string: Match verbatim */
48 if ( *status.s != *format )
63 /* NULL return code indicates matching error */
68 /* Continue parsing after conversion specifier */
79 #include <_PDCLIB_test.h>
83 TESTCASE( NO_TESTDRIVER );