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.
14 int fprintf_unlocked( struct _PDCLIB_file_t * _PDCLIB_restrict stream,
15 const char * _PDCLIB_restrict format, ... )
19 va_start( ap, format );
20 rc = vfprintf( stream, format, ap );
25 int fprintf( struct _PDCLIB_file_t * _PDCLIB_restrict stream,
26 const char * _PDCLIB_restrict format, ... )
30 va_start( ap, format );
32 rc = vfprintf_unlocked( stream, format, ap );
33 funlockfile( stream );
41 #define _PDCLIB_FILEID "stdio/fprintf.c"
42 #define _PDCLIB_FILEIO
44 #include <_PDCLIB_test.h>
46 #define testprintf( stream, ... ) fprintf( stream, __VA_ARGS__ )
51 TESTCASE( ( target = tmpfile() ) != NULL );
52 #include "printf_testcases.h"
53 TESTCASE( fclose( target ) == 0 );