.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" 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. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" .\" References consulted: .\" Linux libc source code .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 19:38:44 1993 by Rik Faith (faith@cs.unc.edu) .\" .\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka .\" all rights reserved. .\" Translated 1997-12-19, HIROFUMI Nishizuka .\" Updated 2008-08-01, Akihiro MOTOKI .\" .TH FGETGRENT 3 2008-07-10 "GNU" "Linux Programmer's Manual" .\"O .SH NAME .SH 名前 .\"O fgetgrent \- get group file entry fgetgrent \- グループファイルエントリの取り出し .\"O .SH SYNOPSIS .SH 書式 .nf .B #include .B #include .B #include .sp .BI "struct group *fgetgrent(FILE *" stream ); .fi .sp .in -4n .\"O Feature Test Macro Requirements for glibc (see .\"O .BR feature_test_macros (7)): glibc 向けの機能検査マクロの要件 .RB ( feature_test_macros (7) 参照): .in .sp .BR fgetgrent (): _SVID_SOURCE .\"O .SH DESCRIPTION .SH 説明 .\"O The .\"O .BR fgetgrent () .\"O function returns a pointer to a structure containing .\"O the group information from the file referred to by .\"O .IR stream . .\"O The first time it is called .\"O it returns the first entry; thereafter, it returns successive entries. .\"O The file referred to by .\"O .I stream .\"O must have the same format as .\"O .I /etc/group .\"O (see .\"O .BR group (5)). .BR fgetgrent () 関数は、 .I stream で参照されるファイルから取り出したグループ情報 を含む構造体へのポインタを返す。最初に呼び出された時は 最初のエントリを返し、それ以降は、次のエントリを返す。 .I stream で参照されるファイルは、 .I /etc/group と同じ形式でなければならない .RB ( group (5) 参照)。 .PP .\"O The \fIgroup\fP structure is defined in \fI\fP as follows: \fIgroup\fP 構造体は、\fI\fP で以下のように定義されている: .sp .in +4n .nf struct group { .\"O char *gr_name; /* group name */ .\"O char *gr_passwd; /* group password */ .\"O gid_t gr_gid; /* group ID */ .\"O char **gr_mem; /* group members */ char *gr_name; /* グループ名 */ char *gr_passwd; /* グループのパスワード */ gid_t gr_gid; /* グループ ID */ char **gr_mem; /* グループのメンバ */ }; .fi .in .\"O .SH "RETURN VALUE" .SH 返り値 .\"O The .\"O .BR fgetgrent () .\"O function returns a pointer to a .\"O .I group .\"O structure, .\"O or NULL if there are no more entries or an error occurs. .BR fgetgrent () 関数は .I group 構造体へのポインタを返す。 これ以上エントリが無いか、エラーが発生した場合は NULL を返す。 .\"O .SH ERRORS .SH エラー .TP .B ENOMEM .\"O Insufficient memory to allocate .\"O .I group .\"O structure. .I group 構造体を割り当てるためのメモリが不十分。 .\"O .SH "CONFORMING TO" .SH 準拠 SVr4. .SH 関連項目 .BR endgrent (3), .BR fgetgrent_r (3), .BR fopen (3), .BR getgrent (3), .BR getgrgid (3), .BR getgrnam (3), .BR putgrent (3), .BR setgrent (3), .BR group (5)