OSDN Git Service

(split) LDP: draft snapshot generated from latest ja.po files.
[linuxjm/LDP_man-pages.git] / draft / man3 / getline.3
index d8d120a..df1024e 100644 (file)
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
 .\" License.
+.\"*******************************************************************
 .\"
-.\" Japanese Version Copyright (c) 2001 Yuichi SATO
-.\"         all rights reserved.
-.\" Translated 2001-11-09, Yuichi SATO <ysato@h4.dion.ne.jp>
-.\" Updated 2006-07-20, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.34
-.\" Updated 2010-04-18, Akihiro MOTOKI, LDP v3.24
+.\" This file was generated with po4a. Translate the source file.
 .\"
-.\"WORD:    delimiter    区切り文字
-.\"
-.TH GETLINE 3  2010-06-12 "GNU" "Linux Programmer's Manual"
-.\"O .SH NAME
+.\"*******************************************************************
+.TH GETLINE 3 2010\-06\-12 GNU "Linux Programmer's Manual"
 .SH 名前
-.\"O getline, getdelim \- delimited string input
 getline, getdelim \- 区切り文字までの文字列入力を読み込む
-.\"O .SH SYNOPSIS
 .SH 書式
 .nf
-.B #include <stdio.h>
+\fB#include <stdio.h>\fP
 .sp
-.BI "ssize_t getline(char **" lineptr ", size_t *" n ", FILE *" stream );
+\fBssize_t getline(char **\fP\fIlineptr\fP\fB, size_t *\fP\fIn\fP\fB, FILE *\fP\fIstream\fP\fB);\fP
 
-.BI "ssize_t getdelim(char **" lineptr ", size_t *" n ", int " delim \
-", FILE *" stream );
+\fBssize_t getdelim(char **\fP\fIlineptr\fP\fB, size_t *\fP\fIn\fP\fB, int \fP\fIdelim\fP\fB, FILE *\fP\fIstream\fP\fB);\fP
 .fi
 .sp
 .in -4n
-.\"O Feature Test Macro Requirements for glibc (see
-.\"O .BR feature_test_macros (7)):
-glibc 向けの機能検査マクロの要件
-.RB ( feature_test_macros (7)
-参照):
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
 .in
 .sp
 .ad l
-.BR getline (),
-.BR getdelim ():
+\fBgetline\fP(), \fBgetdelim\fP():
 .PD 0
 .RS 4
-.TP 4
-.\"O Since glibc 2.10:
+.TP  4
 glibc 2.10 以降:
 _POSIX_C_SOURCE\ >=\ 200809L || _XOPEN_SOURCE\ >=\ 700
-.TP
-.\"O Before glibc 2.10:
+.TP 
 glibc 2.10 より前:
 _GNU_SOURCE
 .RE
 .PD
 .ad
-.\"O .SH DESCRIPTION
 .SH 説明
-.\"O .BR getline ()
-.\"O reads an entire line from \fIstream\fP,
-.\"O storing the address of the buffer containing the text into
-.\"O .IR "*lineptr" .
-.BR getline ()
-は \fIstream\fP から 1 行全てを読み込み、テキストが含まれているバッファのアドレスを
-.I "*lineptr"
-に格納する。
-.\"O The buffer is null-terminated and includes the newline character, if
-.\"O one was found.
-バッファはヌル文字 (\e0) で終端される。
-改行文字が見つかった場合は、改行文字もバッファに格納される。
+\fBgetline\fP()  は \fIstream\fP から 1 行全てを読み込み、テキストが含まれているバッファのアドレスを \fI*lineptr\fP
+に格納する。 バッファはヌル文字 (\e0) で終端される。 改行文字が見つかった場合は、改行文字もバッファに格納される。
 
-.\"O If
-.\"O .I "*lineptr"
-.\"O is NULL, then
-.\"O .BR getline ()
-.\"O will allocate a buffer for storing the line,
-.\"O which should be freed by the user program.
-.\"O (In this case, the value in
-.\"O .I *n
-.\"O is ignored.)
-.I "*lineptr"
-が NULL の場合、
-.BR getline ()
-は行の内容を格納するためのバッファを確保する。
-このバッファはユーザーのプログラムで解放すべきである
-(この場合、
-.I *n
-の値は無視される)。
+\fI*lineptr\fP が NULL の場合、 \fBgetline\fP()  は行の内容を格納するためのバッファを確保する。
+このバッファはユーザーのプログラムで解放すべきである (この場合、 \fI*n\fP の値は無視される)。
 
-.\"O Alternatively, before calling
-.\"O .BR getline (),
-.\"O .I "*lineptr"
-.\"O can contain a pointer to a
-.\"O .BR malloc (3)\-allocated
-.\"O buffer
-.\"O .I "*n"
-.\"O bytes in size.
-別の方法として、
-.BR getline ()
-を呼び出す際に、
-.I "*lineptr"
-に
-.BR malloc (3)
-で確保した大きさ
-.I "*n"
-バイトのバッファへのポインタを入れて渡すこともできる。
-.\"O If the buffer is not large enough to hold the line,
-.\"O .BR getline ()
-.\"O resizes it with
-.\"O .BR "realloc(3)" ,
-.\"O updating
-.\"O .I "*lineptr"
-.\"O and
-.\"O .I "*n"
-.\"O as necessary.
-読み込んだ行を保持するのに十分なバッファがない場合、
-.BR getline ()
-は
-.BR realloc (3)
-を使ってバッファのサイズを変更し、必要に応じて
-.I "*lineptr"
-と
-.I "*n"
-を更新する。
+別の方法として、 \fBgetline\fP()  を呼び出す際に、 \fI*lineptr\fP に \fBmalloc\fP(3)  で確保した大きさ \fI*n\fP
+バイトのバッファへのポインタを入れて渡すこともできる。 読み込んだ行を保持するのに十分なバッファがない場合、 \fBgetline\fP()  は
+\fBrealloc\fP(3)  を使ってバッファのサイズを変更し、必要に応じて \fI*lineptr\fP と \fI*n\fP を更新する。
 
