[Previous] [Contents] [Next]

fwide()

Set the stream orientation

Synopsis:

#include <wchar.h>

int fwide( FILE * fp,
           int mode  );

Library:

libc

Description:

The fwide() function sets or determines the orientation of the stream fp.

If mode is set to greater than zero and the stream orientation hasn't been set, it flags the stream as wide-oriented. If mode is less than zero, it behaves similarly but flags the stream as byte-oriented.

If mode is set to zero, fwide() returns the stream type without altering the stream.

Returns:

> 0
The stream is (now) wide-oriented.
0
The stream is unbound.
< 0
The stream is (now) byte-oriented.

Errors:

EBADF
The fp argument isn't valid.

Classification:

ANSI

Safety:
Cancellation point Yes
Interrupt handler No
Signal handler Yes
Thread No

See also:

"Stream I/O functions" and "Wide-character functions" in the summary of functions chapter.


[Previous] [Contents] [Next]