fputws(3) — Subroutines
NAME
fputws − Write a string to a stream
LIBRARY
Standard I/O Library (libc.a)
SYNOPSIS
#include <wchar.h> int fputws(
wchar_t ∗string,
FILE ∗stream);
PARAMETERS
stringPoints to a string to be written to output.
streamPoints to the FILE structure of an open file.
DESCRIPTION
The fputws() function writes the wchar_t string pointed to by the string parameter to the output stream. Again, each element of the string parameter is converted to the equivalent multibyte character. In all other respects, fputws() functions like fputs().
This function parallels the fputs() function.
The st_ctime and st_mtime fields of the file are marked for update between the successful execution of the fputws() function, and the next successful completion of a call to the fflush() or fclose() function on the same stream, or a call to the exit() or abort() function.
RETURN VALUES
Upon successful completion, the fputws() function returns the number of characters written. The function returns EOF on an error.
ERRORS
If any of the following conditions occur, the fputws() 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 writing.
[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 background 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.
[ENOSPC]There was no free space remaining on the device containing the file.
[EPIPE]An attempt was made to write to a pipe or FIFO that is not open for reading by any process. A SIGPIPE signal will also be sent to the process.
[EILSEQ]The wide character code specified by the c parameter does not correspond to a valid character.
RELATED INFORMATION
Functions: fgetws(3), gets(3), wcstombs(3), printf(3), putc(3), puts(3), putwc(3).