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