1: #if defined(LIBC_SCCS) && !defined(lint) 2: static char sccsid[] = "@(#)getgrgid.c 5.2 (Berkeley) 3/9/86"; 3: #endif LIBC_SCCS and not lint 4: 5: #include <grp.h> 6: 7: struct group * 8: getgrgid(gid) 9: register gid; 10: { 11: register struct group *p; 12: struct group *getgrent(); 13: 14: setgrent(); 15: while( (p = getgrent()) && p->gr_gid != gid ); 16: endgrent(); 17: return(p); 18: }