OSDN Git Service

(split) LDP: Release pages for LDP v3.39.
[linuxjm/LDP_man-pages.git] / release / man3 / getpwent.3
index 0cc11b4..d0c0d06 100644 (file)
@@ -7,7 +7,7 @@
 .\" Permission is granted to copy and distribute modified versions of this
 .\" manual under the conditions for verbatim copying, provided that the
 .\" entire resulting derived work is distributed under the terms of a
-.\" permission notice identical to this one
+.\" permission notice identical to this one.
 .\"
 .\" Since the Linux kernel and libraries are constantly changing, this
 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
 .\" Modified Sat Jul 24 19:22:14 1993 by Rik Faith (faith@cs.unc.edu)
 .\" Modified Mon May 27 21:37:47 1996 by Martin Schulze (joey@linux.de)
 .\"
-.\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
-.\"    all rights reserved.
-.\" Translated 1997-12-18, HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
-.\" Updated 2005-09-06, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"*******************************************************************
 .\"
-.TH GETPWENT 3  2010-10-21 "GNU" "Linux Programmer's Manual"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH GETPWENT 3 2010\-10\-21 GNU "Linux Programmer's Manual"
 .SH 名前
 getpwent, setpwent, endpwent \- パスワードファイルのエントリの取得
 .SH 書式
 .nf
-.B #include <sys/types.h>
-.B #include <pwd.h>
+\fB#include <sys/types.h>\fP
+\fB#include <pwd.h>\fP
 .sp
-.B struct passwd *getpwent(void);
+\fBstruct passwd *getpwent(void);\fP
 .sp
-.B void setpwent(void);
+\fBvoid setpwent(void);\fP
 .sp
-.B void endpwent(void);
+\fBvoid endpwent(void);\fP
 .fi
 .sp
 .in -4n
-glibc 向けの機能検査マクロの要件
-.RB ( feature_test_macros (7)
-参照):
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
 .in
 .sp
 .ad l
-.BR getpwent (),
-.BR setpwent (),
-.BR endpwent ():
+\fBgetpwent\fP(), \fBsetpwent\fP(), \fBendpwent\fP():
 .RS 4
-_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500 ||
-_XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
+_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500 || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
 .RE
 .ad b
 .SH 説明
-.BR getpwent ()
-関数は、パスワード・データベースから取得したエントリを
-要素毎に分解し、各要素を格納した構造体へのポインタを返す
-(パスワード・データベースの例:
-ローカルのパスワードファイル
-.IR /etc/passwd ,
-NIS, LDAP)。
-.BR getpwent ()
-は、最初に呼び出された時は最初のエントリを返し、それ以降は
-呼び出される毎に次のエントリを返す。
+\fBgetpwent\fP()  関数は、パスワード・データベースから取得したエントリを 要素毎に分解し、各要素を格納した構造体へのポインタを返す
+(パスワード・データベースの例: ローカルのパスワードファイル \fI/etc/passwd\fP, NIS, LDAP)。 \fBgetpwent\fP()
+は、最初に呼び出された時は最初のエントリを返し、それ以降は 呼び出される毎に次のエントリを返す。
 .PP
-.BR setpwent ()
-関数を使うと、パスワード・データベースの先頭に戻る。
+\fBsetpwent\fP()  関数を使うと、パスワード・データベースの先頭に戻る。
 .PP
-.BR endpwent ()
-関数は、全ての処理が終わった後にパスワード・
-データベースをクローズする。
+\fBendpwent\fP()  関数は、全ての処理が終わった後にパスワード・ データベースをクローズする。
 .PP
