Commit 67f986cb 67f986cb4fa48411010cb962c34600c34b6af146 by Sergey Poznyakoff

Bugfixes

* libmu_cfg/init.c (mu_libcfg_parse_config): Do not produce error
if user configuration file is absent.
* libmu_sieve/sieve.l: Include config.h in %top section.
* mh/mh_alias.l: Likewise.
* mimeview/mimetypes.l: Likewise.
* mailbox/cfg_lexer.l: Likewise.
(mu_get_config): Call mu_cfg_tree_postprocess.
1 parent 08b3da34
......@@ -133,6 +133,8 @@ mu_libcfg_parse_config (mu_cfg_tree_t **ptree)
mu_cfg_tree_postprocess (tmp, flags);
mu_cfg_tree_union (&tree, &tmp);
}
else if (rc == ENOENT)
rc = 0;
free (file_name);
}
}
......
%{
%top {
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001, 2002, 2004, 2005,
2007, 2008, 2009 Free Software Foundation, Inc.
......@@ -21,7 +21,9 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
}
%{
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
......
%{
%top {
/* cfg_lexer.l -- default lexer for Mailutils configuration files
Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
......@@ -18,6 +18,9 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
}
%{
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
......@@ -359,8 +362,12 @@ mu_get_config (const char *file, const char *progname,
mu_cfg_tree_t *parse_tree;
int rc = mu_cfg_parse_file (&parse_tree, file, flags);
if (rc == 0)
rc = mu_cfg_tree_reduce (parse_tree, progname, progparam, flags,
target_ptr);
{
rc = mu_cfg_tree_postprocess (&parse_tree, flags);
if (rc == 0)
rc = mu_cfg_tree_reduce (parse_tree, progname, progparam, flags,
target_ptr);
}
mu_cfg_destroy_tree (&parse_tree);
......
%{
%top {
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 2003, 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
......@@ -17,6 +17,12 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301 USA */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
}
%{
#include <mh.h>
#include <mh_alias.h>
#include <sys/stat.h>
......
%{
%top {
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 2005, 2007, 2009 Free Software Foundation, Inc.
......@@ -20,7 +20,9 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
}
%{
#include <unistd.h>
#include <stdio.h>
#include <sys/stat.h>
......