Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
vsprintf(3) Guardian Native C Library Calls Reference Manual
NAME
vsprintf - Formats a variable number of parameters for output to a buffer
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL
G-series native OSS processes: /G/system/sysnn/zcrtlsrl
H-series and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcrtldll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycrtldll
SYNOPSIS
#include <stdarg.h>
#include <stdio.h> /* optional except for POSIX.1 */
int vsprintf(
char *string,
const char *format,
va_list printarg
);
PARAMETERS
string Specifies the buffer to which output is printed.
format Specifies a character string that contains two types of objects:
• Plain characters, which are copied to the output stream.
• Conversion specifications, each of which causes zero or more items to be
fetched from the stdarg parameter lists.
printarg Specifies the parameters to be printed.
DESCRIPTION
The vsprintf( ) function formats and writes stdarg parameter lists.
This function is the same as the sprintf( ) function, except that it is not called with a variable
number of parameters. Instead, it is called with a parameter list pointer as defined by stdarg.
For a description of the conversion specifications supported for this function, see the sprintf(3)
reference page.
NOTES
In the TNS environment, the vsprintf() function supports only the C/POSIX locale. Thus, any
conversion specifications that are locale-dependent do not function correctly in locales other than
the C/POSIX locale. In the native environment, the vsprintf() function supports all locales.
RETURN VALUES
Upon successful completion, this function returns the number of bytes in the output string. Oth-
erwise, a negative value is returned.
ERRORS
None. The vsprintf() function does not set errno.
RELATED INFORMATION
Functions: fprintf(3), printf(3), sprintf(3), vfprintf(3), vprintf(3).
7−102 Hewlett-Packard Company 527192-018