Open System Services System Calls Reference Manual (G06.28+)

spt_putwcharx(2) OSS System Calls Reference Manual
NAME
spt_putwcharx - Writes a wide character to the standard output stream (thread-aware)
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-series OSS processes: /G/system/zdllnnn/zsptdll
SYNOPSIS
[#include <wchar.h>]
#include <spthread.h>
wint_t spt_putwcharx (
wint_t c
);
PARAMETERS
c Species the wide character to be written.
DESCRIPTION
The spt_putwcharx( ) function is the thread-aware version of the putwchar() function.
The spt_putwcharx( ) function converts the wchar_t specied by the c parameter to its
equivalent multibyte character and then writes the multibyte character to the standard output.
With the exception of stderr, output streams are, by default, buffered if they refer to les, or line
buffered if they refer to terminals. The standard error output stream, stderr, is unbuffered by
default, but using the freopen( ) function causes it to become buffered or line buffered. Use the
setbuf() function to change the streams buffering strategy.
NOTES
The macro to map putwchar( ) to spt_putwcharx( ) is available in C applications when
SPT_THREAD_AWARE_NONBLOCK has been dened in the following manner before
including spthread.h:
#dene SPT_THREAD_AWARE_NONBLOCK
The alias to link putwchar( ) to spt_putwcharx( ) is available in C++ applications when
SPT_THREAD_AWARE_PRAGMA_NONBLOCK has been dened in the following manner
before including spthread.h:
#dene SPT_THREAD_AWARE_PRAGMA_NONBLOCK
RETURN VALUES
Upon successful completion, this function returns the value written. If this function fails, it
returns the constant WEOF.
If the le descriptor underlying stdout becomes invalid (is closed by another thread), WEOF is
returned with an errno value of [EBADF]. If a signal is received via the pthread_kill() function
and is not blocked, ignored, or handled, WEOF is returned with an errno value of [EINTR].
ERRORS
If any of the following conditions occur, the spt_putwcharx() function sets errno to the
corresponding value:
[EAGAIN] The O_NONBLOCK ag is set for the le descriptor underlying the standard
output stream and the process would be delayed in the write operation.
7230 Hewlett-Packard Company 527186-005