fputws(3C)
NAME
fputws() − put a wide character string on a stream file
SYNOPSIS
#include <wchar.h>
int fputws(const wchar_t *ws, FILE *stream);
Remarks:
This function is compliant with the XPG4 Worldwide Portability Interface wide-character I/O functions. It parallels the 8 bit character I/O function defined in puts(3S).
DESCRIPTION
fputws() writes a character string corresponding to the null-terminated wide-character string pointed to by ws to the named output stream, but does not append a new-line character or a terminating null character.
The definition for this function, the type wchar_t and the value WEOF are provided in the <wchar.h> header.
EXTERNAL INFLUENCES
Locale
The LC_CTYPE category determines how wide character conversions are done.
International Code Set Support
Single- and multi-byte character code sets are supported.
RETURN VALUE
Upon successful completion, fputws() returns a non-negative number. Otherwise it returns WEOF, sets the error indicator for the stream, and sets errno to indicate the error.
ERRORS
fputws() fails if either the stream is unbuffered, or stream’s buffer needed to be flushed causing an underlying write() call to be invoked, and:
[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 writing.
[EFBIG] An attempt was made to write to a file that exceeds the process’s file size limit or the maximum file size (see ulimit(2)).
[EINTR] A signal was caught during the write() system call.
[EIO] The process is in a background process group and is attempting to write to its controlling terminal, TOSTOP is set, the process is neither ignoring nor blocking the SIGTTOU signal, and the process group of the process is orphaned.
[ENOSPC] There was no free space remaining on the device containing the file.
[EPIPE] An attempt is made to write to a pipe or FIFO that is not open for reading by any process. A SIGPIPE signal is also sent to the process.
[EILSEQ] A wide character in ws does not correspond to a valid character.
Additional errno values may be set by the underlying write() function (see write(2)).
SEE ALSO
ferror(3S), fopen(3S), fread(3S), printf(3S), putwc(3C).
NOTES
fputws() does not append a new-line character.
STANDARDS CONFORMANCE
fputws(): XPG4
Hewlett-Packard Company — HP-UX Release 9.0: August 1992