Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)
System Functions (s and S) spt_getwcx(2)
NAME
spt_getwcx - Gets a wide character from a specified input 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_getwcx (
FILE *stream
);
PARAMETERS
stream Specifies the input data.
DESCRIPTION
The spt_getwcx() function is the thread-aware version of the getwc() function.
The spt_getwcx() function gets the next wide character from the input stream specified by the
stream parameter.
NOTES
The macro to map getwc() to spt_getwcx() 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 getwc() to spt_getwcx() 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
This function returns the wide character read or the constant WEOF (wide-character end-of-file)
at the end of the file or upon an error.
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_getwcx() function sets errno to the corresponding
value:
[EBADF] The file descriptor underlying stream is no longer valid.
[EINTR] A signal was received that is not blocked, ignored, or handled.
RELATED INFORMATION
Functions: fgetwc(3), fopen(3), fread(3), getc(3), gets(3), getwc(3), getwchar(3), putwc(3),
scanf(3), spt_getcx(2), spt_getsx(2), spt_getwcharx(2), spt_putwcx(2).
527186-023 Hewlett-Packard Company 7−275