File: aliasbr.h

package info (click to toggle)
nmh 1.8-4
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 7,860 kB
  • sloc: ansic: 50,445; sh: 22,697; makefile: 1,138; lex: 740; perl: 509; yacc: 265
file content (33 lines) | stat: -rw-r--r-- 1,037 bytes parent folder | download | duplicates (3)
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
/* aliasbr.h -- new aliasing mechanism
 *
 * This code is Copyright (c) 2017, by the authors of nmh.  See the
 * COPYRIGHT file in the root directory of the nmh distribution for
 * complete copyright information. */

/* codes returned by alias() */
/* FIXME: Only AK_OK used externally; interface could be narrower. */
#define	AK_OK		0	/* file parsed OK 	 */
#define	AK_NOFILE	1	/* couldn't read file 	 */
#define	AK_ERROR	2	/* error parsing file 	 */
#define	AK_LIMIT	3	/* memory limit exceeded */

struct aka {
    char *ak_name;		/* name to match against             */
    struct adr *ak_addr;	/* list of addresses that it maps to */
    struct aka *ak_next;	/* next aka in list                  */
    bool ak_visible;		/* should be visible in headers      */
};

/*
 * prototypes
 */
char *akvalue(char *);
int akvisible(void) PURE;
char *akresult(struct aka *);
int alias(char *);
char *akerror(int);

extern struct aka *akahead;

/* FIXME: Definition in config/config.c. */
extern char *AliasFile;		/* mh-alias(5)             */