fputwc()

write wide character to stream 

Function


SYNOPSIS

#include <stdio.h>

wint_t fputwc(wchar_t wc, FILE *stream);


DESCRIPTION

The fputwc() function writes the wide character wc to stream. After fputwc() returns, the character may be held in an internal buffer either until fflush() or fclose() are executed on stream, or until the process executes exit() or abort().

If stream is open in binary mode, wc is written as a UNICODE character. Otherwise, wc is translated to the corresponding multibyte character on output.


PARAMETERS

wc 

Is the value of the wide character to write to stream.

stream 

Points to the output stream.


RETURN VALUES

On success, fputwc() returns the value wc. On failure, it returns WEOF and sets errno to one of the following values:

EACCES 

Another process has the file locked.

EBADF 

stream is not a valid stream opened for writing.

EINTR 

A signal interrupted the call.

EIO 

An output error occurred.

ENOMEM 

Memory could not be allocated for internal buffers.

ENOSPC 

An attempt is made to write to a full disk.

ENXIO 

A device error occurred.

EPIPE 

An attempt is made to write to a closed pipe.


CONFORMANCE

UNIX 98.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

If the stream is from a file opened in text mode, linefeed is translated to carriage-return linefeed on output. No such translation occurs for files opened in binary mode.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
abort(), exit(), fclose(), fflush(), fopen(), fputc(), fputws()


PTC MKS Toolkit 10.4 Documentation Build 39.