-\fIpasswd\fP 構造体は \fI<pwd.h>\fP で以下のように定義されている:
+\fIpasswd\fP 構造体は\fI<pwd.h>\fP で以下のように定義されている:
 .sp
 .in +4n
 .nf
 struct passwd {
+    char   *pw_name;       /* ユーザ名 */
     char   *pw_passwd;     /* ユーザのパスワード */
     uid_t   pw_uid;        /* ユーザ ID */
     gid_t   pw_gid;        /* グループ ID */
@@ -97,70 +83,42 @@ struct passwd {
 .fi
 .in
 .PP
-この構造体のフィールドの詳細は
-.BR passwd (5)
-を参照のこと。
+この構造体のフィールドの詳細は \fBpasswd\fP(5)  を参照のこと。
 .SH 返り値
-.BR getpwent ()
-関数は
-.I passwd
-構造体へのポインタを返す。
-これ以上エントリが無いか、エラーが発生した場合は NULL を返す。
-エラーが発生すると、
-.I errno
-が適切に設定される。
-この関数の呼び出し後に
-.I errno
-をチェックしたい場合は、呼び出し前に
-.I errno
-を 0 に設定しておかないといけない。
+\fBgetpwent\fP()  関数は \fIpasswd\fP 構造体へのポインタを返す。 これ以上エントリが無いか、エラーが発生した場合は NULL
+を返す。 エラーが発生すると、 \fIerrno\fP が適切に設定される。 この関数の呼び出し後に \fIerrno\fP をチェックしたい場合は、呼び出し前に
+\fIerrno\fP を 0 に設定しておかないといけない。
 
-返り値は静的な領域を指しており、その後の
-.BR getpwent (),
-.BR getpwnam (3),
-.BR getpwuid (3)
-の呼び出しで上書きされるかもしれない。
-(返されたポインタを
-.BR free (3)
-に渡さないこと。)
+返り値は静的な領域を指しており、その後の \fBgetpwent\fP(), \fBgetpwnam\fP(3), \fBgetpwuid\fP(3)
+の呼び出しで上書きされるかもしれない。 (返されたポインタを \fBfree\fP(3)  に渡さないこと。)
 .SH エラー
-.TP
-.B EINTR
+.TP 
+\fBEINTR\fP
 シグナルが捕捉された。
-.TP
-.B EIO
-入出力エラー。
-.TP
-.B EMFILE
-呼び出し元プロセスがオープンされているファイル数が
-すでに上限
-.RB ( OPEN_MAX )
-であった。
-.TP
-.B ENFILE
+.TP 
+\fBEIO\fP
+I/O エラー。
+.TP 
+\fBEMFILE\fP
+呼び出し元プロセスがオープンしているファイル数が すでに上限 (\fBOPEN_MAX\fP)  であった。
+.TP 
+\fBENFILE\fP
 システムでオープンされているファイル数がすでに上限であった。
-.TP
-.B ENOMEM
-.\" POSIX にはない。
-.I passwd
-構造体に割り当てるメモリが十分なかった。
-.TP
-.B ERANGE
-十分なバッファ空間がない
+.TP 
+\fBENOMEM\fP
+.\" not in POSIX
+.\" to allocate the passwd structure, or to allocate buffers
+\fIpasswd\fP 構造体に割り当てるメモリが十分なかった。
+.TP 
+\fBERANGE\fP
+与えられたバッファ空間が不十分である
 .SH ファイル
-.TP
-.I /etc/passwd
+.TP 
+\fI/etc/passwd\fP
 ローカルのパスワード・データベースファイル
 .SH 準拠
-SVr4, 4.3BSD, POSIX.1-2001.
-.I pw_gecos
-フィールドは POSIX では規定されていないが、
+SVr4, 4.3BSD, POSIX.1\-2001.  \fIpw_gecos\fP フィールドは POSIX では規定されていないが、
 ほとんどの実装に存在する。
 .SH 関連項目
-.BR fgetpwent (3),
-.BR getpw (3),
-.BR getpwent_r (3),
-.BR getpwnam (3),
-.BR getpwuid (3),
-.BR putpwent (3),
-.BR passwd (5)
+\fBfgetpwent\fP(3), \fBgetpw\fP(3), \fBgetpwent_r\fP(3), \fBgetpwnam\fP(3),
+\fBgetpwuid\fP(3), \fBputpwent\fP(3), \fBpasswd\fP(5)