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

System Functions (s and S) spt_getwcharx(2)
NAME
spt_getwcharx - Gets a wide character from the standard 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_getwcharx (void);
PARAMETERS
None.
DESCRIPTION
The spt_getwcharx() function is the thread-aware version of the getwchar() function.
The spt_getwcharx() function gets the next wide character from the standard input stream. It is
equivalent to spt_getwcx(stdin).
NOTES
The macro to map getwchar() to spt_getwcharx() 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 getwchar() to spt_getwcharx() 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 stdin 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_getwcharx() function sets errno to the corresponding
value:
[EBADF] The file descriptor underlying stdin 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_fgetwcx(2), spt_freadx(2), spt_fgetcx(2), spt_getsx(2), spt_getwcx(2),
spt_putwcx(2).
527186-023 Hewlett-Packard Company 7273