Introduce "parser hints", to provide better control over configuration parsing.
* include/mailutils/cfg.h (mu_cfg_parse_hints): New struct. (mu_cfg_tree_postprocess): Change signature. Last argument is struct mu_cfg_parse_hints *. (MU_CFG_PARSE_SITE_RCFILE,MU_CFG_PARSE_CUSTOM_RCFILE) (MU_CFG_PARSE_PROGRAM): New flags. (mu_cfg_parse_config): New proto. * libmailutils/cfg/lexer.l (mu_get_config): Fix call to mu_cfg_tree_postprocess. * libmailutils/cfg/parser.y (do_include): Takes hints as 2nd argument. (mu_cfg_tree_postprocess): Likewise. (mu_cfg_parse_config): New function. * libmu_cfg/init.c (mu_libcfg_parse_config): Rewrite as a wrapper over mu_cfg_parse_config. * libmu_argp/muinit.c (mu_app_init): Update. * mu/query.c: New option --program. (mutool_query): Use mu_cfg_parse_config interface.
Showing
6 changed files
with
262 additions
and
198 deletions
-
Please register or sign in to post a comment