X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstdio%2Fvprintf.c;h=6eba229114e8fb9eb530c60a15df22b92f477da5;hb=84d648157e22cecc65902ecfdd4e3a1b88d5e53f;hp=904f791e45e23aae0f0e38c9bb59a6e2d52da7c5;hpb=d1d0e8dbd23a9691841c61c2d30d0ce7343f9adb;p=pdclib.old diff --git a/functions/stdio/vprintf.c b/functions/stdio/vprintf.c index 904f791..6eba229 100644 --- a/functions/stdio/vprintf.c +++ b/functions/stdio/vprintf.c @@ -11,6 +11,12 @@ #ifndef REGTEST +int vprintf_unlocked( const char * _PDCLIB_restrict format, + _PDCLIB_va_list arg ) +{ + return vfprintf_unlocked( stdout, format, arg ); +} + int vprintf( const char * _PDCLIB_restrict format, _PDCLIB_va_list arg ) { return vfprintf( stdout, format, arg ); @@ -19,8 +25,9 @@ int vprintf( const char * _PDCLIB_restrict format, _PDCLIB_va_list arg ) #endif #ifdef TEST -#include -#include +#define _PDCLIB_FILEID "stdio/vprintf.c" +#define _PDCLIB_FILEIO + #include <_PDCLIB_test.h> static int testprintf( FILE * stream, const char * format, ... ) @@ -33,15 +40,12 @@ static int testprintf( FILE * stream, const char * format, ... ) return i; } -#define TESTCASE_SPRINTF( x ) - int main( void ) { FILE * target; - TESTCASE( ( target = freopen( testfile, "wb", stdout ) ) != NULL ); -#include "printf_testcases.incl" + TESTCASE( ( target = freopen( testfile, "wb+", stdout ) ) != NULL ); +#include "printf_testcases.h" TESTCASE( fclose( target ) == 0 ); -#include "fprintf_reftest.incl" TESTCASE( remove( testfile ) == 0 ); return TEST_RESULTS; }