]> pd.if.org Git - pdclib/blob - functions/stdio/sprintf.c
Porting current working set from CVS.
[pdclib] / functions / stdio / sprintf.c
1 /* $Id$ */
2
3 /* Release $Name$ */
4
5 /* sprintf( char *, const char *, ... )
6
7    This file is part of the Public Domain C Library (PDCLib).
8    Permission is granted to use, modify, and / or redistribute at will.
9 */
10
11 #include <stdio.h>
12 #include <stdint.h>
13 #include <stdarg.h>
14
15 #ifndef REGTEST
16
17 int sprintf( char * _PDCLIB_restrict s, const char * _PDCLIB_restrict format, ...)
18 {
19     va_list ap;
20     va_start( ap, format );
21     return vsnprintf( s, SIZE_MAX, format, ap );
22 }
23
24 #endif
25
26 #ifdef TEST
27 #include <_PDCLIB_test.h>
28
29 int main( void )
30 {
31     TESTCASE( NO_TESTDRIVER );
32     return TEST_RESULTS;
33 }
34
35 #endif