Commit a663d7d5 a663d7d5dea4de5a8c993deec7684e38a74e066c by Sergey Poznyakoff

* configure.ac, NEWS: Version 1.9.93.

* include/mailutils/libargp.h (mu_app_cfg_verifier): New extern.
* libargp/muinit.c (mu_app_cfg_verifier): New variable.
(mu_app_init): Call mu_app_cfg_verifier if in lint mode.
1 parent d571b7da
1 2008-11-12 Sergey Poznyakoff <gray@gnu.org.ua>
2
3 * configure.ac, NEWS: Version 1.9.93.
4 * include/mailutils/libargp.h (mu_app_cfg_verifier): New extern.
5 * libargp/muinit.c (mu_app_cfg_verifier): New variable.
6 (mu_app_init): Call mu_app_cfg_verifier if in lint mode.
7
1 2008-11-11 Sergey Poznyakoff <gray@gnu.org.ua> 8 2008-11-11 Sergey Poznyakoff <gray@gnu.org.ua>
2 9
3 * libargp/muinit.c (mu_app_init): Do not parse configs if 10 * libargp/muinit.c (mu_app_init): Do not parse configs if
......
1 GNU mailutils NEWS -- history of user-visible changes. 2008-11-07 1 GNU mailutils NEWS -- history of user-visible changes. 2008-11-12
2 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007,
3 2008 Free Software Foundation, Inc. 3 2008 Free Software Foundation, Inc.
4 See the end of file for copying conditions. 4 See the end of file for copying conditions.
...@@ -6,7 +6,7 @@ See the end of file for copying conditions. ...@@ -6,7 +6,7 @@ See the end of file for copying conditions.
6 Please send mailutils bug reports to <bug-mailutils@gnu.org>. 6 Please send mailutils bug reports to <bug-mailutils@gnu.org>.
7 7
8 8
9 Version 1.9.92: 9 Version 1.9.93:
10 10
11 * New configuration file format. 11 * New configuration file format.
12 12
......
...@@ -17,7 +17,7 @@ dnl You should have received a copy of the GNU General Public License along ...@@ -17,7 +17,7 @@ dnl You should have received a copy of the GNU General Public License along
17 dnl with GNU Mailutils; if not, write to the Free Software Foundation, 17 dnl with GNU Mailutils; if not, write to the Free Software Foundation,
18 dnl Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 dnl Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 19
20 AC_INIT([GNU Mailutils], [1.9.92], [bug-mailutils@gnu.org], [mailutils]) 20 AC_INIT([GNU Mailutils], [1.9.93], [bug-mailutils@gnu.org], [mailutils])
21 AC_CONFIG_SRCDIR([mailbox/mailbox.c]) 21 AC_CONFIG_SRCDIR([mailbox/mailbox.c])
22 AC_CONFIG_AUX_DIR([scripts]) 22 AC_CONFIG_AUX_DIR([scripts])
23 AM_INIT_AUTOMAKE 23 AM_INIT_AUTOMAKE
......
...@@ -44,6 +44,7 @@ struct mu_cmdline_capa ...@@ -44,6 +44,7 @@ struct mu_cmdline_capa
44 44
45 extern int mu_help_config_mode; 45 extern int mu_help_config_mode;
46 extern int mu_rcfile_lint; 46 extern int mu_rcfile_lint;
47 extern int (*mu_app_cfg_verifier) (void);
47 48
48 extern struct mu_cmdline_capa mu_common_cmdline; 49 extern struct mu_cmdline_capa mu_common_cmdline;
49 extern struct mu_cmdline_capa mu_logging_cmdline; 50 extern struct mu_cmdline_capa mu_logging_cmdline;
......
...@@ -53,6 +53,8 @@ get_canonical_name () ...@@ -53,6 +53,8 @@ get_canonical_name ()
53 int mu_help_config_mode; 53 int mu_help_config_mode;
54 int mu_rcfile_lint; 54 int mu_rcfile_lint;
55 55
56 int (*mu_app_cfg_verifier) (void) = NULL;
57
56 int 58 int
57 mu_app_init (struct argp *myargp, const char **capa, 59 mu_app_init (struct argp *myargp, const char **capa,
58 struct mu_cfg_param *cfg_param, 60 struct mu_cfg_param *cfg_param,
...@@ -123,12 +125,19 @@ mu_app_init (struct argp *myargp, const char **capa, ...@@ -123,12 +125,19 @@ mu_app_init (struct argp *myargp, const char **capa,
123 cfgflags |= MU_PARSE_CONFIG_DUMP; 125 cfgflags |= MU_PARSE_CONFIG_DUMP;
124 rc = mu_cfg_tree_reduce (mu_argp_tree, mu_program_name, cfg_param, 126 rc = mu_cfg_tree_reduce (mu_argp_tree, mu_program_name, cfg_param,
125 cfgflags, data); 127 cfgflags, data);
126 if (mu_rcfile_lint)
127 exit ((rc || mu_cfg_error_count) ? 1 : 0);
128 128
129 if (mu_rcfile_lint)
130 {
131 if (rc || mu_cfg_error_count)
132 exit (1);
133 if (mu_app_cfg_verifier)
134 rc = mu_app_cfg_verifier ();
135 exit (rc ? 1 : 0);
136 }
137
129 mu_gocs_flush (); 138 mu_gocs_flush ();
130 mu_cfg_destroy_tree (&mu_argp_tree); 139 mu_cfg_destroy_tree (&mu_argp_tree);
131 140
132 return 0; 141 return !!(rc || mu_cfg_error_count);
133 } 142 }
134 143
......