Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

vswprintf(3) OSS Library Calls Reference Manual
NAME
vswprintf - Formats a variable number of parameters for output to a buffer
LIBRARY
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 <wchar.h>
#include <stdarg.h> /* optional except for POSIX.1 */
int vswprintf(
wchar_t *string,
size_t n,
const wchar_t *format,
va_list printarg
);
PARAMETERS
string Specifies the wide-character array to which output is printed.
n Specifies the size of the character array referred to by the string parameter. If n
is zero, no characters are stored and string might be a null pointer. Otherwise,
any generated characters beyond the n-1st are discarded, rather than being
stored, and a null character is appended after the last character that was stored.
format Specifies a wide-character string that contains two types of objects:
Plain wide-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 vswprintf( ) function formats and writes stdarg parameter lists.
This function is the same as the sprintf( ) function, except that it:
Is called with a parameter list pointer as defined by stdarg instead of with a variable
number of parameters.
Writes wide-characters.
Writes only the size of character array specified by the n parameter.
Conversion Specifications
Each conversion specification in the format parameter has the following syntax:
A % (percent sign).
This function can handle a format string that enables the system to process elements of
the parameter list in variable order. In such a case, the normal conversion character %
(percent sign) is replaced by %digit$, where digit is a decimal number in the range from
1toNL_ARGMAX. Conversion is then applied to the specified argument, rather than to
the next unused argument. This feature provides for the definition of format strings in an
order appropriate to specific languages. When variable ordering is used, the * (asterisk)
specification for field width in precision is replaced by %digit$. If the variable ordering
7136 Hewlett-Packard Company 527187-017