1 FWIDE(3C)                Standard C Library Functions                FWIDE(3C)
   2 
   3 
   4 
   5 NAME
   6        fwide - set stream orientation
   7 
   8 SYNOPSIS
   9        #include <stdio.h>
  10        #include <wchar.h>
  11 
  12        int fwide(FILE *stream, int mode);
  13 
  14 
  15 DESCRIPTION
  16        The fwide() function determines the orientation of the stream pointed
  17        to by stream. If mode is greater than 0, the function first attempts to
  18        make the stream wide-oriented.  If mode is less than 0, the function
  19        first attempts to make the stream byte-oriented.  Otherwise, mode is 0
  20        and the function does not alter the orientation of the stream.
  21 
  22 
  23        If the orientation of the stream has already been determined, fwide()
  24        does not change it.
  25 
  26 
  27        Because no return value is reserved to indicate an error, an
  28        application wishing to check for error situations should set errno to
  29        0, then call fwide(), then check errno and if it is non-zero, assume an
  30        error has occurred.
  31 
  32 RETURN VALUES
  33        The fwide() function returns a value greater than 0 if, after the call,
  34        the stream has wide-orientation, a value less than 0 if the stream has
  35        byte-orientation, or 0 if the stream has no orientation.
  36 
  37 ERRORS
  38        The fwide() function may fail if:
  39 
  40        EBADF
  41                 The stream argument is not a valid stream.
  42 
  43 
  44 USAGE
  45        A call to fwide() with  mode set to 0 can be used to determine the
  46        current orientation of a stream.
  47 
  48 ATTRIBUTES
  49        See attributes(5) for descriptions of the following attributes:
  50 
  51 
  52 
  53 
  54        +--------------------+-----------------+
  55        |  ATTRIBUTE TYPE    | ATTRIBUTE VALUE |
  56        +--------------------+-----------------+
  57        |Interface Stability | Standard        |
  58        +--------------------+-----------------+
  59        |MT-Level            | MT-Safe         |
  60        +--------------------+-----------------+
  61 
  62 SEE ALSO
  63        attributes(5), standards(5)
  64 
  65 
  66 
  67                                  June 3, 2015                        FWIDE(3C)