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  */
22typedef 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);
28    DICT_OWNER owner;
29} CFG_PARSER;
30
31extern CFG_PARSER *cfg_parser_alloc(const char *);
32extern char *cfg_get_str(const CFG_PARSER *, const char *, const char *,
33			         int, int);
34extern int cfg_get_int(const CFG_PARSER *, const char *, int, int, int);
35extern int cfg_get_bool(const CFG_PARSER *, const char *, int);
36extern CFG_PARSER *cfg_parser_free(CFG_PARSER *);
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
57