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

spt_putwcx(2) OSS System Calls Reference Manual
NAME
spt_putwcx - Writes a wide character to a specied stream (thread-aware version)
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_putwcx (
wint_t c,
FILE *stream
);
PARAMETERS
c Species the wide character to be written.
stream Points to the output data.
DESCRIPTION
The spt_putwcx( ) function is the thread-aware version of the putwc() function.
The spt_putwcx( ) function converts the wchar_t specied by the c parameter to its equivalent
multibyte character and then writes the multibyte character to the stream parameter.
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 putwc() to spt_putwcx( ) 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 putwc() to spt_putwcx() 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 stream 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_putwcx() function sets errno to the correspond-
ing value:
[EAGAIN] The O_NONBLOCK ag is set for the le descriptor underlying stream and the
process would be delayed in the write operation.
7232 Hewlett-Packard Company 527186-005