Guardian C Library Calls Reference Manual
Reference to Library Calls
Guardian TNS C Library Calls Reference Manual—128833 3-235
vsprintf
vsprintf
The vsprintf function writes formatted data to a string, extracting the data values from a
variable argument list.
str
points to the string where vsprintf stores the formatted data.
format
points to a string that contains characters and conversion specifiers, which indicate
how to format the values of the arguments denoted by ap. Refer to “fprintf” on
page 3-51 for a description of format and conversion specifiers.
ap
is an variable of type va_list that has been initialized by a previous invocation of
va_start (and possibly invocations of va_arg as well).
Return Value
is the number of characters output if the operation is successful; otherwise, vsprintf
returns a negative value.
Usage Guidelines
•
Note that vsprintf requires two headers, <stdargh> and <stdioh>.
•
The vsprintf function does not call the va_end function.
#include <stdargh>
#include <stdioh>
int vsprintf(char *str, const char *format, va_list ap);