1/*
2 *  This program may be freely redistributed,
3 *  but this entire comment MUST remain intact.
4 *
5 *  Copyright (c) 1984, 1989, William LeFebvre, Rice University
6 *  Copyright (c) 1989, 1990, 1992, William LeFebvre, Northwestern University
7 *  Copyright (c) 2016, Randy Westlund
8 */
9#ifndef USERNAME_H
10#define USERNAME_H
11
12#include <stdbool.h>
13
14int	 enter_user(int uid, char *name, bool wecare);
15int	 get_user(int uid);
16void	 init_hash(void);
17char 	*username(int uid);
18int 	 userid(char *username);
19
20/*
21 *  "Table_size" defines the size of the hash tables used to map uid to
22 *  username.  The number of users in /etc/passwd CANNOT be greater than
23 *  this number.  If the error message "table overflow: too many users"
24 *  is printed by top, then "Table_size" needs to be increased.  Things will
25 *  work best if the number is a prime number that is about twice the number
26 *  of lines in /etc/passwd.
27 */
28#define Table_size	20011
29
30#endif /* USERNAME_H */
31