Removed the global alias file
[mmh] / h / aliasbr.h
1 /*
2 ** aliasbr.h -- definitions for the aliasing system
3 */
4
5 #define PASSWD "/etc/passwd"    /* passwd(5)               */
6 #define GROUP   "/etc/group"    /* group(5)                */
7 #define EVERYONE 200            /* lowest uid for everyone */
8
9 struct aka {
10         char *ak_name;          /* name to match against             */
11         struct adr *ak_addr;    /* list of addresses that it maps to */
12         struct aka *ak_next;    /* next aka in list                  */
13         char ak_visible;        /* should be visible in headers      */
14 };
15
16 struct adr {
17         char *ad_text;          /* text of this address in list        */
18         struct adr *ad_next;    /* next adr in list                    */
19         char ad_local;          /* text is local (check for expansion) */
20 };
21
22 /*
23 ** incore version of /etc/passwd
24 */
25 struct home {
26         char *h_name;           /* user name                             */
27         uid_t h_uid;            /* user id                               */
28         gid_t h_gid;            /* user's group                          */
29         char *h_home;           /* user's home directory                 */
30         char *h_shell;          /* user's shell                          */
31         int h_ngrps;            /* number of groups this user belongs to */
32         struct home *h_next;    /* next home in list                     */
33 };
34
35 struct home *seek_home(char *);
36
37 /*
38 ** prototypes
39 */
40 int alias(char *);
41 int akvisible(void);
42 void init_pw(void);
43 char *akresult(struct aka *);
44 char *akvalue(char *);
45 char *akerror(int);
46
47 /* codes returned by alias() */
48
49 #define AK_OK       0   /* file parsed ok        */
50 #define AK_NOFILE   1   /* couldn't read file    */
51 #define AK_ERROR    2   /* error parsing file    */
52 #define AK_LIMIT    3   /* memory limit exceeded */
53 #define AK_NOGROUP  4   /* no such group         */
54
55 /* should live here, not in mts.c */
56
57 extern int Everyone;
58 extern char *NoShell;