OSDN Git Service

Update release for LDP 3.67
[linuxjm/LDP_man-pages.git] / release / man3 / stdio_ext.3
index 3bb5631..d1e24ea 100644 (file)
@@ -1,5 +1,6 @@
 .\" Copyright (C) 2001 Andries Brouwer <aeb@cwi.nl>.
 .\"
+.\" %%%LICENSE_START(VERBATIM)
 .\" Permission is granted to make and distribute verbatim copies of this
 .\" manual provided the copyright notice and this permission notice are
 .\" preserved on all copies.
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
 .\"
 .\" Japanese Version Copyright (c) 2002 Akihiro MOTOKI all rights reserved.
 .\" Translated Nov 2 2002 by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
-.TH STDIO_EXT 3 2001-12-16 "" "Linux Programmer's Manual"
+.\"O .SH NAME
+.\"O __fbufsize, __flbf, __fpending, __fpurge, __freadable,
+.\"O __freading, __fsetlocking, __fwritable, __fwriting, _flushlbf \-
+.\"O interfaces to stdio FILE structure
+.\"O .SH SYNOPSIS
+.\"O .SH DESCRIPTION
+.\"O Solaris introduced routines to allow portable access to the
+.\"O internals of the
+.\"O .I FILE
+.\"O structure, and glibc also implemented these.
+.\"O The
+.\"O .BR __fbufsize ()
+.\"O function returns the size of the buffer currently used
+.\"O by the given stream.
+.\"O The
+.\"O .BR __fpending ()
+.\"O function returns the number of bytes in the output buffer.
+.\"O For wide-oriented streams the unit is wide characters.
+.\"O This function is undefined on buffers in reading mode,
+.\"O or opened read-only.
+.\"O The
+.\"O .BR __flbf ()
+.\"O function returns a nonzero value if the stream is line-buffered,
+.\"O and zero otherwise.
+.\"O The
+.\"O .BR __freadable ()
+.\"O function returns a nonzero value if the stream allows reading,
+.\"O and zero otherwise.
+.\"O The
+.\"O .BR __fwritable ()
+.\"O function returns a nonzero value if the stream allows writing,
+.\"O and zero otherwise.
+.\"O The
+.\"O .BR __freading ()
+.\"O function returns a nonzero value if the stream is read-only, or
+.\"O if the last operation on the stream was a read operation,
+.\"O and zero otherwise.
+.\"O The
+.\"O .BR __fwriting ()
+.\"O function returns a nonzero value if the stream is write-only (or
+.\"O append-only), or if the last operation on the stream was a write
+.\"O operation, and zero otherwise.
+.\"O The
+.\"O .BR __fsetlocking ()
+.\"O function can be used to select the desired type of locking on the stream.
+.\"O It returns the current type.
+.\"O The
+.\"O .I type
+.\"O argument can take the following three values:
+.\"O Perform implicit locking around every operation on the given stream
+.\"O (except for the *_unlocked ones).
+.\"O This is the default.
+.\"O The caller will take care of the locking (possibly using
+.\"O .BR flockfile (3)
+.\"O in case there is more than one thread), and the stdio routines
+.\"O will not do locking until the state is reset to
+.\"O .BR FSETLOCKING_INTERNAL .
+.\"O Don't change the type of locking.
+.\"O (Only return it.)
+.\"O The
+.\"O .BR _flushlbf ()
+.\"O function flushes all line-buffered streams.
+.\"O (Presumably so that
+.\"O output to a terminal is forced out, say before reading keyboard input.)
+.\"O The
+.\"O .BR __fpurge ()
+.\"O function discards the contents of the stream's buffer.
+.\"O .SH "SEE ALSO"
+.\"
+.TH STDIO_EXT 3 2013\-06\-21 "" "Linux Programmer's Manual"
 .SH 名前
-__fbufsize, __flbf, __fpending, __fpurge, __freadable,
-__freading, __fsetlocking, __fwritable, __fwriting, _flushlbf \-
-標準入出力ファイル構造体へのインタフェース
+__fbufsize, __flbf, __fpending, __fpurge, __freadable, __freading,
+__fsetlocking, __fwritable, __fwriting, _flushlbf \- 標準入出力ファイル構造体へのインタフェース
 .SH 書式
