xref: /netbsd-src/external/ibm-public/postfix/dist/src/util/mac_expand.h (revision bdc22b2e01993381dcefeff2bc9b56ca75a4235c)
1 /*	$NetBSD: mac_expand.h,v 1.2 2017/02/14 01:16:49 christos Exp $	*/
2 
3 #ifndef _MAC_EXPAND_H_INCLUDED_
4 #define _MAC_EXPAND_H_INCLUDED_
5 
6 /*++
7 /* NAME
8 /*	mac_expand 3h
9 /* SUMMARY
10 /*	expand macro references in string
11 /* SYNOPSIS
12 /*	#include <mac_expand.h>
13 /* DESCRIPTION
14 /* .nf
15 
16  /*
17   * Utility library.
18   */
19 #include <vstring.h>
20 #include <mac_parse.h>
21 
22  /*
23   * Features.
24   */
25 #define MAC_EXP_FLAG_NONE	(0)
26 #define MAC_EXP_FLAG_RECURSE	(1<<0)
27 #define MAC_EXP_FLAG_APPEND	(1<<1)
28 #define MAC_EXP_FLAG_SCAN	(1<<2)
29 #define MAC_EXP_FLAG_PRINTABLE  (1<<3)
30 
31  /*
32   * Real lookup or just a test?
33   */
34 #define MAC_EXP_MODE_TEST	(0)
35 #define MAC_EXP_MODE_USE	(1)
36 
37 typedef const char *(*MAC_EXP_LOOKUP_FN) (const char *, int, void *);
38 
39 extern int mac_expand(VSTRING *, const char *, int, const char *, MAC_EXP_LOOKUP_FN, void *);
40 
41 /* LICENSE
42 /* .ad
43 /* .fi
44 /*	The Secure Mailer license must be distributed with this software.
45 /* AUTHOR(S)
46 /*	Wietse Venema
47 /*	IBM T.J. Watson Research
48 /*	P.O. Box 704
49 /*	Yorktown Heights, NY 10598, USA
50 /*--*/
51 
52 #endif
53