.\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl)
.\"
+.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
.\" 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
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public
-.\" License along with this manual; if not, write to the Free
-.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
-.\" USA.
+.\" License along with this manual; if not, see
+.\" <http://www.gnu.org/licenses/>.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
.\"
.\" Japanese Version Copyright (c) 2004 Yuichi SATO
.\" all rights reserved.
.\" Translated Sun Aug 8 00:53:40 JST 2004
.\" by Yuichi SATO <ysato444@yahoo.co.jp>
.\"
-.TH GETPWENT_R 3 2010-10-21 "GNU" "Linux Programmer's Manual"
-.\"O .SH NAME
+.TH GETPWENT_R 3 2015\-01\-22 GNU "Linux Programmer's Manual"
.SH 名前
-.\"O getpwent_r, fgetpwent_r \- get passwd file entry reentrantly
-getpwent_r, fgetpwent_r \- パスワードファイルのエントリを
-リエントラントで取り出す
-.\"O .SH SYNOPSIS
+getpwent_r, fgetpwent_r \- パスワードファイルのエントリーを リエントラントで取り出す
.SH 書式
.nf
-.B #include <pwd.h>
+\fB#include <pwd.h>\fP
.sp
-.BI "int getpwent_r(struct passwd *" pwbuf ", char *" buf ,
+\fBint getpwent_r(struct passwd *\fP\fIpwbuf\fP\fB, char *\fP\fIbuf\fP\fB,\fP
.br
-.BI " size_t " buflen ", struct passwd **" pwbufp );
+\fB size_t \fP\fIbuflen\fP\fB, struct passwd **\fP\fIpwbufp\fP\fB);\fP
.sp
-.BI "int fgetpwent_r(FILE *" fp ", struct passwd *" pwbuf ", char *" buf ,
+\fBint fgetpwent_r(FILE *\fP\fIstream\fP\fB, struct passwd *\fP\fIpwbuf\fP\fB, char *\fP\fIbuf\fP\fB,\fP
.br
-.BI " size_t " buflen ", struct passwd **" pwbufp );
+\fB size_t \fP\fIbuflen\fP\fB, struct passwd **\fP\fIpwbufp\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
-.BR getpwent_r (),
-_BSD_SOURCE || _SVID_SOURCE
+\fBgetpwent_r\fP(), _BSD_SOURCE || _SVID_SOURCE
.br
-.BR fgetpwent_r ():
-_SVID_SOURCE
-.\"O .SH DESCRIPTION
+\fBfgetpwent_r\fP(): _SVID_SOURCE
.SH 説明
-.\"O The functions
-.\"O .BR getpwent_r ()
-.\"O and
-.\"O .BR fgetpwent_r ()
-.\"O are the reentrant versions of
-.\"O .BR getpwent (3)
-.\"O and
-.\"O .BR fgetpwent (3).
-関数
-.BR getpwent_r ()
-と
-.BR fgetpwent_r ()
-は
-.BR getpwent (3)
-と
-.BR fgetpwent (3)
-のリエントラント (reentrant) 版である。
-.\"O The former reads the next passwd entry from the stream initialized by
-.\"O .BR setpwent (3).
-前者は、
-.BR setpwent (3)
-によって初期化されたストリームから、次のパスワードエントリを読み込む。
-.\"O The latter reads the next passwd entry from the stream
-.\"O .IR fp .
-後者は、ストリーム
-.I fp
-から次のパスワードエントリを読み込む。
+関数 \fBgetpwent_r\fP() と \fBfgetpwent_r\fP() は \fBgetpwent\fP(3) と \fBfgetpwent\fP(3)
+のリエントラント (reentrant) 版である。 前者は、 \fBsetpwent\fP(3)
+によって初期化されたストリームから、次のパスワードエントリーを読み込む。 後者は、 \fIstream\fP から次のパスワードエントリーを読み込む。
.PP
-.\"O The \fIpasswd\fP structure is defined in
-.\"O .I <pwd.h>
-.\"O as follows:
-\fIpasswd\fP 構造体は
-.I <pwd.h>
-において以下のように定義されている。
+\fIpasswd\fP 構造体は、\fI<pwd.h>\fP で以下のように定義されている:
.sp
.in +4n
.nf
struct passwd {
-.\"O char *pw_name; /* username */
-.\"O char *pw_passwd; /* user password */
-.\"O uid_t pw_uid; /* user ID */
-.\"O gid_t pw_gid; /* group ID */
-.\"O char *pw_gecos; /* user information */
-.\"O char *pw_dir; /* home directory */
-.\"O char *pw_shell; /* shell program */
- char *pw_name; /* ユーザ名 */
- char *pw_passwd; /* ユーザのパスワード */
- uid_t pw_uid; /* ユーザ ID */
+ char *pw_name; /* ユーザー名 */
+ char *pw_passwd; /* ユーザーのパスワード */
+ uid_t pw_uid; /* ユーザー ID */
gid_t pw_gid; /* グループ ID */
- char *pw_gecos; /* ユーザ情報 */
+ char *pw_gecos; /* ユーザー情報 */
char *pw_dir; /* ホームディレクトリ */
char *pw_shell; /* シェルプログラム */
};
.fi
.in
.PP
-.\"O For more information about the fields of this structure, see
-.\"O .BR passwd (5).
-この構造体のフィールドの詳細は
-.BR passwd (5)
-を参照のこと。
+この構造体のフィールドの詳細は \fBpasswd\fP(5) を参照のこと。
-.\"O The nonreentrant functions return a pointer to static storage,
-.\"O where this static storage contains further pointers to user
-.\"O name, password, gecos field, home directory and shell.
-リエントラントでない関数は静的な格納領域へのポインタを返す。
-この静的な格納領域には、更にユーザ名・パスワード・gecos フィールド・
-ホームディレクトリ・シェルへのポインタが含まれる。
-.\"O The reentrant functions described here return all of that in
-.\"O caller-provided buffers.
-.\"O First of all there is the buffer
-.\"O .I pwbuf
-.\"O that can hold a \fIstruct passwd\fP.
-.\"O And next the buffer
-.\"O .I buf
-.\"O of size
-.\"O .I buflen
-.\"O that can hold additional strings.
-ここで説明されているリエントラント版の関数は、
-呼び出し側から提供されるバッファにユーザ名など全てを返す。
-最初の引き数として \fIstruct passwd\fP を保持できるバッファ
-.I pwbuf
-がある。
-次にその他の文字列を保持できるサイズ
-.I buflen
-のバッファ
-.I buf
-がある。
-.\"O The result of these functions, the \fIstruct passwd\fP read from the stream,
-.\"O is stored in the provided buffer
-.\"O .IR *pwbuf ,
-.\"O and a pointer to this \fIstruct passwd\fP is returned in
-.\"O .IR *pwbufp .
-これらの関数の結果 (ストリームから読み込まれた \fIstruct passwd\fP) は、
-提供されたバッファ
-.I *pwbuf
-に格納され、この \fIstruct passwd\fP へのポインタは
-.I *pwbufp
-に返される。
-.\"O .SH "RETURN VALUE"
+リエントラントでない関数は静的な格納領域へのポインターを返す。 この静的な格納領域には、更にユーザー名・パスワード・gecos フィールド・
+ホームディレクトリ・シェルへのポインターが含まれる。 ここで説明されているリエントラント版の関数は、
+呼び出し側から提供されるバッファーにユーザー名など全てを返す。 最初の引き数として \fIstruct passwd\fP を保持できるバッファー
+\fIpwbuf\fP がある。 次にその他の文字列を保持できるサイズ \fIbuflen\fP のバッファー \fIbuf\fP がある。 これらの関数の結果
+(ストリームから読み込まれた \fIstruct passwd\fP) は、 提供されたバッファー \fI*pwbuf\fP に格納され、この \fIstruct
+passwd\fP へのポインターは \fI*pwbufp\fP に返される。
.SH 返り値
-.\"O On success, these functions return 0 and
-.\"O .I *pwbufp
-.\"O is a pointer to the \fIstruct passwd\fP.
-成功した場合、これらの関数は 0 を返し、
-.I *pwbufp
-は \fIstruct passwd\fP へのポインタとなる。
-エラーの場合、これらの関数はエラー値を返し、
-.I *pwbufp
-は NULL になる。
-.\"O .SH ERRORS
+成功した場合、これらの関数は 0 を返し、 \fI*pwbufp\fP は \fIstruct passwd\fP へのポインターとなる。
+エラーの場合、これらの関数はエラー値を返し、 \fI*pwbufp\fP は NULL になる。
.SH エラー
-.TP
-.B ENOENT
-.\"O No more entries.
-次のエントリがない。
-.TP
-.B ERANGE
-.\"O Insufficient buffer space supplied.
-.\"O Try again with larger buffer.
-十分なバッファ空間が与えられていない。
-もっと大きなバッファで再度実行すること。
-.\"O .SH "CONFORMING TO"
+.TP
+\fBENOENT\fP
+次のエントリーがない。
+.TP
+\fBERANGE\fP
+十分なバッファー空間が与えられていない。 もっと大きなバッファーで再度実行すること。
.SH 準拠
-.\"O These functions are GNU extensions, done in a style resembling
-.\"O the POSIX version of functions like
-.\"O .BR getpwnam_r (3).
-これらの関数は GNU 拡張であり、POSIX 版の関数
-.BR getpwnam_r (3)
-の形式に似せてある。
-.\"O Other systems use prototype
+これらの関数は GNU 拡張であり、POSIX 版の関数 \fBgetpwnam_r\fP(3) の形式に似せてある。
他のシステムでは以下のプロトタイプが使われている。
.sp
.nf
.in
.fi
.sp
-.\"O or, better,
より良いものでは、以下のようになっている。
.sp
.nf
FILE **pw_fp);
.in
.fi
-.\"O .SH NOTES
.SH 注意
-.\"O The function
-.\"O .BR getpwent_r ()
-.\"O is not really reentrant since it shares the reading position
-.\"O in the stream with all other threads.
-関数
-.BR getpwent_r ()
-は本当のリエントラントではない。
-なぜなら、ストリームの読み込み位置を
+関数 \fBgetpwent_r\fP() は本当のリエントラントではない。 なぜなら、ストリームの読み込み位置を
他の全てのスレッドと共有しているためである。
-.\"O .SH EXAMPLE
.SH 例
.nf
#define _GNU_SOURCE
exit(EXIT_SUCCESS);
}
.fi
-.\"O .\" perhaps add error checking - should use strerror_r
-.\" たぶんエラーチェックを追加して、strerror_r を使うべきだろう。
+.\" perhaps add error checking - should use strerror_r
.\" #include <errno.h>
.\" #include <stdlib.h>
.\" if (i) {
.\" printf("getpwent_r: %s", strerror(i));
.\" exit(EXIT_SUCCESS);
.\" }
-.\"O .SH "SEE ALSO"
.SH 関連項目
-.BR fgetpwent (3),
-.BR getpw (3),
-.BR getpwent (3),
-.BR getpwnam (3),
-.BR getpwuid (3),
-.BR putpwent (3),
-.BR passwd (5)
+\fBfgetpwent\fP(3), \fBgetpw\fP(3), \fBgetpwent\fP(3), \fBgetpwnam\fP(3),
+\fBgetpwuid\fP(3), \fBputpwent\fP(3), \fBpasswd\fP(5)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。