.\" Modified 2001-12-13, Martin Schulze <joey@infodrom.org>
.\" Added ttyname_r, aeb, 2002-07-20
.\"
-.\" Japanese Version Copyright (c) 1997 Hiroaki Nagoya
-.\" all rights reserved.
-.\" Translated Mon Feb 10 1997 by Hiroaki Nagoya <nagoya@is.titech.ac.jp>
-.\" Updated Fri Dec 21 JST 2001 by Kentaro Shirakata <argrath@ub32.org>
-.\" Updated Fri Oct 16 JST 2002 by Kentaro Shirakata <argrath@ub32.org>
+.\"*******************************************************************
.\"
-.TH TTYNAME 3 2008-07-14 "Linux" "Linux Programmer's Manual"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH TTYNAME 3 2008\-07\-14 Linux "Linux Programmer's Manual"
.SH 名前
-.\"O ttyname, ttyname_r \- return name of a terminal
ttyname, ttyname_r \- 端末名を返す
.SH 書式
.nf
-.B #include <unistd.h>
+\fB#include <unistd.h>\fP
.sp
-.BI "char *ttyname(int " fd );
+\fBchar *ttyname(int \fP\fIfd\fP\fB);\fP
-.BI "int ttyname_r(int " fd ", char *" buf ", size_t " buflen );
+\fBint ttyname_r(int \fP\fIfd\fP\fB, char *\fP\fIbuf\fP\fB, size_t \fP\fIbuflen\fP\fB);\fP
.fi
.SH 説明
-.\"O The function
-.\"O .BR ttyname ()
-.\"O returns a pointer to the null-terminated pathname of the terminal device
-.\"O that is open on the file descriptor \fIfd\fP, or NULL on error
-.\"O (for example, if \fIfd\fP is not connected to a terminal).
-.\"O The return value may point to static data, possibly overwritten by the
-.\"O next call.
-.BR ttyname ()
-関数は、ファイルディスクリプタ \fIfd\fP がオープンしている端末デバイスの
-NULL 終端されたパス名へのポインタを返す。
-エラーが起きたならば NULL を返す
-(たとえば、\fIfd\fP が端末を参照していないとき)。
-返り値は静的データを指しているので、次の呼び出しで上書きされる可能性がある。
-.\"O The function
-.\"O .BR ttyname_r ()
-.\"O stores this pathname in the buffer
-.\"O .I buf
-.\"O of length
-.\"O .IR buflen .
-.BR ttyname_r ()
-関数は、このパス名を長さ
-.I buflen
-のバッファ
-.I buf
-に格納する。
-.\"O .SH "RETURN VALUE"
+\fBttyname\fP() 関数は、ファイルディスクリプタ \fIfd\fP がオープンしている端末デバイスの NULL 終端されたパス名へのポインタを返す。
+エラーが起きたならば NULL を返す (たとえば、\fIfd\fP が端末を参照していないとき)。
+返り値は静的データを指しているので、次の呼び出しで上書きされる可能性がある。 \fBttyname_r\fP() 関数は、このパス名を長さ
+\fIbuflen\fP のバッファ \fIbuf\fP に格納する。
.SH 返り値
-.\"O The function
-.\"O .BR ttyname ()
-.\"O returns a pointer to a pathname on success.
-.\"O On error, NULL is returned, and
-.\"O .I errno
-.\"O is set appropriately.
-.BR ttyname ()
-関数は、成功時はパス名へのポインタを返す。
-エラー時は NULL を返し、
-.I errno
-が適切に設定される。
-.\"O The function
-.\"O .BR ttyname_r ()
-.\"O returns 0 on success, and an error number upon error.
-.BR ttyname_r ()
-関数は、成功時には 0 を返し、エラー時にはエラー番号を返す。
-.\"O .SH ERRORS
+\fBttyname\fP() 関数は、成功時はパス名へのポインタを返す。 エラー時は NULL を返し、 \fIerrno\fP が適切に設定される。
+\fBttyname_r\fP() 関数は、成功時には 0 を返し、エラー時にはエラー番号を返す。
.SH エラー
-.BR ttyname_r ():
-.TP
-.B EBADF
-.\"O Bad file descriptor.
+\fBttyname_r\fP():
+.TP
+\fBEBADF\fP
ファイルディスクリプタが不正。
-.TP
-.B ENOTTY
-.\"O File descriptor does not refer to a terminal device.
+.TP
+\fBENOTTY\fP
ファイルディスクリプタが端末デバイスを示していない。
-.TP
-.B ERANGE
-.\"O .I buflen
-.\"O was too small to allow storing the pathname.
-.I buflen
-がパス名を格納するには短すぎる。
+.TP
+\fBERANGE\fP
+\fIbuflen\fP がパス名を格納するには短すぎる。
.SH 準拠
-4.2BSD, POSIX.1-2001.
+4.2BSD, POSIX.1\-2001.
.SH 関連項目
-.BR fstat (2),
-.BR isatty (3)
+\fBfstat\fP(2), \fBisatty\fP(3)