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 2010-09-20 "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 ||
41 _POSIX_C_SOURCE\ >=\ 200112L;
49 .\"O When \fImode\fP is zero, the
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.
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 ¤¬¥¼¥í¤Ê¤é¤Ð
63 ´Ø¿ô¤Ï \fIstream\fP ¤Î¸½ºß¤Î
64 .\"O I/O operation, or to wide-character oriented if it is a wide-character I/O
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 ¥ï¥¤¥Éʸ»úñ°Ì¤Ë¤Ê¤ë)¡£
76 .\"O Once a stream has an orientation, it cannot be changed and persists until
77 .\"O the stream is closed.
78 °ìÅÙ¥¹¥È¥ê¡¼¥à¤ÎÆþ½ÐÎÏñ°Ì¤¬·è¤Þ¤ë¤È¡¢Êѹ¹¤¹¤ë¤³¤È¤Ï¤Ç¤¤º¡¢
79 ¥¹¥È¥ê¡¼¥à¤¬¥¯¥í¡¼¥º (close) ¤µ¤ì¤ë¤Þ¤ÇÊÝ»ý¤µ¤ì¤ë¡£
81 .\"O When \fImode\fP is nonzero, the
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 ¤¬¥¼¥í¤Ç¤Ê¤¤¾ì¹ç¤Ë¤Ï
91 ´Ø¿ô¤ÏºÇ½é¤Ë \fIstream\fP
92 ¤ÎÆþ½ÐÎÏñ°Ì¤òÀßÄꤷ¤è¤¦¤È¤¹¤ë
93 (\fImode\fP ¤¬ 0 ¤è¤êÂ礤¤¾ì¹ç¤Ë¤Ï¥ï¥¤¥Éʸ»úñ°Ì¤Ë¡¢
94 \fImode\fP ¤¬ 0 ¤è¤ê¾®¤µ¤¤¾ì¹ç¤Ë¤Ï¥Ð¥¤¥Èñ°Ì¤ËÀßÄꤷ¤è¤¦¤È¤¹¤ë)¡£
95 ¤½¤·¤Æ¾åµ¤ÈƱÍͤ˸½ºß¤ÎÆþ½ÐÎÏñ°Ì¤òÊÖ¤¹¡£
97 .\"O .SH "RETURN VALUE"
101 .\"O function returns the stream's orientation, after possibly
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.
107 ´Ø¿ô¤Ï¥¹¥È¥ê¡¼¥à¤ÎÆþ½ÐÎÏñ°Ì¤ÎÀßÄê¤ò»î¤ß¤¿¸å¤Ë¤½¤ÎÃͤòÊÖ¤¹¡£
108 Àµ¤ÎÊÖ¤êÃͤϥ磻¥Éʸ»úñ°Ì¤ò¡¢Éé¤ÎÊÖ¤êÃͤϥХ¤¥Èñ°Ì¤ò°ÕÌ£¤¹¤ë¡£
109 ÊÖ¤êÃͤ¬ 0 ¤Ê¤é¤Ð̤·èÄê¤ò°ÕÌ£¤¹¤ë¡£
110 .\"O .SH "CONFORMING TO"
115 .\"O Wide-character output to a byte oriented stream can be performed through the
117 .\"O function with the
122 ¥Ð¥¤¥Èñ°Ì¤Î¥¹¥È¥ê¡¼¥à¤Ë¥ï¥¤¥Éʸ»ú¤ò½ÐÎϤˤ¹¤ë¤Ë¤Ï
128 ÊÑ´¹¤ò»ÈÍѤ¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£
130 .\"O Char oriented output to a wide-character oriented stream can be performed
132 .\"O .BR fwprintf (3)
133 .\"O function with the
138 ¥ï¥¤¥Éʸ»úñ°Ì¤Î¥¹¥È¥ê¡¼¥à¤Ë¥Ð¥¤¥Èñ°Ì¤Î½ÐÎϤò¹Ô¤¦¤Ë¤Ï
144 ÊÑ´¹¤ò»ÈÍѤ¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£