home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Distributions / ucb / spencer_2bsd.tar.gz / 2bsd.tar / src / csh / getpwuid.c < prev    next >
C/C++ Source or Header  |  1980-02-17  |  274b  |  16 lines

  1. /* Copyright (c) 1979 Regents of the University of California */
  2. #include <pwd.h>
  3.  
  4. struct passwd *
  5. getpwuid(uid)
  6. register uid;
  7. {
  8.     register struct passwd *p;
  9.     struct passwd *getpwent();
  10.  
  11.     setpwent();
  12.     while( (p = getpwent()) && p->pw_uid != uid );
  13.     endpwent();
  14.     return(p);
  15. }
  16.