-.B #include <stdio.h>
+\fB#include <stdio.h>\fP
 .br
-.B #include <stdio_ext.h>
+\fB#include <stdio_ext.h>\fP
 .sp
-.BI "size_t __fbufsize(FILE *" stream );
+\fBsize_t __fbufsize(FILE *\fP\fIstream\fP\fB);\fP
 .br
-.BI "size_t __fpending(FILE *" stream );
+\fBsize_t __fpending(FILE *\fP\fIstream\fP\fB);\fP
 .br
-.BI "int __flbf(FILE *" stream );
+\fBint __flbf(FILE *\fP\fIstream\fP\fB);\fP
 .br
-.BI "int __freadable(FILE *" stream );
+\fBint __freadable(FILE *\fP\fIstream\fP\fB);\fP
 .br
-.BI "int __fwritable(FILE *" stream );
+\fBint __fwritable(FILE *\fP\fIstream\fP\fB);\fP
 .br
-.BI "int __freading(FILE *" stream );
+\fBint __freading(FILE *\fP\fIstream\fP\fB);\fP
 .br
-.BI "int __fwriting(FILE *" stream );
+\fBint __fwriting(FILE *\fP\fIstream\fP\fB);\fP
 .br
-.BI "int __fsetlocking(FILE *" stream ", int " type );
+\fBint __fsetlocking(FILE *\fP\fIstream\fP\fB, int \fP\fItype\fP\fB);\fP
 .br
-.B "void _flushlbf(void);"
+\fBvoid _flushlbf(void);\fP
 .br
-.BI "void __fpurge(FILE *" stream );
+\fBvoid __fpurge(FILE *\fP\fIstream\fP\fB);\fP
 .SH 説明
-Solaris では、
-.I FILE
-構造体の内部へポータブルなかたちで
-アクセスできる手段が導入されており、これらは glibc でも実装されている。
+Solaris では、 \fIFILE\fP 構造体の内部へポータブルなかたちで アクセスできる手段が導入されており、これらは glibc
+でも実装されている。
 .LP
-.BR __fbufsize ()
-関数は、指定されたストリームが使用しているバッファ・サイズを返す。
+\fB__fbufsize\fP()  関数は、指定されたストリームが使用しているバッファサイズを返す。
 .LP
-.BR __fpending ()
-関数は、出力バッファに入っているデータのバイト数を返す。
-ワイドキャラクタを扱うストリームの場合、ワイドキャラクタ単位で計算される。
-バッファが読み出しモードの場合や読み出し専用で開かれている場合の
+\fB__fpending\fP()  関数は、出力バッファに入っているデータのバイト数を返す。
+ワイドキャラクタを扱うストリームの場合、ワイドキャラクタ単位で計算される。 バッファが読み出しモードの場合や読み出し専用で開かれている場合の
 この関数の振舞いは未定義である。
 .LP
-.BR __flbf ()
-関数は、ストリームがラインバッファの場合は 0 以外を、
-それ以外の場合は 0 を返す。
+\fB__flbf\fP()  関数は、ストリームがラインバッファの場合は 0 以外を、 それ以外の場合は 0 を返す。
 .LP
-.BR __freadable ()
-関数は、ストリームが読み出し可能な場合は 0 以外を、
-それ以外の場合は 0 を返す。
+\fB__freadable\fP()  関数は、ストリームが読み出し可能な場合は 0 以外を、 それ以外の場合は 0 を返す。
 .LP
-.BR __fwritable ()
-関数は、ストリームが書き込み可能な場合は 0 以外を、
-それ以外の場合は 0 を返す。
+\fB__fwritable\fP()  関数は、ストリームが書き込み可能な場合は 0 以外を、 それ以外の場合は 0 を返す。
 .LP
-.BR __freading ()
-関数は、ストリームが読み出し専用の場合、またはストリームに対する直前の操作が
-読み出し操作であった場合は 0 以外を返し、それ以外の場合は 0 を返す。
+\fB__freading\fP()  関数は、ストリームが読み出し専用の場合、またはストリームに対する直前の操作が 読み出し操作であった場合は 0
+以外を返し、それ以外の場合は 0 を返す。
 .LP
