fwide

Determines and sets the orientation of a stream.

Format

#include  <wchar.h>

int fwide  (FILE *stream, int mode);

Arguments

stream
A file pointer.
mode
A value that specifies the desired orientation of the stream.

Description

This function determines the orientation of the stream pointed to by stream and sets the orientation of a non-oriented stream according to the mode argument in the following way:
If the mode argument is  Then the fwide function 
greater than zero  makes the stream wide-oriented. 
less than zero  makes the stream byte- oriented. 
zero  does not alter the orientation of the stream. 

If the orientation of the stream has already been set, fwide does not alter it. Because no error status is defined for fwide, the calling application should check errno if fwide returns a 0.

Return Values
> 0  After the call, the stream is wide-oriented. 
< 0  After the call, the stream is byte-oriented. 
After the call, the stream has no orientation or a stream argument is invalid; the function sets errno. 


Previous Page | Next Page | Table of Contents | Index