X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstdio%2Fvfprintf.c;h=9a9a9503ce099eb5a5ac6f4ef000c4d7effc54b6;hb=52e702f02142dc34a476f01ca6bf8257cc9bc7e4;hp=0288f6d74b90b9c17fa38ee43a6a68acc01e634a;hpb=8404f0a1339e4be015e278e83bb1a9e3f73751a3;p=pdclib.old diff --git a/functions/stdio/vfprintf.c b/functions/stdio/vfprintf.c index 0288f6d..9a9a950 100644 --- a/functions/stdio/vfprintf.c +++ b/functions/stdio/vfprintf.c @@ -24,6 +24,7 @@ int vfprintf( struct _PDCLIB_file_t * _PDCLIB_restrict stream, const char * _PDC { /* No conversion specifier, print verbatim */ putc( *(format++), stream ); + status.i++; } else { @@ -37,6 +38,7 @@ int vfprintf( struct _PDCLIB_file_t * _PDCLIB_restrict stream, const char * _PDC #endif #ifdef TEST +#include #include <_PDCLIB_test.h> static int testprintf( FILE * stream, const char * format, ... ) @@ -52,13 +54,10 @@ static int testprintf( FILE * stream, const char * format, ... ) int main( void ) { FILE * fh; - TESTCASE( testprintf( stdout, "Hallo\n" ) == 6 ); -#if 0 TESTCASE( ( fh = fopen( "testfile", "w" ) ) != NULL ); - TESTCASE( testprintf( fh, "Hallo\n" ) ); + TESTCASE( testprintf( fh, "Hallo\n" ) == 6 ); TESTCASE( fclose( fh ) == 0 ); - TESTCASE( remove( "testfile" ) == 0 ); -#endif + /* FIXME: Testfile doesn't exist... */ return TEST_RESULTS; }