vswprintf

Writes output to the stream under control of the wide-character format string.

Format

#include  <wchar.h>

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

Arguments

s
A pointer to a multibyte character sequence.
n
The maximum number of bytes that comprise the multibyte character.
format
A pointer to a wide-character string containing the format specifications. For more information about format and conversion specifications and their corresponding arguments, see Chapter 2.
arg
A variable list of the items needed for output.

Description

This function is equivalent to the swprintf function, with the variable argument list replaced by the arg argument. Initialize arg with the va_start macro, and possibly with subsequent va_arg calls.

See also swprintf in this section.

Return Values
The number of wide characters written. 
Negative value  Indicates an error. The function sets errno to one of the following:

  • EILSEQ - Invalid character detected.

  • EINVAL - Insufficient arguments.

  • ENOMEM - Not enough memory available for conversion.

  • ERANGE - Floating-point calculations overflow.

  • EVMSERR - Nontranslatable VMS error. vaxc$errno contains the VMS error code. This might indicate that conversion to a numeric value failed because of overflow.

The function can also set errno to the following as a result of errors returned from the I/O subsystem:

  • EBADF - The file descriptor is not valid.

  • EIO - I/O error.

  • ENOSPC - No free space on the device containing the file.

  • ENXIO - Device does not exist.

  • EPIPE - Broken pipe.

  • ESPIPE - Illegal seek in a file opened for append.

  • EVMSERR - Nontranslatable VMS error. vaxc$errno contains the VMS error code. This indicates that an I/O error occurred for which there is no equivalent C error code.
 


Previous Page | Next Page | Table of Contents | Index