fwide -- Determine Stream Orientation

Format

#include <stdio.h>
#include <wchar.h>
int fwide(FILE *stream, int mode);

Language Level: ANSI 93
fwide function determines the orientation of the stream pointed to by stream.

If mode is greater than 0, fwide first attempts to make the stream wide oriented. If mode is less than 0, fwide first attempts to make the stream byte oriented.

Note: If the orientation of the stream has already been determined, fwide does not change it.

Otherwise, mode is 0, and fwide does not alter the orientation of the stream.

Return Value
If, after the call, the stream has wide orientation, fwide returns a value greater than 0. If the stream has byte orientation, fwide returns a value less than 0. If the stream has no orientation, fwide returns 0.

Example



fgetwc -- Read Wide Character from Stream
fgetws -- Read Wide-Character String from Stream
fputwc -- Write Wide Character
fputws -- Write Wide-Character String
<stdio.h>
<wchar.h>