-.\"O In either case, on a successful call,
-.\"O .I "*lineptr"
-.\"O and
-.\"O .I "*n"
-.\"O will be updated to reflect the buffer address and allocated size respectively.
-どちらの場合でも、呼び出しに成功したときには、
-.I "*lineptr"
-と
-.I "*n"
-がバッファのアドレスと割り当てたサイズを反映した値に更新される。
+どちらの場合でも、呼び出しに成功したときには、 \fI*lineptr\fP と \fI*n\fP がバッファのアドレスと割り当てたサイズを反映した値に更新される。
 
-.\"O .BR getdelim ()
-.\"O works like
-.\"O .BR getline (),
-.\"O except that a line delimiter other than newline can be specified as the
-.\"O .I delimiter
-.\"O argument.
-.BR getdelim ()
-は
-.BR getline ()
-と同じように動作するが、改行文字以外の区切り文字を引き数
-.I delim
-に指定することができる。
-.\"O As with
-.\"O .BR getline (),
-.\"O a delimiter character is not added if one was not present
-.\"O in the input before end of file was reached.
-.BR getline ()
-と同様に、ファイル終端に達するまでに入力行に区切り文字が見付からない場合は、
+\fBgetdelim\fP()  は \fBgetline\fP()  と同じように動作するが、改行文字以外の区切り文字を引き数 \fIdelim\fP
+に指定することができる。 \fBgetline\fP()  と同様に、ファイル終端に達するまでに入力行に区切り文字が見付からない場合は、
 区切り文字をバッファに追加しない。
-.\"O .SH "RETURN VALUE"
 .SH 返り値
-.\"O On success,
-.\"O .BR getline ()
-.\"O and
-.\"O .BR getdelim ()
-.\"O return the number of characters read, including the delimiter character,
-.\"O but not including the terminating null byte.
-.\"O This value can be used
-.\"O to handle embedded null bytes in the line read.
-成功した場合、
-.BR getline ()
-と
-.BR getdelim ()
-は読み込んだ文字数を返す。
-文字数には区切り文字は含まれるが、終端に使う NULL バイトは含まれない。
-この値によって、読み込んだ行に含まれる NULL バイトを操作することができる。
+成功した場合、 \fBgetline\fP()  と \fBgetdelim\fP()  は読み込んだ文字数を返す。 文字数には区切り文字は含まれるが、終端に使う
+NULL バイトは含まれない。 この値によって、読み込んだ行に含まれる NULL バイトを操作することができる。
 
-.\"O Both functions return \-1 on failure to read a line (including end-of-file
-.\"O condition).
-どちらの関数も、行の読み込みに失敗した場合には \-1 を返す
-(ファイルの終端に達した場合にも \-1 を返す)。
-.\"O .SH ERRORS
+どちらの関数も、行の読み込みに失敗した場合には \-1 を返す (ファイルの終端に達した場合にも \-1 を返す)。
 .SH エラー
-.TP
-.B EINVAL
-.\"O Bad arguments
-.\"O .RI ( n
-.\"O or
-.\"O .I lineptr
-.\"O is NULL, or
-.\"O .I stream
-.\"O is not valid).
-引き数が不正である
-.RI ( n
-または
-.I lineptr
-が NULL である。
-もしくは
-.I stream
-が有効でない)。
-.\"O .SH VERSIONS
+.TP 
+\fBEINVAL\fP
+引き数が不正である (\fIn\fP または \fIlineptr\fP が NULL である。 もしくは \fIstream\fP が有効でない)。
 .SH バージョン
-.\"O These functions are available since libc 4.6.27.
 これらの関数は libc 4.6.27 以降で利用可能である。
-.\"O .SH "CONFORMING TO"
 .SH 準拠
-.\"O Both
-.\"O .BR getline ()
-.\"O and
-.\"O .BR getdelim ()
-.\"O were originally GNU extensions.
-.\"O They were standardized in POSIX.1-2008.
-.BR getline ()
-と
-.BR getdelim ()
-は、どちらも元は GNU による拡張であったが、
-POSIX.1-2008 で標準化された。
-.\"O .SH "EXAMPLE"
+\fBgetline\fP()  と \fBgetdelim\fP()  は、どちらも元は GNU による拡張であったが、 POSIX.1\-2008
+で標準化された。
 .SH 例
 .nf
 #define _GNU_SOURCE
@@ -255,11 +112,5 @@ main(void)
     exit(EXIT_SUCCESS);
 }
 .fi
-.\"O .SH "SEE ALSO"
 .SH 関連項目
-.BR read (2),
-.BR fgets (3),
-.BR fopen (3),
-.BR fread (3),
-.BR gets (3),
-.BR scanf (3)
+\fBread\fP(2), \fBfgets\fP(3), \fBfopen\fP(3), \fBfread\fP(3), \fBgets\fP(3), \fBscanf\fP(3)