1 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
3 .\" This is free documentation; you can redistribute it and/or
4 .\" modify it under the terms of the GNU General Public License as
5 .\" published by the Free Software Foundation; either version 2 of
6 .\" the License, or (at your option) any later version.
8 .\" References consulted:
9 .\" GNU glibc-2 source code and manual
10 .\" Dinkumware C library reference http://www.dinkumware.com/
11 .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
14 .\" Japanese Version Copyright (c) 1999 HANATAKA Shinya
15 .\" all rights reserved.
16 .\" Translated Tue Jan 11 00:56:36 JST 2000
17 .\" by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
19 .TH FWIDE 3 2011-09-17 "GNU" "Linux Programmer's Manual"
22 .\"O fwide \- set and determine the orientation of a FILE stream
23 fwide \- FILE ストリームの入出力単位を設定または取得する
29 .BI "int fwide(FILE *" stream ", int " mode );
33 .\"O Feature Test Macro Requirements for glibc (see
34 .\"O .BR feature_test_macros (7)):
40 _XOPEN_SOURCE\ >=\ 500 || _ISOC99_SOURCE ||
42 _ISOC95_SOURCE /* Since glibc 2.12 */ ||
44 _POSIX_C_SOURCE\ >=\ 200112L;
52 .\"O When \fImode\fP is zero, the
54 .\"O function determines the current
55 .\"O orientation of \fIstream\fP.
56 .\"O It returns a positive value if \fIstream\fP is
57 .\"O wide-character oriented, that is, if wide-character I/O is permitted but char
58 .\"O I/O is disallowed.
59 .\"O It returns a negative value if \fIstream\fP is byte oriented,
60 .\"O i.e., if char I/O is permitted but wide-character I/O is disallowed.
62 .\"O returns zero if \fIstream\fP has no orientation yet; in this case the next
63 .\"O I/O operation might change the orientation (to byte oriented if it is a char
67 .\"O I/O operation, or to wide-character oriented if it is a wide-character I/O
69 入出力単位を決定して返す。\fIstream\fP がワイド文字単位のとき、
70 すなわちワイド文字 I/O は許されてバイト (char) I/O は許されていない
72 \fIstream\fP がバイト単位のとき、すなわちバイト I/O は許されて
73 ワイド文字 I/O は許されていないときには、負の値を返す。
74 \fIstream\fP の入出力単位がまだ決定されていない場合にはゼロが返される。
75 この場合には次の I/O 操作によって入出力単位が変更される
76 (バイト I/O 操作の場合にはバイト単位に、ワイド文字 I/O 操作の場合には
79 .\"O Once a stream has an orientation, it cannot be changed and persists until
80 .\"O the stream is closed.
81 一度ストリームの入出力単位が決まると、変更することはできず、
82 ストリームがクローズ (close) されるまで保持される。
84 .\"O When \fImode\fP is nonzero, the
86 .\"O function first attempts to set
87 .\"O \fIstream\fP's orientation (to wide-character oriented
88 .\"O if \fImode\fP is greater than 0, or
89 .\"O to byte oriented if \fImode\fP is less than 0).
90 .\"O It then returns a value denoting the
91 .\"O current orientation, as above.
96 (\fImode\fP が 0 より大きい場合にはワイド文字単位に、
97 \fImode\fP が 0 より小さい場合にはバイト単位に設定しようとする)。
100 .\"O .SH "RETURN VALUE"
104 .\"O function returns the stream's orientation, after possibly
106 .\"O A positive return value means wide-character oriented.
107 .\"O A negative return value means byte oriented.
108 .\"O A return value of zero means undecided.
110 関数はストリームの入出力単位の設定を試みた後にその値を返す。
111 正の返り値はワイド文字単位を、負の返り値はバイト単位を意味する。
113 .\"O .SH "CONFORMING TO"
118 .\"O Wide-character output to a byte oriented stream can be performed through the
120 .\"O function with the
125 バイト単位のストリームにワイド文字を出力にするには
133 .\"O Char oriented output to a wide-character oriented stream can be performed
135 .\"O .BR fwprintf (3)
136 .\"O function with the
141 ワイド文字単位のストリームにバイト単位の出力を行うには