1: /*	@(#)getpwnam.c	2.2	SCCS id keyword	*/
   2: #include <whoami.h>
   3: #include <pwd.h>
   4: 
   5: struct passwd *
   6: getpwnam(name)
   7: char *name;
   8: {
   9:     register struct passwd *p;
  10:     struct passwd *getpwent();
  11: 
  12: #ifdef UCB_PWHASH
  13:     if( !(p = getpwmap(getmapnam(name))) ) {
  14: #endif
  15:     setpwent();
  16:     while( (p = getpwent()) && strcmp(name,p->pw_name) );
  17: #ifdef UCB_PWHASH
  18:     }
  19: #endif
  20:     endpwent();
  21:     return(p);
  22: }
Last modified: 1981-07-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 828
Valid CSS Valid XHTML 1.0 Strict