Commit b60a5698 b60a56980c2a728618f65aaa72a84b5c5d018938 by Sergey Poznyakoff Committed by Sergey Poznyakoff

Version 2.99.99

* configure.ac: Version 2.99.99
* NEWS: Update.
* libmu_argp/mailutils.c: New file.
* libmu_argp/Makefile.am: Add mailutils.c
* libmu_argp/cmdline.c (all_cmdline_capa): Add mu_mailutils_cmdline.
(mu_libargp_init): Register modflags function.
* libmu_argp/mu_argp.c (mu_build_argp): Retain negative group numbers.
(argp_capa): New member: modflags.
(mu_register_argp_capa): Take pointer to modflags function as 3rd
parameter.
(mu_build_argp): Use modflags member to alter argp flags.
(mu_argp_build): Take pointer to flags as its third argument.
* libmu_argp/muinit.c (mu_app_init): Pass pointer to flags to mu_argp_build.
* libmu_cfg/init.c (mu_libcfg_init): Silently ignore unknown groups

* include/mailutils/libargp.h (mu_mailutils_cmdline): New extern.
(mu_cmdline_capa): New member: modflags.
(mu_argp_build): Change signature.
(mu_register_argp_capa): Change signature.
* libmailutils/cfg/gocs.c (std_gocs_table): Add dummy entry for "mailutils"

* mu/Makefile.am (bin_PROGRAMS): Rename to "mailutils".
* mu/dispatch.c (dispatch_docstring): Use mu_program_name instead of
the hardcoded name.
* mu/mu.c: Use "mailutils" capability.
* mu/mailutils-config.in: Rename to mu/mailutils-config

