fputws()

write wide character string to stream 

Function


SYNOPSIS

#include <stdio.h>

int fputws(const wchar_t *ws, FILE *stream);


DESCRIPTION

The fputws() function writes the null-terminated wide character string pointed to by ws to the stream pointed to by stream. It does not write the terminating null character.

After fputws() returns, the string 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, the string is written as a series of UNICODE characters. Otherwise, it is translated into multibyte format on output.


PARAMETERS

ws 

Is the wide character string to be written.

stream 

Points to the output stream.


RETURN VALUES

If successful, the fputs() function returns zero. If an error occurs, it returns EOF 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.

EFBIG 

The file is a regular file and an attempt was made to write at or beyond the offset maximum associated with the corresponding stream.

EINTR 

A signal interrupted the call.

EIO 

An output error occurred.

ENOMEM 

Memory could not be allocated for internal buffers.

ENOSPC 

An attempt was 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, any linefeed embedded in the output string 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(), fputs(), fputwc()


PTC MKS Toolkit 10.2 Documentation Build 28.