1fwide(3C)                Standard C Library Functions                fwide(3C)
2
3
4

NAME

6       fwide - set stream orientation
7

SYNOPSIS

9       #include <stdio.h>
10       #include <wchar.h>
11
12       int fwide(FILE *stream, int mode);
13
14

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-orientated.  If mode is less than 0, the function
19       first attempts to make the stream byte-orientated.  Otherwise, mode  is
20       0 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  applica‐
28       tion  wishing to check for error situations should set errno to 0, then
29       call fwide(), then check errno and if it is non-zero, assume  an  error
30       has occurred.
31

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

ERRORS

38       The fwide() function may fail if:
39
40       EBADF    The stream argument is not a valid stream.
41
42

USAGE

44       A call to fwide() with  mode set to 0 can be used to determine the cur‐
45       rent orientation of a stream.
46

ATTRIBUTES

48       See attributes(5) for descriptions of the following attributes:
49
50
51
52
53       ┌─────────────────────────────┬─────────────────────────────┐
54       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
55       ├─────────────────────────────┼─────────────────────────────┤
56       │Interface Stability          │Standard                     │
57       ├─────────────────────────────┼─────────────────────────────┤
58       │MT-Level                     │MT-Safe                      │
59       └─────────────────────────────┴─────────────────────────────┘
60

SEE ALSO

62       attributes(5), standards(5)
63
64
65
66SunOS 5.11                        24 Jul 2002                        fwide(3C)
Impressum