V9/libc/stdio/getgrnam.c

Compare this file to the similar file:
Show the results in this format:

/* @(#)getgrnam.c	4.1 (Berkeley) 12/21/80 */
#include <grp.h>

struct group *
getgrnam(name)
register char *name;
{
	register struct group *p;
	struct group *getgrent();

	setgrent();
	while( (p = getgrent()) && strcmp(p->gr_name,name) );
	endgrent();
	return(p);
}