* comsat/comsat.c: Use "mailutils" capability.
* dotlock/dotlock.c: Likewise.
* examples/muauth.c: Likewise.
* examples/muemail.c: Likewise.
* frm/frm.c: Likewise.
* frm/from.c: Likewise.
* imap4d/imap4d.c: Likewise.
* maidag/maidag.c: Likewise.
* mail/mail.c: Likewise.
* messages/messages.c: Likewise.
* mimeview/mimeview.c: Likewise.
* movemail/movemail.c: Likewise.
* pop3d/pop3d.c: Likewise.
* pop3d/popauth.c: Likewise.
* readmsg/readmsg.c: Likewise.
* sieve/sieve.c: Likewise.
1 parent df44a479
1 GNU mailutils NEWS -- history of user-visible changes. 2013-04-12 1 GNU mailutils NEWS -- history of user-visible changes. 2015-07-02
2 Copyright (C) 2002-2015 Free Software Foundation, Inc. 2 Copyright (C) 2002-2015 Free Software Foundation, Inc.
3 See the end of file for copying conditions. 3 See the end of file for copying conditions.
4 4
5 Please send mailutils bug reports to <bug-mailutils@gnu.org>. 5 Please send mailutils bug reports to <bug-mailutils@gnu.org>.
6 6
7 7
8 Version 2.99.98 (Git) 8 Version 2.99.99 (Git)
9 9
10 This version is a major rewrite of GNU Mailutils. Quite a few parts 10 This version is a major rewrite of GNU Mailutils. Quite a few parts
11 of the basic framework were rewritten from scratch, while some others 11 of the basic framework were rewritten from scratch, while some others
...@@ -60,9 +60,9 @@ example, "gdbm:///etc/mail/aliases.db" refers to a GDBM database. ...@@ -60,9 +60,9 @@ example, "gdbm:///etc/mail/aliases.db" refers to a GDBM database.
60 60
61 See <http://mailutils.org/wiki/libmu_dbm>. 61 See <http://mailutils.org/wiki/libmu_dbm>.
62 62
63 ** New utility `mu' 63 ** New utility `mailutils'
64 64
65 `Mu' is a multi-purpose tool which can be of use to users, programmers 65 Multi-purpose tool which can be of use to users, programmers
66 and system administrators. It allows you to retrieve information 66 and system administrators. It allows you to retrieve information
67 about Mailutils configuration, check ACLs and authentication tickets, 67 about Mailutils configuration, check ACLs and authentication tickets,
68 list, create or modify DBM files, construct filters of arbitrary 68 list, create or modify DBM files, construct filters of arbitrary
...@@ -100,7 +100,7 @@ pipes the message (or any part thereof) to it. ...@@ -100,7 +100,7 @@ pipes the message (or any part thereof) to it.
100 See <http://mailutils.org/wiki/Pipe>. 100 See <http://mailutils.org/wiki/Pipe>.
101 101
102 A similar test uses the program exit code to decide what to do with 102 A similar test uses the program exit code to decide what to do with
103 the message 103 the message.
104 104
105 See <http://mailutils.org/wiki/Pipe_test>. 105 See <http://mailutils.org/wiki/Pipe_test>.
106 106
...@@ -252,7 +252,32 @@ the "mail" utility: ...@@ -252,7 +252,32 @@ the "mail" utility:
252 ** The --with-mailbindir option 252 ** The --with-mailbindir option
253 253
254 This option changes installation directory for the "mail" utility. 254 This option changes installation directory for the "mail" utility.
255 255
256 The following command will configure Mailutils to build only a
257 statically-linked copy of the "mail" utility and install it to
258 /bin:
259
260 ./configure \
261 LDFLAGS=-static\
262 --enable-build-mail\
263 --with-mailbindir='/bin'\
264 --disable-shared\
265 --disable-virtual-domains\
266 --disable-python\
267 --disable-pam\
268 --disable-cxx\
269 --disable-build-servers\
270 --disable-build-clients\
271 --without-gsasl\
272 --without-tcp-wrappers\
273 --without-fribidi\
274 --without-mysql\
275 --without-postgres\
276 --without-odbc\
277 --without-ldap\
278 --without-guile\
279 --without-dbm
280
256 ** DBM options 281 ** DBM options
257 282
258 It is normally not needed to specify --with-gdbm, --with-berkeley-db 283 It is normally not needed to specify --with-gdbm, --with-berkeley-db
......
...@@ -89,6 +89,7 @@ static struct argp argp = { ...@@ -89,6 +89,7 @@ static struct argp argp = {
89 }; 89 };
90 90
91 static const char *comsat_argp_capa[] = { 91 static const char *comsat_argp_capa[] = {
92 "mailutils",
92 "common", 93 "common",
93 "debug", 94 "debug",
94 "logging", 95 "logging",
......
...@@ -16,7 +16,8 @@ dnl You should have received a copy of the GNU General Public License along ...@@ -16,7 +16,8 @@ dnl You should have received a copy of the GNU General Public License along
16 dnl with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>. 16 dnl with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
17 17
18 AC_PREREQ(2.63) 18 AC_PREREQ(2.63)
19 AC_INIT([GNU Mailutils], [2.99.98], [bug-mailutils@gnu.org], [mailutils]) 19 AC_INIT([GNU Mailutils], [2.99.99], [bug-mailutils@gnu.org], [mailutils],
20 [http://mailutils.org])
20 AC_CONFIG_SRCDIR([libmailutils/mailbox/mailbox.c]) 21 AC_CONFIG_SRCDIR([libmailutils/mailbox/mailbox.c])
21 AC_CONFIG_AUX_DIR([build-aux]) 22 AC_CONFIG_AUX_DIR([build-aux])
22 AM_INIT_AUTOMAKE([gnits 1.11 dist-bzip2 dist-xz std-options silent-rules]) 23 AM_INIT_AUTOMAKE([gnits 1.11 dist-bzip2 dist-xz std-options silent-rules])
......
...@@ -134,6 +134,7 @@ struct mu_cfg_param dotlock_cfg_param[] = { ...@@ -134,6 +134,7 @@ struct mu_cfg_param dotlock_cfg_param[] = {
134 134
135 135
136 const char *dotlock_capa[] = { 136 const char *dotlock_capa[] = {
137 "mailutils",
137 "common", 138 "common",
138 "debug", 139 "debug",
139 NULL 140 NULL
......
...@@ -31,6 +31,7 @@ static char doc[] = ...@@ -31,6 +31,7 @@ static char doc[] =
31 static char args_doc[] = "key"; 31 static char args_doc[] = "key";
32 32
33 static const char *capa[] = { 33 static const char *capa[] = {
34 "mailutils",
34 "auth", 35 "auth",
35 "common", 36 "common",
36 "debug", 37 "debug",
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
24 #include "mailutils/libargp.h" 24 #include "mailutils/libargp.h"
25 25
26 const char *capa[] = { 26 const char *capa[] = {
27 "mailutils",
27 "address", 28 "address",
28 NULL 29 NULL
29 }; 30 };
......
...@@ -201,6 +201,7 @@ static struct argp argp = { ...@@ -201,6 +201,7 @@ static struct argp argp = {
201 }; 201 };
202 202
203 static const char *frm_argp_capa[] = { 203 static const char *frm_argp_capa[] = {
204 "mailutils",
204 "common", 205 "common",
205 "debug", 206 "debug",
206 "mailbox", 207 "mailbox",
......
...@@ -68,6 +68,7 @@ static struct argp argp = { ...@@ -68,6 +68,7 @@ static struct argp argp = {
68 }; 68 };
69 69
70 static const char *capa[] = { 70 static const char *capa[] = {
71 "mailutils",
71 "common", 72 "common",
72 "debug", 73 "debug",
73 "mailbox", 74 "mailbox",
......
...@@ -89,6 +89,7 @@ static struct argp argp = { ...@@ -89,6 +89,7 @@ static struct argp argp = {
89 }; 89 };
90 90
91 static const char *imap4d_capa[] = { 91 static const char *imap4d_capa[] = {
92 "mailutils",
92 "auth", 93 "auth",
93 "common", 94 "common",
94 "debug", 95 "debug",
......
...@@ -39,12 +39,14 @@ struct mu_cmdline_capa ...@@ -39,12 +39,14 @@ struct mu_cmdline_capa
39 { 39 {
40 char *name; 40 char *name;
41 struct argp_child *child; 41 struct argp_child *child;
42 void (*modflags) (int *);
42 }; 43 };
43 44
44 extern int mu_help_config_mode; 45 extern int mu_help_config_mode;
45 extern int mu_rcfile_lint; 46 extern int mu_rcfile_lint;
46 extern int (*mu_app_cfg_verifier) (void); 47 extern int (*mu_app_cfg_verifier) (void);
47 48
49 extern struct mu_cmdline_capa mu_mailutils_cmdline;
48 extern struct mu_cmdline_capa mu_common_cmdline; 50 extern struct mu_cmdline_capa mu_common_cmdline;
49 extern struct mu_cmdline_capa mu_logging_cmdline; 51 extern struct mu_cmdline_capa mu_logging_cmdline;
50 extern struct mu_cmdline_capa mu_mailbox_cmdline; 52 extern struct mu_cmdline_capa mu_mailbox_cmdline;
...@@ -62,10 +64,12 @@ extern struct mu_cmdline_capa mu_virtdomain_cmdline; ...@@ -62,10 +64,12 @@ extern struct mu_cmdline_capa mu_virtdomain_cmdline;
62 64
63 extern void mu_libargp_init (void); 65 extern void mu_libargp_init (void);
64 66
65 extern struct argp *mu_argp_build (const struct argp *argp, char ***pcapa); 67 extern struct argp *mu_argp_build (const struct argp *argp, char ***pcapa,
68 int *flags);
66 extern void mu_argp_done (struct argp *argp); 69 extern void mu_argp_done (struct argp *argp);
67 70
68 extern int mu_register_argp_capa (const char *name, struct argp_child *child); 71 extern int mu_register_argp_capa (const char *name, struct argp_child *child,
72 void (*modflags) (int*));
69 73
70 void mu_argp_init (const char *vers, const char *bugaddr); 74 void mu_argp_init (const char *vers, const char *bugaddr);
71 int mu_app_init (struct argp *myargp, const char **capa, 75 int mu_app_init (struct argp *myargp, const char **capa,
......
...@@ -285,6 +285,7 @@ find_init_function (struct mu_gocs_entry *tab, const char *capa) ...@@ -285,6 +285,7 @@ find_init_function (struct mu_gocs_entry *tab, const char *capa)
285 } 285 }
286 286
287 static struct mu_gocs_entry std_gocs_table[] = { 287 static struct mu_gocs_entry std_gocs_table[] = {
288 { "mailutils", mu_gocs_dummy },
288 { "common", mu_gocs_dummy }, 289 { "common", mu_gocs_dummy },
289 { "mailbox", mu_gocs_mailbox_init }, 290 { "mailbox", mu_gocs_mailbox_init },
290 { "locking", mu_gocs_locking_init }, 291 { "locking", mu_gocs_locking_init },
......
...@@ -29,6 +29,7 @@ libmu_argp_la_SOURCES =\ ...@@ -29,6 +29,7 @@ libmu_argp_la_SOURCES =\
29 cmdline.c\ 29 cmdline.c\
30 cmdline.h\ 30 cmdline.h\
31 common.c\ 31 common.c\
32 mailutils.c\
32 mu_argp.c\ 33 mu_argp.c\
33 muinit.c\ 34 muinit.c\
34 sieve.c 35 sieve.c
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
22 #include "cmdline.h" 22 #include "cmdline.h"
23 23
24 static struct mu_cmdline_capa *all_cmdline_capa[] = { 24 static struct mu_cmdline_capa *all_cmdline_capa[] = {
25 &mu_mailutils_cmdline,
25 &mu_common_cmdline, 26 &mu_common_cmdline,
26 &mu_logging_cmdline, 27 &mu_logging_cmdline,
27 &mu_mailer_cmdline, 28 &mu_mailer_cmdline,
...@@ -42,7 +43,7 @@ mu_libargp_init () ...@@ -42,7 +43,7 @@ mu_libargp_init ()
42 for (cpp = all_cmdline_capa; *cpp; cpp++) 43 for (cpp = all_cmdline_capa; *cpp; cpp++)
43 { 44 {
44 struct mu_cmdline_capa *cp = *cpp; 45 struct mu_cmdline_capa *cp = *cpp;
45 if (mu_register_argp_capa (cp->name, cp->child)) 46 if (mu_register_argp_capa (cp->name, cp->child, cp->modflags))
46 { 47 {
47 mu_error (_("INTERNAL ERROR: cannot register argp capability `%s'"), 48 mu_error (_("INTERNAL ERROR: cannot register argp capability `%s'"),
48 cp->name); 49 cp->name);
......
1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 2007-2012, 2014-2015 Free Software Foundation, Inc.
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 3 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General
15 Public License along with this library. If not, see
16 <http://www.gnu.org/licenses/>. */
17
18 #ifdef HAVE_CONFIG_H
19 # include <config.h>
20 #endif
21 #include "cmdline.h"
22 #include <unistd.h>
23 #include <stdlib.h>
24
25
26 /* ************************************************************************* */
27 /* GNU Mailutils help and version output */
28 /* ************************************************************************* */
29
30 #define OPT_PROGNAME -2
31 #define OPT_USAGE -3
32 #define OPT_HANG -4
33
34 static struct argp_option mu_mailutils_argp_options[] =
35 {
36 {"help", '?', 0, 0, N_("give this help list"), -1},
37 {"usage", OPT_USAGE, 0, 0, N_("give a short usage message"), 0},
38 {"version", 'V', 0, 0, N_("print program version"), -1},
39 {"program-name",OPT_PROGNAME,N_("NAME"), OPTION_HIDDEN, N_("set the program name"), 0},
40 {"HANG", OPT_HANG, N_("SECS"), OPTION_ARG_OPTIONAL | OPTION_HIDDEN,
41 N_("hang for SECS seconds (default 3600)"), 0},
42 { NULL }
43 };
44
45 static error_t
46 mu_mailutils_argp_parser (int key, char *arg, struct argp_state *state)
47 {
48 switch (key)
49 {
50 case '?':
51 argp_state_help (state, state->out_stream,
52 ARGP_HELP_SHORT_USAGE | ARGP_HELP_LONG | ARGP_HELP_DOC);
53 /* TRANSLATORS: The placeholder indicates the bug-reporting address
54 for this package. Please add _another line_ saying
55 "Report translation bugs to <...>\n" with the address for translation
56 bugs (typically your translation team's web or email address). */
57 printf (_("\nReport bugs to: %s\n"), "<" PACKAGE_BUGREPORT ">");
58
59 #ifdef PACKAGE_PACKAGER_BUG_REPORTS
60 printf (_("Report %s bugs to: %s\n"), PACKAGE_PACKAGER,
61 PACKAGE_PACKAGER_BUG_REPORTS);
62 #endif
63
64 #ifdef PACKAGE_URL
65 printf (_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL);
66 #endif
67 fputs (_("General help using GNU software: <http://www.gnu.org/gethelp/>\n"),
68 stdout);
69 exit (0);
70
71 case OPT_USAGE:
72 argp_state_help (state, state->out_stream,
73 ARGP_HELP_USAGE | ARGP_HELP_EXIT_OK);
74 break;
75
76 case 'V':
77 if (argp_program_version_hook)
78 (*argp_program_version_hook) (state->out_stream, state);
79 else if (argp_program_version)
80 fprintf (state->out_stream, "%s\n", argp_program_version);
81 else
82 argp_error (state, "%s",
83 dgettext (state->root_argp->argp_domain,
84 "(PROGRAM ERROR) No version known!?"));
85 exit(0);
86
87 case OPT_PROGNAME: /* Set the program name. */
88 #if HAVE_DECL_PROGRAM_INVOCATION_NAME
89 program_invocation_name = arg;
90 #endif
91 /* Update what we use for messages. */
92 state->name = __argp_base_name (arg);
93
94 #if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
95 program_invocation_short_name = state->name;
96 #endif
97
98 if ((state->flags & (ARGP_PARSE_ARGV0 | ARGP_NO_ERRS))
99 == ARGP_PARSE_ARGV0)
100 /* Update what getopt uses too. */
101 state->argv[0] = arg;
102 break;
103
104 case OPT_HANG:
105 {
106 int hang = atoi (arg ? arg : "3600");
107 while (hang-- > 0)
108 sleep (1);
109 break;
110 }
111
112 default:
113 return ARGP_ERR_UNKNOWN;
114 }
115 return 0;
116 }
117
118 struct argp mu_mailutils_argp = {
119 mu_mailutils_argp_options,
120 mu_mailutils_argp_parser,
121 };
122
123 struct argp_child mu_mailutils_argp_child = {
124 &mu_mailutils_argp,
125 0,
126 NULL,
127 -1,
128 };
129
130 static void
131 mu_mailutils_modflags(int *flags)
132 {
133 *flags |= ARGP_NO_HELP;
134 }
135
136 struct mu_cmdline_capa mu_mailutils_cmdline = {
137 "mailutils", &mu_mailutils_argp_child, mu_mailutils_modflags
138 };
139
140
141
142
143
144
...@@ -41,12 +41,14 @@ ...@@ -41,12 +41,14 @@
41 struct argp_capa { 41 struct argp_capa {
42 char *capability; 42 char *capability;
43 struct argp_child *child; 43 struct argp_child *child;
44 void (*modflags)(int*);
44 } mu_argp_capa[MU_MAX_CAPA] = { 45 } mu_argp_capa[MU_MAX_CAPA] = {
45 {NULL,} 46 {NULL,}
46 }; 47 };
47 48
48 int 49 int
49 mu_register_argp_capa (const char *name, struct argp_child *child) 50 mu_register_argp_capa (const char *name, struct argp_child *child,
51 void (*modflags)(int*))
50 { 52 {
51 int i; 53 int i;
52 54
...@@ -56,6 +58,7 @@ mu_register_argp_capa (const char *name, struct argp_child *child) ...@@ -56,6 +58,7 @@ mu_register_argp_capa (const char *name, struct argp_child *child)
56 if ((mu_argp_capa[i].capability = strdup (name)) == NULL) 58 if ((mu_argp_capa[i].capability = strdup (name)) == NULL)
57 return ENOMEM; 59 return ENOMEM;
58 mu_argp_capa[i].child = child; 60 mu_argp_capa[i].child = child;
61 mu_argp_capa[i].modflags = modflags;
59 return 0; 62 return 0;
60 } 63 }
61 return 1; 64 return 1;
...@@ -72,7 +75,7 @@ find_capa (const char *name) ...@@ -72,7 +75,7 @@ find_capa (const char *name)
72 } 75 }
73 76
74 static struct argp * 77 static struct argp *
75 mu_build_argp (const struct argp *template, char **capa) 78 mu_build_argp (const struct argp *template, char **capa, int *flags)
76 { 79 {
77 int n; 80 int n;
78 int nchild; 81 int nchild;
...@@ -115,9 +118,17 @@ mu_build_argp (const struct argp *template, char **capa) ...@@ -115,9 +118,17 @@ mu_build_argp (const struct argp *template, char **capa)
115 struct argp_capa *cp = find_capa (capa[n]); 118 struct argp_capa *cp = find_capa (capa[n]);
116 if (cp) 119 if (cp)
117 { 120 {
118 ap[nchild] = *cp->child; 121 if (cp->modflags)
119 ap[nchild].group = group++; 122 cp->modflags (flags);
120 nchild++; 123 if (cp->child)
124 {
125 ap[nchild] = *cp->child;
126 if (ap[nchild].group < 0)
127 ap[nchild].group = 0;
128 else
129 ap[nchild].group = group++;
130 nchild++;
131 }
121 } 132 }
122 } 133 }
123 ap[nchild].argp = NULL; 134 ap[nchild].argp = NULL;
...@@ -191,7 +202,7 @@ argp_reg_action (void *item, void *data) ...@@ -191,7 +202,7 @@ argp_reg_action (void *item, void *data)
191 } 202 }
192 203
193 struct argp * 204 struct argp *
194 mu_argp_build (const struct argp *init_argp, char ***pcapa) 205 mu_argp_build (const struct argp *init_argp, char ***pcapa, int *flags)
195 { 206 {
196 struct cap_buf cb; 207 struct cap_buf cb;
197 struct argp *argp; 208 struct argp *argp;
...@@ -200,7 +211,7 @@ mu_argp_build (const struct argp *init_argp, char ***pcapa) ...@@ -200,7 +211,7 @@ mu_argp_build (const struct argp *init_argp, char ***pcapa)
200 mu_gocs_enumerate (argp_reg_action, &cb); 211 mu_gocs_enumerate (argp_reg_action, &cb);
201 cap_buf_add (&cb, NULL); 212 cap_buf_add (&cb, NULL);
202 mu_libargp_init (); 213 mu_libargp_init ();
203 argp = mu_build_argp (init_argp, cb.capa); 214 argp = mu_build_argp (init_argp, cb.capa, flags);
204 if (pcapa) 215 if (pcapa)
205 *pcapa = cb.capa; 216 *pcapa = cb.capa;
206 else 217 else
......
...@@ -35,7 +35,7 @@ const char version_etc_copyright[] = ...@@ -35,7 +35,7 @@ const char version_etc_copyright[] =
35 /* Do *not* mark this string for translation. %s is a copyright 35 /* Do *not* mark this string for translation. %s is a copyright
36 symbol suitable for this locale, and %d is the copyright 36 symbol suitable for this locale, and %d is the copyright
37 year. */ 37 year. */
38 "Copyright %s 2007-2014 Free Software Foundation, inc."; 38 "Copyright %s 2007-2015 Free Software Foundation, inc.";
39 39
40 void 40 void
41 mu_program_version_hook (FILE *stream, struct argp_state *state) 41 mu_program_version_hook (FILE *stream, struct argp_state *state)
...@@ -116,7 +116,7 @@ mu_app_init (struct argp *myargp, const char **capa, ...@@ -116,7 +116,7 @@ mu_app_init (struct argp *myargp, const char **capa,
116 mu_gocs_register_std (capa[i]); /*FIXME*/ 116 mu_gocs_register_std (capa[i]); /*FIXME*/
117 if (!myargp) 117 if (!myargp)
118 myargp = &argpnull; 118 myargp = &argpnull;
119 argp = mu_argp_build (myargp, &excapa); 119 argp = mu_argp_build (myargp, &excapa, &flags);
120 120
121 mu_cfg_tree_create (&mu_argp_tree); 121 mu_cfg_tree_create (&mu_argp_tree);
122 rc = argp_parse (argp, argc, argv, flags, pindex, data); 122 rc = argp_parse (argp, argc, argv, flags, pindex, data);
......
...@@ -210,3 +210,4 @@ static struct mu_cfg_param mu_debug_param[] = { ...@@ -210,3 +210,4 @@ static struct mu_cfg_param mu_debug_param[] = {
210 }; 210 };
211 211
212 DCL_CFG_CAPA (debug); 212 DCL_CFG_CAPA (debug);
213
......
...@@ -90,12 +90,14 @@ mu_libcfg_init (char **cnames) ...@@ -90,12 +90,14 @@ mu_libcfg_init (char **cnames)
90 if (!reserved_name (cnames[i])) 90 if (!reserved_name (cnames[i]))
91 { 91 {
92 struct mu_cfg_capa *cp = find_cfg_capa (cnames[i]); 92 struct mu_cfg_capa *cp = find_cfg_capa (cnames[i]);
93 if (!cp) 93 if (cp)
94 mu_error (_("unknown configuration group requested `%s'"),
95 cnames[i]);
96 else
97 mu_config_root_register_section (NULL, cp->name, NULL, 94 mu_config_root_register_section (NULL, cp->name, NULL,
98 cp->parser, cp->cfgparam); 95 cp->parser, cp->cfgparam);
96 #if 0
97 else
98 mu_error (_("unknown configuration group requested `%s'"),
99 cnames[i]);
100 #endif
99 } 101 }
100 } 102 }
101 } 103 }
......
...@@ -133,6 +133,7 @@ static struct argp argp = { ...@@ -133,6 +133,7 @@ static struct argp argp = {
133 }; 133 };
134 134
135 static const char *maidag_argp_capa[] = { 135 static const char *maidag_argp_capa[] = {
136 "mailutils",
136 "auth", 137 "auth",
137 "common", 138 "common",
138 "debug", 139 "debug",
......
...@@ -229,6 +229,7 @@ static struct argp argp = { ...@@ -229,6 +229,7 @@ static struct argp argp = {
229 }; 229 };
230 230
231 static const char *mail_capa[] = { 231 static const char *mail_capa[] = {
232 "mailutils",
232 "common", 233 "common",
233 "debug", 234 "debug",
234 "mailbox", 235 "mailbox",
......
...@@ -42,6 +42,7 @@ static struct argp_option options[] = { ...@@ -42,6 +42,7 @@ static struct argp_option options[] = {
42 }; 42 };
43 43
44 static const char *argp_capa[] = { 44 static const char *argp_capa[] = {
45 "mailutils",
45 "common", 46 "common",
46 "debug", 47 "debug",
47 "mailbox", 48 "mailbox",
......
...@@ -176,6 +176,7 @@ struct mu_cfg_param mimeview_cfg_param[] = { ...@@ -176,6 +176,7 @@ struct mu_cfg_param mimeview_cfg_param[] = {
176 176
177 177
178 static const char *capa[] = { 178 static const char *capa[] = {
179 "mailutils",
179 "common", 180 "common",
180 "debug", 181 "debug",
181 NULL 182 NULL
......
...@@ -409,6 +409,7 @@ struct mu_cfg_param movemail_cfg_param[] = { ...@@ -409,6 +409,7 @@ struct mu_cfg_param movemail_cfg_param[] = {
409 409
410 410
411 static const char *movemail_capa[] = { 411 static const char *movemail_capa[] = {
412 "mailutils",
412 "common", 413 "common",
413 "debug", 414 "debug",
414 "locking", 415 "locking",
......
1 mu 1 mailutils
2 mu-setup.c 2 mu-setup.c
3 mu-setup.h 3 mu-setup.h
4 mailutils-config
......
...@@ -15,18 +15,9 @@ ...@@ -15,18 +15,9 @@
15 ## You should have received a copy of the GNU General Public License 15 ## You should have received a copy of the GNU General Public License
16 ## along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>. 16 ## along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
17 17
18 bin_PROGRAMS = mu 18 bin_PROGRAMS = mailutils
19 bin_SCRIPTS = mailutils-config 19 bin_SCRIPTS = mailutils-config
20 20
21 CLEANFILES=mailutils-config
22 mailutils-config: $(top_srcdir)/mu/mailutils-config.in
23 $(AM_V_GEN)muname=mu; \
24 test -n "$(transform)" && \
25 muname=`echo $$muname | \
26 sed -e 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
27 sed 's/MUNAME/'$$muname'/g' $(top_srcdir)/mu/mailutils-config.in > mailutils-config
28
29
30 IDLE_MODULES= 21 IDLE_MODULES=
31 22
32 if MU_COND_SUPPORT_POP 23 if MU_COND_SUPPORT_POP
...@@ -71,7 +62,7 @@ MODULES = \ ...@@ -71,7 +62,7 @@ MODULES = \
71 $(SMTP_C)\ 62 $(SMTP_C)\
72 wicket.c 63 wicket.c
73 64
74 mu_SOURCES = \ 65 mailutils_SOURCES = \
75 dispatch.c\ 66 dispatch.c\
76 getans.c\ 67 getans.c\
77 getarg.c\ 68 getarg.c\
...@@ -83,7 +74,7 @@ mu_SOURCES = \ ...@@ -83,7 +74,7 @@ mu_SOURCES = \
83 verbose.c\ 74 verbose.c\
84 $(MODULES) 75 $(MODULES)
85 76
86 mu_LDADD = \ 77 mailutils_LDADD = \
87 ${MU_APP_LIBRARIES}\ 78 ${MU_APP_LIBRARIES}\
88 ${MU_LIB_MBOX}\ 79 ${MU_LIB_MBOX}\
89 ${MU_LIB_IMAP}\ 80 ${MU_LIB_IMAP}\
...@@ -110,12 +101,12 @@ AM_CPPFLAGS = \ ...@@ -110,12 +101,12 @@ AM_CPPFLAGS = \
110 -DDBMLIBS="\"$(DBMLIBS)\"" 101 -DDBMLIBS="\"$(DBMLIBS)\""
111 102
112 BUILT_SOURCES=mu-setup.c mu-setup.h 103 BUILT_SOURCES=mu-setup.c mu-setup.h
113 EXTRA_DIST=mu-setup.awk mu-setup.c mu-setup.h template.c mailutils-config.in 104 EXTRA_DIST=mu-setup.awk mu-setup.c mu-setup.h template.c mailutils-config
114 105
115 mu-setup.h: Makefile.am $(MODULES) $(IDLE_MODULES) 106 mu-setup.h: Makefile.am $(MODULES) $(IDLE_MODULES)
116 $(AM_V_GEN)$(AWK) -f $(top_srcdir)/mu/mu-setup.awk -v mode=h \ 107 $(AM_V_GEN)$(AWK) -f $(srcdir)/mu-setup.awk -v mode=h \
117 $(MODULES) $(IDLE_MODULES) > mu-setup.h 108 $(MODULES) $(IDLE_MODULES) > mu-setup.h
118 109
119 mu-setup.c: Makefile.am $(MODULES) 110 mu-setup.c: Makefile.am $(MODULES)
120 $(AM_V_GEN)$(AWK) -f $(top_srcdir)/mu/mu-setup.awk -v mode=c \ 111 $(AM_V_GEN)$(AWK) -f $(srcdir)/mu-setup.awk -v mode=c \
121 $(MODULES) $(IDLE_MODULES) > mu-setup.c 112 $(MODULES) $(IDLE_MODULES) > mu-setup.c
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
21 #include <string.h> 21 #include <string.h>
22 #include <mailutils/alloc.h> 22 #include <mailutils/alloc.h>
23 #include <mailutils/stream.h> 23 #include <mailutils/stream.h>
24 #include <mailutils/stdstream.h>
24 #include <mailutils/nls.h> 25 #include <mailutils/nls.h>
25 #include "mu.h" 26 #include "mu.h"
26 #include "mu-setup.h" 27 #include "mu-setup.h"
...@@ -60,11 +61,13 @@ dispatch_docstring (const char *text) ...@@ -60,11 +61,13 @@ dispatch_docstring (const char *text)
60 mu_memory_stream_create (&str, MU_STREAM_RDWR); 61 mu_memory_stream_create (&str, MU_STREAM_RDWR);
61 mu_stream_printf (str, "%s\n%s\n\n", text, _("Commands are:")); 62 mu_stream_printf (str, "%s\n%s\n\n", text, _("Commands are:"));
62 for (p = mutool_action_tab; p->name; p++) 63 for (p = mutool_action_tab; p->name; p++)
63 mu_stream_printf (str, " mu %-16s - %s\n", 64 mu_stream_printf (str, " %s %-16s - %s\n",
65 mu_program_name,
64 p->name, gettext (p->docstring)); 66 p->name, gettext (p->docstring));
65 mu_stream_printf (str, "\n%s\n\n", 67 mu_stream_printf (str,
66 _("Try `mu COMMAND --help' to get help on a particular " 68 _("\nTry `%s COMMAND --help' to get help on a particular "
67 "COMMAND.")); 69 "COMMAND.\n\n"),
70 mu_program_name);
68 mu_stream_printf (str, "%s\n", _("Options are:")); 71 mu_stream_printf (str, "%s\n", _("Options are:"));
69 mu_stream_flush (str); 72 mu_stream_flush (str);
70 mu_stream_size (str, &size); 73 mu_stream_size (str, &size);
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
23 mode= 23 mode=
24 file= 24 file=
25 dir=`expr "$0" : '\(.*\)/.*'` 25 dir=`expr "$0" : '\(.*\)/.*'`
26 muname=MUNAME 26 muname=mailutils
27 27
28 test -n "$dir" && PATH=$PATH:$dir 28 test -n "$dir" && PATH=$PATH:$dir
29 29
...@@ -94,7 +94,7 @@ do ...@@ -94,7 +94,7 @@ do
94 usage 94 usage
95 ;; 95 ;;
96 -V|--version|--versio|--versi|--vers|--ver|--ve|--v) 96 -V|--version|--versio|--versi|--vers|--ver|--ve|--v)
97 $muname --version | sed -n '1{s/^MUNAME/mailutils-config/;s/(\(GNU Mailutils\)) \([0-9][0-9.]*\).*/(\1 \2)/;p}' 97 $muname --version | sed -n '1{s/^mailutils/mailutils-config/;s/(\(GNU Mailutils\)) \([0-9][0-9.]*\).*/(\1 \2)/;p}'
98 exit 0 98 exit 0
99 ;; 99 ;;
100 *) 100 *)
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
25 #include "mu.h" 25 #include "mu.h"
26 26
27 static char args_doc[] = N_("COMMAND [CMDOPTS]"); 27 static char args_doc[] = N_("COMMAND [CMDOPTS]");
28 static char doc[] = N_("mu -- GNU Mailutils multi-purpose tool."); 28 static char doc[] = N_("GNU Mailutils multi-purpose tool.");
29 29
30 static struct argp_option options[] = { 30 static struct argp_option options[] = {
31 { NULL } 31 { NULL }
...@@ -52,7 +52,7 @@ mu_help_filter (int key, const char *text, void *input) ...@@ -52,7 +52,7 @@ mu_help_filter (int key, const char *text, void *input)
52 case ARGP_KEY_HELP_PRE_DOC: 52 case ARGP_KEY_HELP_PRE_DOC:
53 s = dispatch_docstring (text); 53 s = dispatch_docstring (text);
54 break; 54 break;
55 55
56 default: 56 default:
57 s = (char*) text; 57 s = (char*) text;
58 } 58 }
...@@ -71,6 +71,7 @@ static struct argp argp = { ...@@ -71,6 +71,7 @@ static struct argp argp = {
71 }; 71 };
72 72
73 static const char *mu_tool_capa[] = { 73 static const char *mu_tool_capa[] = {
74 "mailutils",
74 "common", 75 "common",
75 "debug", 76 "debug",
76 "locking", 77 "locking",
......
...@@ -281,6 +281,7 @@ static struct argp argp = { ...@@ -281,6 +281,7 @@ static struct argp argp = {
281 }; 281 };
282 282
283 static const char *pop3d_argp_capa[] = { 283 static const char *pop3d_argp_capa[] = {
284 "mailutils",
284 "auth", 285 "auth",
285 "common", 286 "common",
286 "debug", 287 "debug",
......
...@@ -96,6 +96,7 @@ static struct argp argp = { ...@@ -96,6 +96,7 @@ static struct argp argp = {
96 }; 96 };
97 97
98 static const char *popauth_argp_capa[] = { 98 static const char *popauth_argp_capa[] = {
99 "mailutils",
99 "common", 100 "common",
100 NULL 101 NULL
101 }; 102 };
......
...@@ -57,6 +57,7 @@ static struct argp argp = { ...@@ -57,6 +57,7 @@ static struct argp argp = {
57 }; 57 };
58 58
59 static const char *readmsg_argp_capa[] = { 59 static const char *readmsg_argp_capa[] = {
60 "mailutils",
60 "common", 61 "common",
61 "debug", 62 "debug",
62 "mailbox", 63 "mailbox",
......
...@@ -309,6 +309,7 @@ static struct mu_cfg_param sieve_cfg_param[] = { ...@@ -309,6 +309,7 @@ static struct mu_cfg_param sieve_cfg_param[] = {
309 309
310 static const char *sieve_argp_capa[] = 310 static const char *sieve_argp_capa[] =
311 { 311 {
312 "mailutils",
312 "common", 313 "common",
313 "debug", 314 "debug",
314 "mailbox", 315 "mailbox",
......