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