aboutsummaryrefslogtreecommitdiffstats
path: root/mail/pathalias/files/patch-def.h
blob: 3d823bbbc7934303c91971d8d1fd99fdfe0428e9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
--- def.h.orig  1993-03-03 22:10:01.000000000 +0100
+++ def.h   2013-06-16 17:11:21.000000000 +0200
@@ -2,7 +2,7 @@
 
 #ifndef lint
 #ifdef MAIN
-static char    *h_sccsid = "@(#)def.h  9.8 91/06/11";
+static const char  *h_sccsid = "@(#)def.h  9.8 91/06/11";
 #endif /*MAIN*/
 #endif /*lint*/
 
@@ -13,7 +13,7 @@
 
 typedef    long Cost;
 typedef struct node node;
-typedef struct link link;
+typedef struct palink palink;
 typedef struct dom dom;
 
 #ifdef lint
@@ -63,7 +63,7 @@
 /* WARNING: if > 2^16 nodes, type of n_tloc must change */
 struct node {
    char    *n_name;    /* host name */
-   link    *n_link;    /* adjacency list */
+   palink  *n_link;    /* adjacency list */
    Cost    n_cost;     /* cost to this host */
    union {
        node *nu_net;   /* others in this network (parsing) */
@@ -114,11 +114,11 @@
 #define l_next un.lu_next
 #define l_from un.lu_from
 
-struct link {
+struct palink {
    node    *l_to;      /* adjacent node */
    Cost    l_cost;     /* edge cost */
    union {
-       link *lu_next;  /* rest of adjacency list (not tracing) */
+       palink *lu_next;    /* rest of adjacency list (not tracing) */
        node *lu_from;  /* source node (tracing) */
    } un;
    short   l_flag;     /* right/left syntax, flags */
@@ -133,7 +133,7 @@
  */
 struct node {
    char    *n_name;
-   link    *n_link;
+   palink  *n_link;
    Cost    n_cost;
    node    *n_net;
    node    *n_root;
@@ -143,10 +143,10 @@
    unsigned short n_tloc;
    unsigned short n_flag;
 };
-struct link {
+struct palink {
    node    *l_to;
    Cost    l_cost;
-   link    *l_next;
+   palink  *l_next;
    node    *l_from;
    short   l_flag;
    char    l_netop;
@@ -159,3 +159,65 @@
    dom *prev;
    char *name;
 };
+
+/* prototypes addlink.c */
+extern palink *addlink(node *from, register node *to, Cost cost, int netchar, int netdir);
+extern void deadlink(node *nleft, node *nright);
+extern void atrace(node *n1, node *n2);
+extern int tracelink(char *arg);
+extern void deletelink(node *from, node *to);
+extern int maptrace(register node *from, register node *to);
+
+/* prototypes addnode.c */
+extern node *addnode(register char *name);
+extern node *addprivate(register char *name);
+extern void alias(node *n1, node *n2);
+extern void hashanalyze(void);
+extern void fixprivate(void);
+extern node *addhidden(register char *name);
+
+/* prototypes domain.c */
+extern int ondomlist(dom **headp, char *domain);
+extern int nslookup(char *domain);
+extern void adddom(dom **headp, char *domain);
+extern void movetofront(dom **headp, dom *d);
+extern int isadomain(char *domain);
+
+/* prototypes local.c */
+extern char *local(void);
+
+/* prototypes main.c */
+extern void die(const char *s);
+
+/* prototypes mapaux.c */
+extern long pack(long low, long high);
+extern void resetnodes(void);
+extern void dumpgraph(void);
+extern void showlinks(void);
+extern int tiebreaker(node *n, register node *newp );
+extern node *ncopy(register node *parent, register palink *l);
+
+/* prototypes mapit.c */
+void mapit(void);
+
+/* prototypes mem.c */
+extern void freelink(palink *l);
+extern void wasted(void);
+extern void freetable(node **t, long size);
+extern long allocation(void);
+extern palink *newlink(void);
+extern node *newnode(void);
+extern dom *newdom(void);
+extern char *strsave(const char *s);
+extern node **newtable(long size);
+#ifdef MYMALLOC
+extern char *mymalloc(register unsigned int n);
+#endif
+
+/* prototypes parse.c */
+extern void yyerror(const char *s);
+extern int yyparse(void);
+
+/* prototypes printit.c */
+extern void printit(void);
+