Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

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 Specifies 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 specified 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 files, 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 stream-buffering strategy.
NOTES
The macro to map putwchar() to spt_putwcharx() is available in C applications when
SPT_THREAD_AWARE_NONBLOCK has been defined in the following manner before
including spthread.h:
#define 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 defined in the following manner
before including spthread.h:
#define 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 file 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 these conditions occur, the spt_putwcharx( ) function sets errno to the corresponding
value:
[EAGAIN] The O_NONBLOCK flag is set for the file descriptor underlying the standard
output stream and the process would be delayed in the write operation.
7320 Hewlett-Packard Company 527186-023