-.BR __fwriting ()
-関数は、ストリームが書き込み専用(もしくは追加専用)の場合、
-またはストリームに対する直前の操作が書き込み操作であった場合は 0 以外を返し、
-それ以外の場合は 0 を返す。
+\fB__fwriting\fP()  関数は、ストリームが書き込み専用(もしくは追加専用)の場合、
+またはストリームに対する直前の操作が書き込み操作であった場合は 0 以外を返し、 それ以外の場合は 0 を返す。
 .LP
-.BR __fsetlocking ()
-関数は、ストリームのロック形式を選択するために使用できる。
-返り値は、現在のロック形式である。
-.I type
+\fB__fsetlocking\fP()  関数は、ストリームのロック形式を選択するために使用できる。 返り値は、現在のロック形式である。 \fItype\fP
 引き数は以下の 3 種類の値をとることができる :
-.TP
-.B FSETLOCKING_INTERNAL
-指定されたストリームに対して操作が行われる度に、操作の前後で
-明示的に指示しなくてもストリームのロック処理を行う
-(但し、*_unlocked 関数を使用した場合は例外である)。
-これがデフォルトのロック形式である。
-.TP
-.B FSETLOCKING_BYCALLER
-関数の呼び出し元でロックの面倒をみる。
-(おそらく、複数のスレッドが存在する状況では
-.BR flockfile (3)
-を使うことになるだろう)
-ロック形式が
-.B FSETLOCKING_INTERNAL
-にリセットされるまでは標準入出力関連の関数はロック処理を行わない。
-.TP
-.B FSETLOCKING_QUERY
+.TP 
+\fBFSETLOCKING_INTERNAL\fP
+指定されたストリームに対して操作が行われる度に、操作の前後で 明示的に指示しなくてもストリームのロック処理を行う (但し、*_unlocked
+関数を使用した場合は例外である)。 これがデフォルトのロック形式である。
+.TP 
+\fBFSETLOCKING_BYCALLER\fP
+関数の呼び出し元でロックの面倒をみる。 (おそらく、複数のスレッドが存在する状況では \fBflockfile\fP(3)  を使うことになるだろう)
+ロック形式が \fBFSETLOCKING_INTERNAL\fP にリセットされるまでは標準入出力関連の関数はロック処理を行わない。
+.TP 
+\fBFSETLOCKING_QUERY\fP
 ロック形式の変更を行わない。(現在の形式を返すだけである)
 .LP
-.BR _flushlbf ()
-関数は、すべてのラインバッファ (line-buffered) タイプのストリームの
-内容を出力(フラッシュ)する。
-(当然ながら、端末への出力が強制的に行われることになるので、
-キーボードからの入力を読みこむ前にこの関数を呼んだ方がいいだろう)
+\fB_flushlbf\fP()  関数は、すべてのラインバッファ (line\-buffered) タイプのストリームの 内容を出力(フラッシュ)する。
+(当然ながら、端末への出力が強制的に行われることになるので、 キーボードからの入力を読みこむ前にこの関数を呼んだ方がいいだろう)
+.LP
+\fB__fpurge\fP()  関数は、ストリームのバッファの内容を廃棄する。
+.SH 属性
+.SS "マルチスレッディング (pthreads(7) 参照)"
+関数 \fB__fbufsize\fP(), \fB__fpending\fP(), \fB__fpurge\fP(), \fB__fsetlocking\fP() は、
+ストリームのロックを行わない。 そのため、スレッドセーフではない。
 .LP
-.BR __fpurge ()
-関数は、ストリームのバッファの内容を廃棄する。
+関数 \fB__flbf\fP(), \fB__freadable\fP(), \fB__freading\fP(), \fB__fwritable\fP(),
+\fB__fwriting\fP(), \fB_flushlbf\fP() はスレッドセーフである。
 .SH 関連項目
-.BR flockfile (3),
-.BR fpurge (3)
+\fBflockfile\fP(3), \fBfpurge\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.67 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。