3 /* vsnprintf( char *, size_t, const char *, va_list ap )
5 This file is part of the Public Domain C Library (PDCLib).
6 Permission is granted to use, modify, and / or redistribute at will.
14 int vsnprintf( char * s, size_t n, const char * format, _PDCLIB_va_list arg )
16 /* TODO: This function should interpret format as multibyte characters. */
17 /* Members: base, flags, n, i, this, s, width, prec, stream, arg */
18 struct _PDCLIB_status_t status = { 0, 0, n, 0, 0, s, 0, 0, NULL, arg };
19 while ( *format != '\0' )
22 if ( ( *format != '%' ) || ( ( rc = _PDCLIB_print( format, &status ) ) == format ) )
24 /* No conversion specifier, print verbatim */
25 s[ status.i++ ] = *(format++);
29 /* Continue parsing after conversion specifier */
40 #include <_PDCLIB_test.h>
44 TESTCASE( NO_TESTDRIVER );