Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)
spt_putwcx(2) OSS System Calls Reference Manual
NAME
spt_putwcx - Writes a wide character to a specified 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 Specifies 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 specified 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 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 putwc() to spt_putwcx( ) 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 putwc() to spt_putwcx( ) 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 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 these conditions occur, the spt_putwcx() function sets errno to the corresponding
value:
7−322 Hewlett-Packard Company 527186-023