OSDN Git Service

(split) LDP v3.24 -> v3.29 の定型的な変更内容を反映。
[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  2010-09-20 "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 _POSIX_C_SOURCE\ >=\ 200112L;
42 .br
43 or
44 .I cc\ -std=c99
45 .RE
46 .ad
47 .\"O .SH DESCRIPTION
48 .SH ÀâÌÀ
49 .\"O When \fImode\fP is zero, the
50 .\"O .BR fwide ()
51 .\"O function determines the current
52 .\"O orientation of \fIstream\fP.
53 .\"O It returns a positive value if \fIstream\fP is
54 .\"O wide-character oriented, that is, if wide-character I/O is permitted but char
55 .\"O I/O is disallowed.
56 .\"O It returns a negative value if \fIstream\fP is byte oriented,
57 .\"O i.e., if char I/O is permitted but wide-character I/O is disallowed.
58 .\"O It
59 .\"O returns zero if \fIstream\fP has no orientation yet; in this case the next
60 .\"O I/O operation might change the orientation (to byte oriented if it is a char
61 \fImode\fP ¤¬¥¼¥í¤Ê¤é¤Ð
62 .BR fwide ()
63 ´Ø¿ô¤Ï \fIstream\fP ¤Î¸½ºß¤Î
64 .\"O I/O operation, or to wide-character oriented if it is a wide-character I/O
65 .\"O operation).
66 Æþ½ÐÎÏñ°Ì¤ò·èÄꤷ¤ÆÊÖ¤¹¡£\fIstream\fP ¤¬¥ï¥¤¥Éʸ»úñ°Ì¤Î¤È¤­¡¢
67 ¤¹¤Ê¤ï¤Á¥ï¥¤¥Éʸ»ú I/O ¤Ïµö¤µ¤ì¤Æ¥Ð¥¤¥È (char) I/O ¤Ïµö¤µ¤ì¤Æ¤¤¤Ê¤¤
68 ¤È¤­¤Ë¤Ï¡¢Àµ¤ÎÃͤòÊÖ¤¹¡£
69 \fIstream\fP ¤¬¥Ð¥¤¥Èñ°Ì¤Î¤È¤­¡¢¤¹¤Ê¤ï¤Á¥Ð¥¤¥È I/O ¤Ïµö¤µ¤ì¤Æ
70 ¥ï¥¤¥Éʸ»ú I/O ¤Ïµö¤µ¤ì¤Æ¤¤¤Ê¤¤¤È¤­¤Ë¤Ï¡¢Éé¤ÎÃͤòÊÖ¤¹¡£
71 \fIstream\fP ¤ÎÆþ½ÐÎÏñ°Ì¤¬¤Þ¤À·èÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ë¤Ï¥¼¥í¤¬ÊÖ¤µ¤ì¤ë¡£
72 ¤³¤Î¾ì¹ç¤Ë¤Ï¼¡¤Î I/O Áàºî¤Ë¤è¤Ã¤ÆÆþ½ÐÎÏñ°Ì¤¬Êѹ¹¤µ¤ì¤ë
73 (¥Ð¥¤¥È I/O Áàºî¤Î¾ì¹ç¤Ë¤Ï¥Ð¥¤¥Èñ°Ì¤Ë¡¢¥ï¥¤¥Éʸ»ú I/O Áàºî¤Î¾ì¹ç¤Ë¤Ï
74 ¥ï¥¤¥Éʸ»úñ°Ì¤Ë¤Ê¤ë)¡£
75 .PP
76 .\"O Once a stream has an orientation, it cannot be changed and persists until
77 .\"O the stream is closed.
78 °ìÅÙ¥¹¥È¥ê¡¼¥à¤ÎÆþ½ÐÎÏñ°Ì¤¬·è¤Þ¤ë¤È¡¢Êѹ¹¤¹¤ë¤³¤È¤Ï¤Ç¤­¤º¡¢
79 ¥¹¥È¥ê¡¼¥à¤¬¥¯¥í¡¼¥º (close) ¤µ¤ì¤ë¤Þ¤ÇÊÝ»ý¤µ¤ì¤ë¡£
80 .PP
81 .\"O When \fImode\fP is nonzero, the
82 .\"O .BR fwide ()
83 .\"O function first attempts to set
84 .\"O \fIstream\fP's orientation (to wide-character oriented
85 .\"O if \fImode\fP is greater than 0, or
86 .\"O to byte oriented if \fImode\fP is less than 0).
87 .\"O It then returns a value denoting the
88 .\"O current orientation, as above.
89 \fImode\fP ¤¬¥¼¥í¤Ç¤Ê¤¤¾ì¹ç¤Ë¤Ï
90 .BR fwide ()
91 ´Ø¿ô¤ÏºÇ½é¤Ë \fIstream\fP
92 ¤ÎÆþ½ÐÎÏñ°Ì¤òÀßÄꤷ¤è¤¦¤È¤¹¤ë
93 (\fImode\fP ¤¬ 0 ¤è¤êÂ礭¤¤¾ì¹ç¤Ë¤Ï¥ï¥¤¥Éʸ»úñ°Ì¤Ë¡¢
94 \fImode\fP ¤¬ 0 ¤è¤ê¾®¤µ¤¤¾ì¹ç¤Ë¤Ï¥Ð¥¤¥Èñ°Ì¤ËÀßÄꤷ¤è¤¦¤È¤¹¤ë)¡£
95 ¤½¤·¤Æ¾åµ­¤ÈƱÍͤ˸½ºß¤ÎÆþ½ÐÎÏñ°Ì¤òÊÖ¤¹¡£
96
97 .\"O .SH "RETURN VALUE"
98 .SH ÊÖ¤êÃÍ
99 .\"O The
100 .\"O .BR fwide ()
101 .\"O function returns the stream's orientation, after possibly
102 .\"O changing it.
103 .\"O A positive return value means wide-character oriented.
104 .\"O A negative return value means byte oriented.
105 .\"O A return value of zero means undecided.
106 .BR fwide ()
107 ´Ø¿ô¤Ï¥¹¥È¥ê¡¼¥à¤ÎÆþ½ÐÎÏñ°Ì¤ÎÀßÄê¤ò»î¤ß¤¿¸å¤Ë¤½¤ÎÃͤòÊÖ¤¹¡£
108 Àµ¤ÎÊÖ¤êÃͤϥ磻¥Éʸ»úñ°Ì¤ò¡¢Éé¤ÎÊÖ¤êÃͤϥХ¤¥Èñ°Ì¤ò°ÕÌ£¤¹¤ë¡£
109 ÊÖ¤êÃͤ¬ 0 ¤Ê¤é¤Ð̤·èÄê¤ò°ÕÌ£¤¹¤ë¡£
110 .\"O .SH "CONFORMING TO"
111 .SH ½àµò
112 C99, POSIX.1-2001.
113 .\"O .SH NOTES
114 .SH Ãí°Õ
115 .\"O Wide-character output to a byte oriented stream can be performed through the
116 .\"O .BR fprintf (3)
117 .\"O function with the
118 .\"O .B %lc
119 .\"O and
120 .\"O .B %ls
121 .\"O directives.
122 ¥Ð¥¤¥Èñ°Ì¤Î¥¹¥È¥ê¡¼¥à¤Ë¥ï¥¤¥Éʸ»ú¤ò½ÐÎϤˤ¹¤ë¤Ë¤Ï
123 .BR fprintf (3)
124 ´Ø¿ô¤Î
125 .B %lc
126 ÊÑ´¹¤ä
127 .B %ls
128 ÊÑ´¹¤ò»ÈÍѤ¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
129 .PP
130 .\"O Char oriented output to a wide-character oriented stream can be performed
131 .\"O through the
132 .\"O .BR fwprintf (3)
133 .\"O function with the
134 .\"O .B %c
135 .\"O and
136 .\"O .B %s
137 .\"O directives.
138 ¥ï¥¤¥Éʸ»úñ°Ì¤Î¥¹¥È¥ê¡¼¥à¤Ë¥Ð¥¤¥Èñ°Ì¤Î½ÐÎϤò¹Ô¤¦¤Ë¤Ï
139 .BR fwprintf (3)
140 ´Ø¿ô¤Î
141 .B %c
142 ÊÑ´¹¤ä
143 .B %s
144 ÊÑ´¹¤ò»ÈÍѤ¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
145 .\"O .SH "SEE ALSO"
146 .SH ´ØÏ¢¹àÌÜ
147 .BR fprintf (3),
148 .BR fwprintf (3)