OSDN Git Service

8718dbd6b45ca80e5f9aa52fe1c2293fccdd6ab9
[linuxjm/LDP_man-pages.git] / draft / man3 / fgetgrent.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" References consulted:
24 .\"     Linux libc source code
25 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
26 .\"     386BSD man pages
27 .\" Modified Sat Jul 24 19:38:44 1993 by Rik Faith (faith@cs.unc.edu)
28 .\"
29 .\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
30 .\"     all rights reserved.
31 .\" Translated 1997-12-19, HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
32 .\" Updated 2008-08-01, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
33 .\"
34 .TH FGETGRENT 3  2008-07-10 "GNU" "Linux Programmer's Manual"
35 .\"O .SH NAME
36 .SH 名前
37 .\"O fgetgrent \- get group file entry
38 fgetgrent \- グループファイルエントリの取り出し
39 .\"O .SH SYNOPSIS
40 .SH 書式
41 .nf
42 .B #include <stdio.h>
43 .B #include <sys/types.h>
44 .B #include <grp.h>
45 .sp
46 .BI "struct group *fgetgrent(FILE *" stream );
47 .fi
48 .sp
49 .in -4n
50 .\"O Feature Test Macro Requirements for glibc (see
51 .\"O .BR feature_test_macros (7)):
52 glibc 向けの機能検査マクロの要件
53 .RB ( feature_test_macros (7)
54 参照):
55 .in
56 .sp
57 .BR fgetgrent ():
58 _SVID_SOURCE
59 .\"O .SH DESCRIPTION
60 .SH 説明
61 .\"O The
62 .\"O .BR fgetgrent ()
63 .\"O function returns a pointer to a structure containing
64 .\"O the group information from the file referred to by
65 .\"O .IR stream .
66 .\"O The first time it is called
67 .\"O it returns the first entry; thereafter, it returns successive entries.
68 .\"O The file referred to by
69 .\"O .I stream
70 .\"O must have the same format as
71 .\"O .I /etc/group
72 .\"O (see
73 .\"O .BR group (5)).
74 .BR fgetgrent ()
75 関数は、
76 .I stream
77 で参照されるファイルから取り出したグループ情報
78 を含む構造体へのポインタを返す。最初に呼び出された時は
79 最初のエントリを返し、それ以降は、次のエントリを返す。
80 .I stream
81 で参照されるファイルは、
82 .I /etc/group
83 と同じ形式でなければならない
84 .RB ( group (5)
85 参照)。
86 .PP
87 .\"O The \fIgroup\fP structure is defined in \fI<grp.h>\fP as follows:
88 \fIgroup\fP 構造体は、\fI<grp.h>\fP で以下のように定義されている:
89 .sp
90 .in +4n
91 .nf
92 struct group {
93 .\"O     char   *gr_name;        /* group name */
94 .\"O     char   *gr_passwd;      /* group password */
95 .\"O     gid_t   gr_gid;         /* group ID */
96 .\"O     char  **gr_mem;         /* group members */
97     char   *gr_name;        /* グループ名 */
98     char   *gr_passwd;      /* グループのパスワード */
99     gid_t   gr_gid;         /* グループ ID */
100     char  **gr_mem;         /* グループのメンバ */
101 };
102 .fi
103 .in
104 .\"O .SH "RETURN VALUE"
105 .SH 返り値
106 .\"O The
107 .\"O .BR fgetgrent ()
108 .\"O function returns a pointer to a
109 .\"O .I group
110 .\"O structure,
111 .\"O or NULL if there are no more entries or an error occurs.
112 .BR fgetgrent ()
113 関数は
114 .I group
115 構造体へのポインタを返す。
116 これ以上エントリが無いか、エラーが発生した場合は NULL を返す。
117 .\"O .SH ERRORS
118 .SH エラー
119 .TP
120 .B ENOMEM
121 .\"O Insufficient memory to allocate
122 .\"O .I group
123 .\"O structure.
124 .I group
125 構造体を割り当てるためのメモリが不十分。
126 .\"O .SH "CONFORMING TO"
127 .SH 準拠
128 SVr4.
129 .SH 関連項目
130 .BR endgrent (3),
131 .BR fgetgrent_r (3),
132 .BR fopen (3),
133 .BR getgrent (3),
134 .BR getgrgid (3),
135 .BR getgrnam (3),
136 .BR putgrent (3),
137 .BR setgrent (3),
138 .BR group (5)