putwchar()

write wide character to standard output 

Function


SYNOPSIS

#include <stdio.h>

#include <wchar.h>

wint_t putwchar(wchar_t wc);


DESCRIPTION

The putwchar() function writes a wide character to the standard output stream and advances the file position accordingly. This function is equivalent to

putwc(wc, stdout);

If standard output is open in binary mode, wc is written as a UNICODE character. Otherwise wc is translated to the corresponding multibyte character on output.


PARAMETERS

wc 

Is the value of the wide character to write to standard output.


RETURN VALUES

If successful, the putwchar() function returns zero. On error, it returns non-zero and sets errno to one of the following values:

EACCES 

Another process has the file locked.

EBADF 

The standard output stream is not a valid stream opened for writing.

EFBIG 

The file is a regular file and an attempt was made to write at or beyond the offset maximum associated with the corresponding stream.

EINTR 

A signal interrupted the call.

EIO 

An output error occurred.

ENOMEM 

Memory could not be allocated for internal buffers.

ENOSPC 

An attempt was made to write to a full disk.

ENXIO 

A device error occurred.

EPIPE 

An attempt was made to write to a closed pipe.


CONFORMANCE

UNIX 98.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

If standard output is open in text mode, then linefeed is translated into carriage-return linefeed on output. No such translation occurs for files open in binary mode.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
fputwc(), putc(), putwc()


PTC MKS Toolkit 10.4 Documentation Build 39.