3 /* fprintf( FILE *, const char *, ... )
5 This file is part of the Public Domain C Library (PDCLib).
6 Permission is granted to use, modify, and / or redistribute at will.
13 #include <_PDCLIB_io.h>
15 int fprintf_unlocked( FILE * _PDCLIB_restrict stream,
16 const char * _PDCLIB_restrict format, ... )
20 va_start( ap, format );
21 rc = vfprintf( stream, format, ap );
26 int fprintf( FILE * _PDCLIB_restrict stream,
27 const char * _PDCLIB_restrict format, ... )
31 va_start( ap, format );
33 rc = vfprintf_unlocked( stream, format, ap );
34 funlockfile( stream );
42 #define _PDCLIB_FILEID "stdio/fprintf.c"
43 #define _PDCLIB_FILEIO
45 #include <_PDCLIB_test.h>
47 #define testprintf( stream, ... ) fprintf( stream, __VA_ARGS__ )
52 TESTCASE( ( target = tmpfile() ) != NULL );
53 #include "printf_testcases.h"
54 TESTCASE( fclose( target ) == 0 );