[Previous] [Contents] [Index] [Next]

vswprintf()

Write formatted output to a buffer

Synopsis:

#include <wchar.h>
#include <stdarg.h>

int vswprintf( wchar_t * buf,
               size_t n,
               const wchar_t * format,
               va_list arg );

Library:

libc

Description:

The vsprintf() function formats data under control of the format control string, and writes the result to buf.

The vsprintf() function is equivalent to the sprintf() function, with the variable argument list replaced with arg, which has been initialized by the va_start() macro.

The format string is the same as the one used by printf(). The vswprint() function is the wide-character version of vsprintf().

Returns:

<0
Failure; an error occurred and errno is set.
x
Success; the number of characters written, excluding the terminating NUL.

Classification:

ANSI

Safety:
Cancellation point No
Interrupt handler Read the Caveats
Signal handler Read the Caveats
Thread Yes

Caveats:

It's safe to call vswprintf() in an interrupt handler or signal handler if the data isn't floating point.

See also:

fwprintf(), printf(), swprintf(), va_arg(), va_end(), va_start(), vfwprintf(), vwprintf(), wprintf()


[Previous] [Contents] [Index] [Next]