.\" Copyright (c) Bruno Haible .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as .\" published by the Free Software Foundation; either version 2 of .\" the License, or (at your option) any later version. .\" .\" References consulted: .\" GNU glibc-2 source code and manual .\" Dinkumware C library reference http://www.dinkumware.com/ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" .\" Japanese Version Copyright (c) 1999 HANATAKA Shinya .\" all rights reserved. .\" Translated Tue Jan 11 00:56:36 JST 2000 .\" by HANATAKA Shinya .\" .TH FWIDE 3 2010-09-20 "GNU" "Linux Programmer's Manual" .\"O .SH NAME .SH 名前 .\"O fwide \- set and determine the orientation of a FILE stream fwide \- FILE ストリームの入出力単位を設定または取得する .\"O .SH SYNOPSIS .SH 書式 .nf .B #include .sp .BI "int fwide(FILE *" stream ", int " mode ); .fi .sp .in -4n .\"O Feature Test Macro Requirements for glibc (see .\"O .BR feature_test_macros (7)): .in .ad l .sp .BR fwide (): .RS 4 _XOPEN_SOURCE\ >=\ 500 || _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L; .br or .I cc\ -std=c99 .RE .ad .\"O .SH DESCRIPTION .SH 説明 .\"O When \fImode\fP is zero, the .\"O .BR fwide () .\"O function determines the current .\"O orientation of \fIstream\fP. .\"O It returns a positive value if \fIstream\fP is .\"O wide-character oriented, that is, if wide-character I/O is permitted but char .\"O I/O is disallowed. .\"O It returns a negative value if \fIstream\fP is byte oriented, .\"O i.e., if char I/O is permitted but wide-character I/O is disallowed. .\"O It .\"O returns zero if \fIstream\fP has no orientation yet; in this case the next .\"O I/O operation might change the orientation (to byte oriented if it is a char \fImode\fP がゼロならば .BR fwide () 関数は \fIstream\fP の現在の .\"O I/O operation, or to wide-character oriented if it is a wide-character I/O .\"O operation). 入出力単位を決定して返す。\fIstream\fP がワイド文字単位のとき、 すなわちワイド文字 I/O は許されてバイト (char) I/O は許されていない ときには、正の値を返す。 \fIstream\fP がバイト単位のとき、すなわちバイト I/O は許されて ワイド文字 I/O は許されていないときには、負の値を返す。 \fIstream\fP の入出力単位がまだ決定されていない場合にはゼロが返される。 この場合には次の I/O 操作によって入出力単位が変更される (バイト I/O 操作の場合にはバイト単位に、ワイド文字 I/O 操作の場合には ワイド文字単位になる)。 .PP .\"O Once a stream has an orientation, it cannot be changed and persists until .\"O the stream is closed. 一度ストリームの入出力単位が決まると、変更することはできず、 ストリームがクローズ (close) されるまで保持される。 .PP .\"O When \fImode\fP is nonzero, the .\"O .BR fwide () .\"O function first attempts to set .\"O \fIstream\fP's orientation (to wide-character oriented .\"O if \fImode\fP is greater than 0, or .\"O to byte oriented if \fImode\fP is less than 0). .\"O It then returns a value denoting the .\"O current orientation, as above. \fImode\fP がゼロでない場合には .BR fwide () 関数は最初に \fIstream\fP の入出力単位を設定しようとする (\fImode\fP が 0 より大きい場合にはワイド文字単位に、 \fImode\fP が 0 より小さい場合にはバイト単位に設定しようとする)。 そして上記と同様に現在の入出力単位を返す。 .\"O .SH "RETURN VALUE" .SH 返り値 .\"O The .\"O .BR fwide () .\"O function returns the stream's orientation, after possibly .\"O changing it. .\"O A positive return value means wide-character oriented. .\"O A negative return value means byte oriented. .\"O A return value of zero means undecided. .BR fwide () 関数はストリームの入出力単位の設定を試みた後にその値を返す。 正の返り値はワイド文字単位を、負の返り値はバイト単位を意味する。 返り値が 0 ならば未決定を意味する。 .\"O .SH "CONFORMING TO" .SH 準拠 C99, POSIX.1-2001. .\"O .SH NOTES .SH 注意 .\"O Wide-character output to a byte oriented stream can be performed through the .\"O .BR fprintf (3) .\"O function with the .\"O .B %lc .\"O and .\"O .B %ls .\"O directives. バイト単位のストリームにワイド文字を出力にするには .BR fprintf (3) 関数の .B %lc 変換や .B %ls 変換を使用することができる。 .PP .\"O Char oriented output to a wide-character oriented stream can be performed .\"O through the .\"O .BR fwprintf (3) .\"O function with the .\"O .B %c .\"O and .\"O .B %s .\"O directives. ワイド文字単位のストリームにバイト単位の出力を行うには .BR fwprintf (3) 関数の .B %c 変換や .B %s 変換を使用することができる。 .\"O .SH "SEE ALSO" .SH 関連項目 .BR fprintf (3), .BR fwprintf (3)