OSDN Git Service

Retire LDP man-pages repository
[linuxjm/LDP_man-pages.git] / release / man3 / setbuf.3
diff --git a/release/man3/setbuf.3 b/release/man3/setbuf.3
deleted file mode 100644 (file)
index e27bb5a..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-.\" Copyright (c) 1980, 1991 Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" %%%LICENSE_START(BSD_4_CLAUSE_UCB)
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\"    notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\"    notice, this list of conditions and the following disclaimer in the
-.\"    documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"    This product includes software developed by the University of
-.\"    California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\"    may be used to endorse or promote products derived from this software
-.\"    without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\" %%%LICENSE_END
-.\"
-.\"     @(#)setbuf.3   6.10 (Berkeley) 6/29/91
-.\"
-.\" Converted for Linux, Mon Nov 29 14:55:24 1993, faith@cs.unc.edu
-.\" Added section to BUGS, Sun Mar 12 22:28:33 MET 1995,
-.\"                   Thomas.Koenig@ciw.uni-karlsruhe.de
-.\" Correction,  Sun, 11 Apr 1999 15:55:18,
-.\"     Martin Vicente <martin@netadmin.dgac.fr>
-.\" Correction,  2000-03-03, Andreas Jaeger <aj@suse.de>
-.\" Added return value for setvbuf, aeb,
-.\"
-.\"*******************************************************************
-.\"
-.\" This file was generated with po4a. Translate the source file.
-.\"
-.\"*******************************************************************
-.\"
-.\" Japanese Version Copyright (c) 1999 ishikawa, keisuke
-.\"         all rights reserved.
-.\" Translated Thu Jan  7 00:03:12 JST 1999
-.\"         by ishikawa, keisuke <ishikawa@sgk.gr.jp>
-.\" Updated Sat May 19 JST 2001 by Kentaro Shirakata <argrath@ub32.org>
-.\" Updated & Modified Sun Jul  1 15:48:32 JST 2001
-.\"         by Yuichi SATO <ysato@h4.dion.ne.jp>
-.\"
-.TH SETBUF 3 2014\-08\-19 Linux "Linux Programmer's Manual"
-.SH 名前
-setbuf, setbuffer, setlinebuf, setvbuf \- ストリームのバッファーリングの操作
-.SH 書式
-.nf
-\fB#include <stdio.h>\fP
-
-\fBvoid setbuf(FILE *\fP\fIstream\fP\fB, char *\fP\fIbuf\fP\fB);\fP
-
-\fBvoid setbuffer(FILE *\fP\fIstream\fP\fB, char *\fP\fIbuf\fP\fB, size_t \fP\fIsize\fP\fB);\fP
-
-\fBvoid setlinebuf(FILE *\fP\fIstream\fP\fB);\fP
-
-\fBint setvbuf(FILE *\fP\fIstream\fP\fB, char *\fP\fIbuf\fP\fB, int \fP\fImode\fP\fB, size_t \fP\fIsize\fP\fB);\fP
-.fi
-.sp
-.in -4n
-glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
-.in
-.sp
-\fBsetbuffer\fP(), \fBsetlinebuf\fP(): _BSD_SOURCE
-.SH 説明
-バッファーリングには unbuffered, block buffered, line buffered の3つのタイプが
-ある。出力ストリームのタイプが unbuffered の場合、データを書き込むとすぐに出 力先ファイルに書き込まれるかターミナルに表示される。block
-buffered の場合、文 字の読み書きはブロック単位でいっぺんに行われる。line buffered の場合、
-新しい行が出力されるか、ターミナルデバイスに接続しているストリーム (通常、\fIstdin\fP) から新しい行が入力されるまで文字がたくわえられる。
-ブロックを強制的に出力するには \fBfflush\fP(3)  関数を使う。 (\fBfclose\fP(3)  を参照のこと) 通常、ファイルはすべて
-block buffered である。ファイルに対して 初めて入出力処理を行うと \fBmalloc\fP(3)  が呼び出されバッファーが獲得される。もし
-ストリームが (通常、 \fIstdout\fP がそうであるように) ターミナルを参照する場合には、ファイルは line buffered と
-なる。標準エラー出力 \fIstderr\fP はデフォルトでは常に unbuffered である。
-.PP
-\fBsetvbuf\fP()  関数は、オープンしている任意のストリームに対してバッファーを変更できる。 引き数 \fImode\fP は、次の 3
-つのマクロのうちいずれかである:
-.RS
-.TP 
-\fB_IONBF\fP
-unbuffered
-.TP 
-\fB_IOLBF\fP
-line buffered
-.TP 
-\fB_IOFBF\fP
-fully buffered
-.RE
-.PP
-unbuffered のファイルを除き、 \fIbuf\fP 引数は \fIsize\fP
-バイト以上の大きさのバッファーを指していなければならない。このバッファーは現在の バッファーの代わりに用いられる。もし、引数 \fIbuf\fP が NULL
-ならば、モードだけが変更される。 新しいバッファーは次に読み書きした際に割り当てられる。 \fBsetvbuf\fP()
-関数は、ストリームをオープンした後、 そのストリームに対して何らかの操作をする前にのみ使用できる。
-.PP
-他の 3 つの関数は \fBsetvbuf\fP()  の呼び出しに単純に置き換えることができる。 \fBsetbuf\fP()  関数は、
-.PP
-.in +4n
-setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ);
-.in
-.PP
-と全く同等だし、 \fBsetbuffer\fP()  関数は、バッファーサイズがデフォルト値 \fBBUFSIZ\fP
-ではなく引数で与えられる点以外は同じである。 \fBsetlinebuf\fP()  関数は以下と同じである。
-.PP
-.in +4n
-setvbuf(stream, NULL, _IOLBF, 0);
-.in
-.SH 返り値
-\fBsetvbuf\fP()  関数は、成功した場合 0 を返す。 失敗した場合、0 以外の値を返す (失敗とは、 \fImode\fP
-が不正な場合またはリクエストが条件を満たさない場合である)。 \fBsetvbuf\fP()  関数が失敗した場合は \fIerrno\fP を設定することもある。
-
-その他の関数は値を返さない。
-.SH 属性
-.SS "マルチスレッディング (pthreads(7) 参照)"
-関数 \fBsetbuf\fP(), \fBsetbuffer\fP(), \fBsetlinebuf\fP(), \fBsetvbuf\fP() はスレッドセーフである。
-.SH 準拠
-\fBsetbuf\fP()  関数および \fBsetvbuf\fP()  関数は C89 と C99 に準拠している。
-.SH バグ
-.\" The
-.\" .BR setbuffer ()
-.\" and
-.\" .BR setlinebuf ()
-.\" functions are not portable to versions of BSD before 4.2BSD, and
-.\" are available under Linux since libc 4.5.21.
-.\" On 4.2BSD and 4.3BSD systems,
-.\" .BR setbuf ()
-.\" always uses a suboptimal buffer size and should be avoided.
-.P
-\fIstream\fP を閉じる時 (プログラムを終了する際にもこれは起きる) には、 \fIbuf\fP
-が指し示す空間とが存在していることを保証しなければならない。 例えば、次のような使い方は許されない:
-.nf
-.sp
-#include <stdio.h>
-
-int
-main(void)
-{
-    char buf[BUFSIZ];
-    setbuf(stdin, buf);
-    printf("Hello, world!\en");
-    return 0;
-}
-.fi
-.SH 関連項目
-\fBfclose\fP(3), \fBfflush\fP(3), \fBfopen\fP(3), \fBfread\fP(3), \fBmalloc\fP(3),
-\fBprintf\fP(3), \fBputs\fP(3)
-.SH この文書について
-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部
-である。プロジェクトの説明とバグ報告に関する情報は
-http://www.kernel.org/doc/man\-pages/ に書かれている。