OS_VSNPrintf

C Specification

#include <nitro/os.h>

int OS_VSNPrintf( char *dst, size_t len, const char *fmt, va_list vlist );

Arguments

dst Storage destination buffer for output character string
len Storage destination buffer size for output character string
fmt Character string output format (character string format)
vlist Variable argument list

Return Values

Always returns the number of characters if the format character string was output properly. The termination character ( \0 ) is not included in this number.

The output character string is written to dst. If the output character string is less than len, all of the character strings and termination character ( \0 ) are written. If the output character string is greater than or equal to len: If len is not 0, the termination character ( \0 ) is written to dst[len - 1].(2) If len is 0, nothing is done with dst.

Description

This function returns the simplified version of the format character string.

This function operates identically to vsnprintf() from MSL, but the following features cannot be used:

CodeWarrior extension Pascal character string (#s) MSL AltiVec extensions (v, vh, vl, hv, lv, @) Floating Points (e, E, f, g, G, a, A) Wide character string (wchar_t) NOTE: The shift_JIS mutlibyte character string can be used.

This function is compiled with weak symbols. Therefore you can overwrite them with your own function definitions.

See Also

OS_SPrintf, OS_VSPrintf, OS_SNPrintf

Revision History

04/08/2005 Deleted erroneous note saying that it will not be generated in the final ROM version (FINALMROM) library.
11/25/2004 Added description of weak symbols.
06/15/2004 Changed "termination NUL" to "termination character ( \0 )".
03/26/2004 Initial version

CONFIDENTIAL