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

Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

putwchar()

Write a wide character to a stdout

Synopsis:

#include <wchar.h>

wint_t putwchar( wchar_t wc );

Arguments:

wc
The wide character that you want to write.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The putwchar() function writes the wide character wc, cast as (wint_t)(wchar_t), to the stdout stream. It's equivalent to:

fputwc( wc, stdout );

Returns:

The wide character written, cast as (wint_t)(wchar_t) or WEOF if an error occurs (errno is set).


Note: If wc exceeds the valid wide-character range, the value returned is the wide character written, not wc.

Errors:

EAGAIN
The O_NONBLOCK flag is set for fp and would have been blocked by this operation.
EBADF
The file descriptor for fp isn't valid for writing.
EFBIG
The file exceeds the maximum file size, the process's file size limit, or the function can't write at or beyond the offset maximum.
EINTR
A signal terminated the write operation; no data was transferred.
EIO
A physical I/O error has occurred or all of the following conditions were met:

EPIPE
Can't write to pipe or FIFO because it's closed; a SIGPIPE signal is also sent to the thread.

Classification:

ANSI, POSIX 1003.1

Safety:
Cancellation point Yes
Interrupt handler No
Signal handler No
Thread Yes

See also:

errno, getwc(), getwchar()

"Stream I/O functions" and "Wide-character functions" in the summary of functions chapter.


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