projects
/
fw
/
pdclib
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Switched to tmpfile() where appropriate.
[fw/pdclib]
/
functions
/
stdio
/
vfprintf.c
diff --git
a/functions/stdio/vfprintf.c
b/functions/stdio/vfprintf.c
index 6ff56ff905a3adb538816dc85b0ac39af55ed3b6..44c86358783e6b13b3ee13d6ef39e8c71c8add0f 100644
(file)
--- a/
functions/stdio/vfprintf.c
+++ b/
functions/stdio/vfprintf.c
@@
-49,12
+49,14
@@
int vfprintf( struct _PDCLIB_file_t * _PDCLIB_restrict stream, const char * _PDC
#endif
#ifdef TEST
#endif
#ifdef TEST
+#define _PDCLIB_FILEID "stdio/vfprintf.c"
+#define FPRINTF_FUNCTION
#include <stdlib.h>
#include <limits.h>
#include <string.h>
#include <_PDCLIB_test.h>
#include <stdlib.h>
#include <limits.h>
#include <string.h>
#include <_PDCLIB_test.h>
-static int testprintf( FILE * stream,
size_t n,
const char * format, ... )
+static int testprintf( FILE * stream, const char * format, ... )
{
int i;
va_list arg;
{
int i;
va_list arg;
@@
-66,11
+68,10
@@
static int testprintf( FILE * stream, size_t n, const char * format, ... )
int main( void )
{
int main( void )
{
- FILE *
buffer
;
- TESTCASE( (
buffer = fopen( "testfile", "wb"
) ) != NULL );
+ FILE *
target
;
+ TESTCASE( (
target = tmpfile(
) ) != NULL );
#include "printf_testcases.incl"
#include "printf_testcases.incl"
- TESTCASE( fclose( buffer ) == 0 );
-#include "fprintf_reftest.incl"
+ TESTCASE( fclose( target ) == 0 );
return TEST_RESULTS;
}
return TEST_RESULTS;
}