Postfix3.3.1
cfg_parser.h
[詳解]
1 #ifndef _CFG_PARSER_H_INCLUDED_
2 #define _CFG_PARSER_H_INCLUDED_
3 
4 /*++
5 /* NAME
6 /* cfg_parser 3h
7 /* SUMMARY
8 /* configuration parser utilities
9 /* SYNOPSIS
10 /* #include "cfg_parser.h"
11  DESCRIPTION
12  .nf
13 
14  /*
15  * Utility library.
16  */
17 #include <dict.h>
18 
19  /*
20  * External interface.
21  */
22 typedef struct CFG_PARSER {
23  char *name;
24  char *(*get_str) (const struct CFG_PARSER *, const char *, const char *,
25  int, int);
26  int (*get_int) (const struct CFG_PARSER *, const char *, int, int, int);
27  int (*get_bool) (const struct CFG_PARSER *, const char *, int);
29 } CFG_PARSER;
30 
31 extern CFG_PARSER *cfg_parser_alloc(const char *);
32 extern char *cfg_get_str(const CFG_PARSER *, const char *, const char *,
33  int, int);
34 extern int cfg_get_int(const CFG_PARSER *, const char *, int, int, int);
35 extern int cfg_get_bool(const CFG_PARSER *, const char *, int);
37 
38 #define cfg_get_owner(cfg) ((cfg)->owner)
39 
40 /* LICENSE
41 /* .ad
42 /* .fi
43 /* The Secure Mailer license must be distributed with this software.
44 /* AUTHOR(S)
45 /* Wietse Venema
46 /* IBM T.J. Watson Research
47 /* P.O. Box 704
48 /* Yorktown Heights, NY 10598, USA
49 /*
50 /* Liviu Daia
51 /* Institute of Mathematics of the Romanian Academy
52 /* P.O. BOX 1-764
53 /* RO-014700 Bucharest, ROMANIA
54 /*--*/
55 
56 #endif
CFG_PARSER * cfg_parser_free(CFG_PARSER *)
Definition: cfg_parser.c:309
DICT_OWNER owner
Definition: cfg_parser.h:28
char * cfg_get_str(const CFG_PARSER *, const char *, const char *, int, int)
Definition: cfg_parser.c:261
int(* get_int)(const struct CFG_PARSER *, const char *, int, int, int)
Definition: cfg_parser.h:26
char * name
Definition: cfg_parser.h:23
int cfg_get_int(const CFG_PARSER *, const char *, int, int, int)
Definition: cfg_parser.c:281
int cfg_get_bool(const CFG_PARSER *, const char *, int)
Definition: cfg_parser.c:295
int int
Definition: smtpd_proxy.h:21
CFG_PARSER * cfg_parser_alloc(const char *)
Definition: cfg_parser.c:227
int(* get_bool)(const struct CFG_PARSER *, const char *, int)
Definition: cfg_parser.h:27
struct CFG_PARSER CFG_PARSER