1 /* $NetBSD: cfg_parser.h,v 1.1.1.1 2009/06/23 10:08:45 tron Exp $ */ 2 3 #ifndef _CFG_PARSER_H_INCLUDED_ 4 #define _CFG_PARSER_H_INCLUDED_ 5 6 /*++ 7 /* NAME 8 /* cfg_parser 3h 9 /* SUMMARY 10 /* configuration parser utilities 11 /* SYNOPSIS 12 /* #include "cfg_parser.h" 13 DESCRIPTION 14 .nf 15 16 /* 17 * External interface. 18 */ 19 20 typedef struct CFG_PARSER { 21 char *name; 22 char *(*get_str) (const struct CFG_PARSER *, const char *, const char *, 23 int, int); 24 int (*get_int) (const struct CFG_PARSER *, const char *, int, int, int); 25 int (*get_bool) (const struct CFG_PARSER *, const char *, int); 26 } CFG_PARSER; 27 28 extern CFG_PARSER *cfg_parser_alloc(const char *); 29 extern char *cfg_get_str(const CFG_PARSER *, const char *, const char *, 30 int, int); 31 extern int cfg_get_int(const CFG_PARSER *, const char *, int, int, int); 32 extern int cfg_get_bool(const CFG_PARSER *, const char *, int); 33 extern CFG_PARSER *cfg_parser_free(CFG_PARSER *); 34 35 /* LICENSE 36 /* .ad 37 /* .fi 38 /* The Secure Mailer license must be distributed with this software. 39 /* AUTHOR(S) 40 /* Wietse Venema 41 /* IBM T.J. Watson Research 42 /* P.O. Box 704 43 /* Yorktown Heights, NY 10598, USA 44 /* 45 /* Liviu Daia 46 /* Institute of Mathematics of the Romanian Academy 47 /* P.O. BOX 1-764 48 /* RO-014700 Bucharest, ROMANIA 49 /*--*/ 50 51 #endif 52