Guardian Native C Library Calls Reference Manual (G06.28+, H06.05+)
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 native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
H-series OSS processes: /G/system/zdllnnn/zcrtldll
SYNOPSIS
#include <stdarg.h>
#include <stdio.h>
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.
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−56 Hewlett-Packard Company 527192-007