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 _PDCLIB_fprintf_unlocked( FILE * _PDCLIB_restrict stream,
16 const char * _PDCLIB_restrict format, ... )
20 va_start( ap, format );
21 rc = _PDCLIB_vfprintf_unlocked( stream, format, ap );
26 int fprintf( FILE * _PDCLIB_restrict stream,
27 const char * _PDCLIB_restrict format, ... )
31 va_start( ap, format );
32 _PDCLIB_flockfile( stream );
33 rc = _PDCLIB_vfprintf_unlocked( stream, format, ap );
34 _PDCLIB_funlockfile( stream );
44 #define _PDCLIB_FILEID "stdio/fprintf.c"
45 #define _PDCLIB_FILEIO
47 #include <_PDCLIB_test.h>
49 #define testprintf( stream, ... ) fprintf( stream, __VA_ARGS__ )
54 TESTCASE( ( target = tmpfile() ) != NULL );
55 #include "printf_testcases.h"
56 TESTCASE( fclose( target ) == 0 );