Guardian Native C Library Calls Reference Manual (G06.28+, H06.04+)
Guardian Native C Library Calls (f) fputwc(3)
NAME
fputwc - Writes a wide character to a specified stream
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL
G-series native OSS processes: /G/system/sysnn/zcrtlsrl
H-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
H-series OSS processes: /G/system/zdllnnn/zcrtldll
SYNOPSIS
#include <wchar.h>
wint_t fputwc(
wint_t c,
FILE *stream);
PARAMETERS
c Specifies the wide character to be written.
stream Points to the output data.
DESCRIPTION
The fputwc() function converts the wchar_t specified by the c parameter to its equivalent multi-
byte character and then writes the multibyte character to the stream parameter.
The fputwc() function works the same as putwc( ).
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’s buffering strategy.
RETURN VALUES
Upon successful completion, this function returns the value written. If this function fails, it
returns the constant WEOF.
ERRORS
If any of the following conditions occur, the putwc( ), fputwc(), and putwchar( ) function sets
errno to the corresponding value.
[EAGAIN] The O_NONBLOCK flag is set for the file descriptor underlying stream and the
process would be delayed in the write operation.
[EBADF] The file descriptor underlying stream is not a valid file descriptor open for writ-
ing.
[EFBIG] An attempt was made to write to a file that exceeds the process’s file size limit or
the maximum file size.
[EINTR] The read operation was interrupted by a signal that was caught, and no data was
transferred.
[EIO] The implementation supports job control; the process is a member of a back-
ground process group attempting to write to its controlling terminal; TOSTOP is
set; the process is neither ignoring nor blocking SIGTTOU; and the process
group of the process is orphaned.
527192-005 Hewlett-Packard Company 2−51