OSDN Git Service

aeb2dd3accd3349a1f1ccdd194ffce52444f41d3
[linuxjm/LDP_man-pages.git] / draft / man3 / fwide.3
1 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
2 .\"
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.
7 .\"
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
12 .\"   ISO/IEC 9899:1999
13 .\"
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>
18 .\"
19 .TH FWIDE 3  2011-09-17 "GNU" "Linux Programmer's Manual"
20 .\"O .SH NAME
21 .SH 名前
22 .\"O fwide \- set and determine the orientation of a FILE stream
23 fwide \- FILE ストリームの入出力単位を設定または取得する
24 .\"O .SH SYNOPSIS
25 .SH 書式
26 .nf
27 .B #include <wchar.h>
28 .sp
29 .BI "int fwide(FILE *" stream ", int " mode );
30 .fi
31 .sp
32 .in -4n
33 .\"O Feature Test Macro Requirements for glibc (see
34 .\"O .BR feature_test_macros (7)):
35 .in
36 .ad l
37 .sp
38 .BR fwide ():
39 .RS 4
40 _XOPEN_SOURCE\ >=\ 500 || _ISOC99_SOURCE ||
41 .br
42 _ISOC95_SOURCE /* Since glibc 2.12 */ ||
43 .br
44 _POSIX_C_SOURCE\ >=\ 200112L;
45 .br
46 or
47 .I cc\ -std=c99
48 .RE
49 .ad
50 .\"O .SH DESCRIPTION
51 .SH 説明
52 .\"O When \fImode\fP is zero, the
53 .\"O .BR fwide ()
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.
61 .\"O It
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
64 \fImode\fP がゼロならば
65 .BR fwide ()
66 関数は \fIstream\fP の現在の
67 .\"O I/O operation, or to wide-character oriented if it is a wide-character I/O
68 .\"O operation).
69 入出力単位を決定して返す。\fIstream\fP がワイド文字単位のとき、
70 すなわちワイド文字 I/O は許されてバイト (char) I/O は許されていない
71 ときには、正の値を返す。
72 \fIstream\fP がバイト単位のとき、すなわちバイト I/O は許されて
73 ワイド文字 I/O は許されていないときには、負の値を返す。
74 \fIstream\fP の入出力単位がまだ決定されていない場合にはゼロが返される。
75 この場合には次の I/O 操作によって入出力単位が変更される
76 (バイト I/O 操作の場合にはバイト単位に、ワイド文字 I/O 操作の場合には
77 ワイド文字単位になる)。
78 .PP
79 .\"O Once a stream has an orientation, it cannot be changed and persists until
80 .\"O the stream is closed.
81 一度ストリームの入出力単位が決まると、変更することはできず、
82 ストリームがクローズ (close) されるまで保持される。
83 .PP
84 .\"O When \fImode\fP is nonzero, the
85 .\"O .BR fwide ()
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.
92 \fImode\fP がゼロでない場合には
93 .BR fwide ()
94 関数は最初に \fIstream\fP
95 の入出力単位を設定しようとする
96 (\fImode\fP が 0 より大きい場合にはワイド文字単位に、
97 \fImode\fP が 0 より小さい場合にはバイト単位に設定しようとする)。
98 そして上記と同様に現在の入出力単位を返す。
99
100 .\"O .SH "RETURN VALUE"
101 .SH 返り値
102 .\"O The
103 .\"O .BR fwide ()
104 .\"O function returns the stream's orientation, after possibly
105 .\"O changing it.
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.
109 .BR fwide ()
110 関数はストリームの入出力単位の設定を試みた後にその値を返す。
111 正の返り値はワイド文字単位を、負の返り値はバイト単位を意味する。
112 返り値が 0 ならば未決定を意味する。
113 .\"O .SH "CONFORMING TO"
114 .SH 準拠
115 C99, POSIX.1-2001.
116 .\"O .SH NOTES
117 .SH 注意
118 .\"O Wide-character output to a byte oriented stream can be performed through the
119 .\"O .BR fprintf (3)
120 .\"O function with the
121 .\"O .B %lc
122 .\"O and
123 .\"O .B %ls
124 .\"O directives.
125 バイト単位のストリームにワイド文字を出力にするには
126 .BR fprintf (3)
127 関数の
128 .B %lc
129 変換や
130 .B %ls
131 変換を使用することができる。
132 .PP
133 .\"O Char oriented output to a wide-character oriented stream can be performed
134 .\"O through the
135 .\"O .BR fwprintf (3)
136 .\"O function with the
137 .\"O .B %c
138 .\"O and
139 .\"O .B %s
140 .\"O directives.
141 ワイド文字単位のストリームにバイト単位の出力を行うには
142 .BR fwprintf (3)
143 関数の
144 .B %c
145 変換や
146 .B %s
147 変換を使用することができる。
148 .\"O .SH "SEE ALSO"
149 .SH 関連項目
150 .BR fprintf (3),
151 .BR fwprintf (3)