]> pd.if.org Git - pdclib.old/blobdiff - functions/stdio/vfprintf.c
Yet closer to functional output.
[pdclib.old] / functions / stdio / vfprintf.c
index 0288f6d74b90b9c17fa38ee43a6a68acc01e634a..9a9a9503ce099eb5a5ac6f4ef000c4d7effc54b6 100644 (file)
@@ -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 <stdlib.h>
 #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;
 }