[BACK]Return to username.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / top

Diff for /src/usr.bin/top/Attic/username.c between version 1.7 and 1.8

version 1.7, 2002/07/15 17:20:36 version 1.8, 2003/06/12 22:30:23
Line 75 
Line 75 
 /* We depend on that for hash_table and YOUR compiler had BETTER do it! */  /* We depend on that for hash_table and YOUR compiler had BETTER do it! */
 struct hash_el hash_table[Table_size];  struct hash_el hash_table[Table_size];
   
 void init_hash()  void
   init_hash(void)
 {  {
     /*      /*
      *  There used to be some steps we had to take to initialize things.       *  There used to be some steps we had to take to initialize things.
Line 85 
Line 85 
      */       */
 }  }
   
 char *username(uid)  char *
   username(uid_t uid)
 uid_t uid;  
   
 {  {
     int hashindex;      int hashindex;
   
Line 101 
Line 99 
     return(hash_table[hashindex].name);      return(hash_table[hashindex].name);
 }  }
   
 uid_t userid(username)  uid_t
   userid(char *username)
 char *username;  
   
 {  {
     struct passwd *pwd;      struct passwd *pwd;
   
Line 124 
Line 120 
     return(pwd->pw_uid);      return(pwd->pw_uid);
 }  }
   
 static int enter_user(uid, name, wecare)  /* wecare: 1 = enter it always, 0 = nice to have */
   static int
 uid_t  uid;  enter_user(uid_t uid, char *name, int wecare)
 char *name;  
 int wecare;             /* 1 = enter it always, 0 = nice to have */  
   
 {  {
     int hashindex;      int hashindex;
   
Line 161 
Line 154 
  * and cache any entries we pass over while looking.   * and cache any entries we pass over while looking.
  */   */
   
 static int get_user(uid)  static int
   get_user(uid_t uid)
 uid_t uid;  
   
 {  {
     struct passwd *pwd;      struct passwd *pwd;
   

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8