~ubuntu-branches/ubuntu/trusty/postfix/trusty-updates

« back to all changes in this revision

Viewing changes to src/util/dict.h

Tags: upstream-2.3.1
ImportĀ upstreamĀ versionĀ 2.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
  */
22
22
#include <vstream.h>
23
23
#include <argv.h>
 
24
#include <vstring.h>
24
25
 
25
26
 /*
26
27
  * Generic dictionary interface - in reality, a dictionary extends this
38
39
    int     lock_fd;                    /* for dict_update() lock */
39
40
    int     stat_fd;                    /* change detection */
40
41
    time_t  mtime;                      /* mod time at open */
 
42
    VSTRING *fold_buf;                  /* key folding buffer */
41
43
} DICT;
42
44
 
43
 
extern DICT *dict_alloc(const char *, const char *, int);
 
45
extern DICT *dict_alloc(const char *, const char *, ssize_t);
44
46
extern void dict_free(DICT *);
45
47
 
46
48
extern DICT *dict_debug(DICT *);
57
59
#define DICT_FLAG_DUP_REPLACE   (1<<7)  /* if file, replace dups */
58
60
#define DICT_FLAG_SYNC_UPDATE   (1<<8)  /* if file, sync updates */
59
61
#define DICT_FLAG_DEBUG         (1<<9)  /* log access */
60
 
#define DICT_FLAG_FOLD_KEY      (1<<10) /* lowercase the lookup key */
 
62
/*#define DICT_FLAG_FOLD_KEY    (1<<10) /* lowercase the lookup key */
61
63
#define DICT_FLAG_NO_REGSUB     (1<<11) /* disallow regexp substitution */
62
64
#define DICT_FLAG_NO_PROXY      (1<<12) /* disallow proxy mapping */
63
65
#define DICT_FLAG_NO_UNAUTH     (1<<13) /* disallow unauthenticated data */
 
66
#define DICT_FLAG_FOLD_FIX      (1<<14) /* case-fold key with fixed-case map */
 
67
#define DICT_FLAG_FOLD_MUL      (1<<15) /* case-fold key with multi-case map */
 
68
#define DICT_FLAG_FOLD_ANY      (DICT_FLAG_FOLD_FIX | DICT_FLAG_FOLD_MUL)
 
69
 
 
70
 /* IMPORTANT: Update the dict_mask[] table when the above changes */
64
71
 
65
72
#define DICT_FLAG_PARANOID \
66
73
        (DICT_FLAG_NO_REGSUB | DICT_FLAG_NO_PROXY | DICT_FLAG_NO_UNAUTH)
112
119
extern void dict_walk(DICT_WALK_ACTION, char *);
113
120
extern int dict_changed(void);
114
121
extern const char *dict_changed_name(void);
 
122
extern const char *dict_flags_str(int);
115
123
 
116
124
/* LICENSE
117
125
/* .ad