1: static char *sccsid = "@(#)getpwuid.c 4.1 10/9/80"; 2: 3: #include <pwd.h> 4: 5: struct passwd * 6: getpwuid(uid) 7: register uid; 8: { 9: register struct passwd *p; 10: struct passwd *getpwent(); 11: 12: setpwent(); 13: while( (p = getpwent()) && p->pw_uid != uid ); 14: endpwent(); 15: return(p); 16: }