1FWIDE(3P)                  POSIX Programmer's Manual                 FWIDE(3P)
2
3
4

PROLOG

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
11

NAME

13       fwide — set stream orientation
14

SYNOPSIS

16       #include <stdio.h>
17       #include <wchar.h>
18
19       int fwide(FILE *stream, int mode);
20

DESCRIPTION

22       The functionality described on this reference page is aligned with  the
23       ISO C  standard.  Any  conflict between the requirements described here
24       and the ISO C standard is unintentional. This  volume  of  POSIX.1‐2008
25       defers to the ISO C standard.
26
27       The  fwide()  function  shall  determine  the orientation of the stream
28       pointed to by stream.  If mode is greater than zero, the function first
29       attempts  to  make the stream wide-oriented. If mode is less than zero,
30       the function first attempts to make the  stream  byte-oriented.  Other‐
31       wise,  mode  is zero and the function does not alter the orientation of
32       the stream.
33
34       If the orientation of the stream has already been  determined,  fwide()
35       shall not change it.
36
37       The  fwide() function shall not change the setting of errno if success‐
38       ful.
39
40       Since no return value is reserved to indicate an error, an  application
41       wishing  to check for error situations should set errno to 0, then call
42       fwide(), then check errno, and if it is non-zero, assume an  error  has
43       occurred.
44

RETURN VALUE

46       The  fwide()  function shall return a value greater than zero if, after
47       the call, the stream has wide-orientation, a value less  than  zero  if
48       the  stream has byte-orientation, or zero if the stream has no orienta‐
49       tion.
50

ERRORS

52       The fwide() function may fail if:
53
54       EBADF  The stream argument is not a valid stream.
55
56       The following sections are informative.
57

EXAMPLES

59       None.
60

APPLICATION USAGE

62       A call to fwide() with mode set to zero can be used  to  determine  the
63       current orientation of a stream.
64

RATIONALE

66       None.
67

FUTURE DIRECTIONS

69       None.
70

SEE ALSO

72       The Base Definitions volume of POSIX.1‐2008, <stdio.h>, <wchar.h>
73
75       Portions  of  this text are reprinted and reproduced in electronic form
76       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
77       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
78       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
79       cal  and  Electronics  Engineers,  Inc  and  The  Open Group.  (This is
80       POSIX.1-2008 with the 2013 Technical Corrigendum  1  applied.)  In  the
81       event of any discrepancy between this version and the original IEEE and
82       The Open Group Standard, the original IEEE and The Open Group  Standard
83       is  the  referee document. The original Standard can be obtained online
84       at http://www.unix.org/online.html .
85
86       Any typographical or formatting errors that appear  in  this  page  are
87       most likely to have been introduced during the conversion of the source
88       files to man page format. To report such errors,  see  https://www.ker
89       nel.org/doc/man-pages/reporting_bugs.html .
90
91
92
93IEEE/The Open Group                  2013                            FWIDE(3P)
Impressum