VMS Help  —  CRTL  fwide
    Determines and sets the orientation of a stream.

    Format

      #include  <wchar.h>

      int fwide  (FILE *stream, int mode);

1  –  Arguments

 stream

    A file pointer.

 mode

    A value that specifies the desired orientation of the stream.

2  –  Description

    The fwide function determines the orientation of the stream
    pointed to by stream and sets the orientation of a nonoriented
    stream according to the mode argument in the following way:

    If the mode
    argument is:     Then the fwide function:

    greater than     makes the stream wide-oriented.
    zero
    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.

3  –  Return Values

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