Sync usage with man page.
[netbsd-mini2440.git] / external / ibm-public / postfix / dist / src / util / name_mask.h
blob41ce932f50ce43e92672b821bbd9c7986a3d4858
1 /* $NetBSD$ */
3 #ifndef _NAME_MASK_H_INCLUDED_
4 #define _NAME_MASK_H_INCLUDED_
6 /*++
7 /* NAME
8 /* name_mask 3h
9 /* SUMMARY
10 /* map names to bit mask
11 /* SYNOPSIS
12 /* #include <name_mask.h>
13 /* DESCRIPTION
14 /* .nf
17 * Utility library.
19 #include <vstring.h>
22 * External interface.
24 typedef struct {
25 const char *name;
26 int mask;
27 } NAME_MASK;
29 #define NAME_MASK_FATAL (1<<0)
30 #define NAME_MASK_ANY_CASE (1<<1)
31 #define NAME_MASK_RETURN (1<<2)
32 #define NAME_MASK_COMMA (1<<3)
33 #define NAME_MASK_PIPE (1<<4)
34 #define NAME_MASK_NUMBER (1<<5)
36 #define NAME_MASK_MATCH_REQ NAME_MASK_FATAL
38 #define NAME_MASK_NONE 0
39 #define NAME_MASK_DEFAULT (NAME_MASK_FATAL)
40 #define NAME_MASK_DEFAULT_DELIM ", \t\r\n"
42 #define name_mask_opt(tag, table, str, flags) \
43 name_mask_delim_opt((tag), (table), (str), \
44 NAME_MASK_DEFAULT_DELIM, (flags))
45 #define name_mask(tag, table, str) \
46 name_mask_opt((tag), (table), (str), NAME_MASK_DEFAULT)
47 #define str_name_mask(tag, table, mask) \
48 str_name_mask_opt(((VSTRING *) 0), (tag), (table), (mask), NAME_MASK_DEFAULT)
50 extern int name_mask_delim_opt(const char *, const NAME_MASK *, const char *, const char *, int);
51 extern const char *str_name_mask_opt(VSTRING *, const char *, const NAME_MASK *, int, int);
53 /* LICENSE
54 /* .ad
55 /* .fi
56 /* The Secure Mailer license must be distributed with this software.
57 /* AUTHOR(S)
58 /* Wietse Venema
59 /* IBM T.J. Watson Research
60 /* P.O. Box 704
61 /* Yorktown Heights, NY 10598, USA
62 /*--*/
64 #endif