]> diplodocus.org Git - nmh/blob - h/aliasbr.h
uip/flist.c: Make locally defined and used functions static.
[nmh] / h / aliasbr.h
1 /* aliasbr.h -- definitions for the aliasing system
2 *
3 */
4
5 extern char *AliasFile; /* mh-alias(5) */
6
7 struct aka {
8 char *ak_name; /* name to match against */
9 struct adr *ak_addr; /* list of addresses that it maps to */
10 struct aka *ak_next; /* next aka in list */
11 char ak_visible; /* should be visible in headers */
12 };
13
14 struct adr {
15 char *ad_text; /* text of this address in list */
16 struct adr *ad_next; /* next adr in list */
17 char ad_local; /* text is local (check for expansion) */
18 };
19
20 /*
21 * in-core version of /etc/passwd
22 */
23 struct home {
24 char *h_name; /* user name */
25 uid_t h_uid; /* user id */
26 gid_t h_gid; /* user's group */
27 char *h_home; /* user's home directory */
28 char *h_shell; /* user's shell */
29 int h_ngrps; /* number of groups this user belongs to */
30 struct home *h_next; /* next home in list */
31 };
32
33 /*
34 * prototypes
35 */
36 int alias (char *);
37 int akvisible (void);
38 void init_pw (void);
39 char *akresult (struct aka *);
40 char *akvalue (char *);
41 char *akerror (int);
42
43 /* codes returned by alias() */
44
45 #define AK_OK 0 /* file parsed OK */
46 #define AK_NOFILE 1 /* couldn't read file */
47 #define AK_ERROR 2 /* error parsing file */
48 #define AK_LIMIT 3 /* memory limit exceeded */
49 #define AK_NOGROUP 4 /* no such group */