1 /* fprintf( FILE *, const char *, ... )
3 This file is part of the Public Domain C Library (PDCLib).
4 Permission is granted to use, modify, and / or redistribute at will.
11 #include <_PDCLIB_io.h>
13 int _PDCLIB_fprintf_unlocked( FILE * _PDCLIB_restrict stream,
14 const char * _PDCLIB_restrict format, ... )
18 va_start( ap, format );
19 rc = _PDCLIB_vfprintf_unlocked( stream, format, ap );
24 int fprintf( FILE * _PDCLIB_restrict stream,
25 const char * _PDCLIB_restrict format, ... )
29 va_start( ap, format );
30 _PDCLIB_flockfile( stream );
31 rc = _PDCLIB_vfprintf_unlocked( stream, format, ap );
32 _PDCLIB_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 );