X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstdio%2Fvfscanf.c;h=a19f18ef13e6fc9233572dd735da66d419ceb4be;hb=d865c4403fc91d1f1ac95ba76febcee9f429bb97;hp=fbf5356d78673667b741fca010ea4af5cfc9adbe;hpb=a7a8d2f1c85c2d7760d4d3479e90466cc3a81b04;p=pdclib diff --git a/functions/stdio/vfscanf.c b/functions/stdio/vfscanf.c index fbf5356..a19f18e 100644 --- a/functions/stdio/vfscanf.c +++ b/functions/stdio/vfscanf.c @@ -1,5 +1,3 @@ -/* $Id$ */ - /* vfscanf( FILE *, const char *, va_list ) This file is part of the Public Domain C Library (PDCLib). @@ -42,7 +40,7 @@ int vfscanf( FILE * _PDCLIB_restrict stream, const char * _PDCLIB_restrict forma { ++status.i; } - if ( ! feof( stream ) ) /* TODO: Check EOF status directly */ + if ( ! feof( stream ) ) { ungetc( c, stream ); } @@ -50,10 +48,10 @@ int vfscanf( FILE * _PDCLIB_restrict stream, const char * _PDCLIB_restrict forma else { /* Non-whitespace char in format string: Match verbatim */ - if ( ( ( c = getc( stream ) ) != *format ) || feof( stream ) ) /* TODO: Check EOF status directly */ + if ( ( ( c = getc( stream ) ) != *format ) || feof( stream ) ) { /* Matching error */ - if ( ! feof( stream ) && ! ferror( stream ) ) /* TODO: Check EOF status directly */ + if ( ! feof( stream ) && ! ferror( stream ) ) { ungetc( c, stream ); } @@ -91,7 +89,7 @@ int vfscanf( FILE * _PDCLIB_restrict stream, const char * _PDCLIB_restrict forma #define _PDCLIB_FILEID "stdio/vfscanf.c" #define _PDCLIB_FILEIO -#include <_PDCLIB_test.h> +#include "_PDCLIB_test.h" static int testscanf( FILE * stream, char const * format, ... ) { @@ -112,4 +110,3 @@ int main( void ) } #endif -