static PTR info = NULL; register FILE *stream; register struct group *g;
int match (struct group *p) { return ! strcmp (name, p->gr_name); } static void *info;
DEFUN(getgrnam, (name), register CONST char *name){  static PTR info = NULL;  register FILE *stream;  register struct group *g;  if (info == NULL)    {      info = __grpalloc();      if (info == NULL)	return NULL;    }  stream = __grpopen();  if (stream == NULL)    return NULL;  while ((g = __grpread(stream, info)) != NULL)    if (!strcmp(g->gr_name, name))      break;  (void) fclose(stream);  return g;}