1 /* _cbprintf( void *, size_t (*)( void *, const char *, size_t ), 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.
15 size_t (*cb)( void*, const char*, size_t ),
16 const char * _PDCLIB_restrict format,
21 va_start( ap, format );
22 rc = _vcbprintf( p, cb, format, ap );
30 #define _PDCLIB_FILEID "stdio/sprintf.c"
31 #define _PDCLIB_STRINGIO
34 #include "_PDCLIB_test.h"
37 static size_t testcb( void *p, const char *buf, size_t size )
39 memcpy(bufptr, buf, size);
45 #define testprintf( s, ... ) _cbprintf( bufptr = s, testcb, __VA_ARGS__ )
51 #include "printf_testcases.h"