xref: /original-bsd/usr.bin/mail/config.c (revision 13f94090)
1 /*
2  * Copyright (c) 1980 Regents of the University of California.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms are permitted
6  * provided that this notice is preserved and that due credit is given
7  * to the University of California at Berkeley. The name of the University
8  * may not be used to endorse or promote products derived from this
9  * software without specific prior written permission. This software
10  * is provided ``as is'' without express or implied warranty.
11  */
12 
13 #ifdef notdef
14 static char sccsid[] = "@(#)config.c	5.3 (Berkeley) 02/18/88";
15 #endif /* notdef */
16 
17 /*
18  * This file contains definitions of network data used by Mail
19  * when replying.  See also:  configdefs.h and optim.c
20  */
21 
22 /*
23  * The subterfuge with CONFIGFILE is to keep cc from seeing the
24  * external defintions in configdefs.h.
25  */
26 #define	CONFIGFILE
27 #include "configdefs.h"
28 
29 /*
30  * Set of network separator characters.
31  */
32 char	*metanet = "!^:%@.";
33 
34 /*
35  * Host table of "known" hosts.  See the comment in configdefs.h;
36  * not all accessible hosts need be here (fortunately).
37  */
38 struct netmach netmach[] = {
39 	EMPTY,		EMPTYID,	AN,	/* Filled in dynamically */
40 	0,		0,		0
41 };
42 
43 /*
44  * Table of ordered of preferred networks.  You probably won't need
45  * to fuss with this unless you add a new network character (foolishly).
46  */
47 struct netorder netorder[] = {
48 	AN,	'@',
49 	AN,	'%',
50 	SN,	':',
51 	BN,	'!',
52 	-1,	0
53 };
54 
55 /*
56  * Table to convert from network separator code in address to network
57  * bit map kind.  With this transformation, we can deal with more than
58  * one character having the same meaning easily.
59  */
60 struct ntypetab ntypetab[] = {
61 	'%',	AN,
62 	'@',	AN,
63 	':',	SN,
64 	'!',	BN,
65 	'^',	BN,
66 	0,	0
67 };
68 
69 struct nkindtab nkindtab[] = {
70 	AN,	IMPLICIT,
71 	BN,	EXPLICIT,
72 	SN,	IMPLICIT,
73 	0,	0
74 };
75