Write a wide character string to an output stream
#include <wchar.h>
int fputws( const wchar_t * ws,
FILE * fp );
libc
The fputws() function writes the wide-character string specified by ws to the output stream specified by fp.
The terminating NUL wide character isn't written.
A nonnegative value for success, or WEOF if an error occurs (errno is set).
- EAGAIN
- The O_NONBLOCK flag is set for fp and would have been blocked by this operation.
- EBADF
- The file descriptor for fp isn't valid for writing.
- EFBIG
- The file exceeds the maximum file size, the process's file size limit, or the function can't write at or beyond the offset maximum.
- EINTR
- A signal terminated the write operation; no data was transferred.
- EIO
- A physical I/O error has occurred or all of the following conditions were met:
- The process is in the background.
- TOSTOP is set.
- The process is blocking/ignoring SIGTOU.
- The process group is orphaned.
- EPIPE
- Can't write to pipe or FIFO because it's closed; a SIGPIPE signal is also sent to the thread.
ANSI
Safety: | |
Cancellation point |
Yes |
Interrupt handler |
No |
Signal handler |
No |
Thread |
Yes |
errno
"Stream I/O functions"
and
"Wide-character functions"
in the summary of functions chapter.