1FWIDE(P) POSIX Programmer's Manual FWIDE(P)
2
3
4
6 fwide - set stream orientation
7
9 #include <stdio.h>
10 #include <wchar.h>
11
12 int fwide(FILE *stream, int mode);
13
14
16 The fwide() function shall determine the orientation of the stream
17 pointed to by stream. If mode is greater than zero, the function first
18 attempts to make the stream wide-oriented. If mode is less than zero,
19 the function first attempts to make the stream byte-oriented. Other‐
20 wise, mode is zero and the function does not alter the orientation of
21 the stream.
22
23 If the orientation of the stream has already been determined, fwide()
24 shall not change it.
25
26 Since no return value is reserved to indicate an error, an application
27 wishing to check for error situations should set errno to 0, then call
28 fwide(), then check errno, and if it is non-zero, assume an error has
29 occurred.
30
32 The fwide() function shall return a value greater than zero if, after
33 the call, the stream has wide-orientation, a value less than zero if
34 the stream has byte-orientation, or zero if the stream has no orienta‐
35 tion.
36
38 The fwide() function may fail if:
39
40 EBADF The stream argument is not a valid stream.
41
42
43 The following sections are informative.
44
46 None.
47
49 A call to fwide() with mode set to zero can be used to determine the
50 current orientation of a stream.
51
53 None.
54
56 None.
57
59 The Base Definitions volume of IEEE Std 1003.1-2001, <wchar.h>
60
62 Portions of this text are reprinted and reproduced in electronic form
63 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
64 -- Portable Operating System Interface (POSIX), The Open Group Base
65 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
66 Electrical and Electronics Engineers, Inc and The Open Group. In the
67 event of any discrepancy between this version and the original IEEE and
68 The Open Group Standard, the original IEEE and The Open Group Standard
69 is the referee document. The original Standard can be obtained online
70 at http://www.opengroup.org/unix/online.html .
71
72
73
74IEEE/The Open Group 2003 FWIDE(P)