commit-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Mailutils branch, master, updated. release-2.2-720-gb60a569


From: Sergey Poznyakoff
Subject: [SCM] GNU Mailutils branch, master, updated. release-2.2-720-gb60a569
Date: Thu, 02 Jul 2015 13:50:32 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Mailutils".

http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=b60a56980c2a728618f65aaa72a84b5c5d018938

The branch, master has been updated
       via  b60a56980c2a728618f65aaa72a84b5c5d018938 (commit)
      from  df44a47997cfe1c0f9e33333f446fac0987be413 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b60a56980c2a728618f65aaa72a84b5c5d018938
Author: Sergey Poznyakoff <address@hidden>
Date:   Mon Jun 29 09:49:45 2015 +0300

    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.

-----------------------------------------------------------------------

Summary of changes:
 NEWS                                         |   37 ++++++-
 comsat/comsat.c                              |    1 +
 configure.ac                                 |    3 +-
 dotlock/dotlock.c                            |    1 +
 examples/muauth.c                            |    1 +
 examples/muemail.c                           |    1 +
 frm/frm.c                                    |    1 +
 frm/from.c                                   |    1 +
 imap4d/imap4d.c                              |    1 +
 include/mailutils/libargp.h                  |   10 ++-
 libmailutils/cfg/gocs.c                      |    1 +
 libmu_argp/Makefile.am                       |    1 +
 libmu_argp/cmdline.c                         |    3 +-
 libmu_argp/mailutils.c                       |  144 ++++++++++++++++++++++++++
 libmu_argp/mu_argp.c                         |   25 +++--
 libmu_argp/muinit.c                          |    4 +-
 libmu_cfg/common.c                           |    1 +
 libmu_cfg/init.c                             |   10 +-
 maidag/maidag.c                              |    1 +
 mail/mail.c                                  |    1 +
 messages/messages.c                          |    1 +
 mimeview/mimeview.c                          |    1 +
 movemail/movemail.c                          |    1 +
 mu/.gitignore                                |    3 +-
 mu/Makefile.am                               |   21 +---
 mu/dispatch.c                                |   11 ++-
 mu/{mailutils-config.in => mailutils-config} |    4 +-
 mu/mu.c                                      |    5 +-
 pop3d/pop3d.c                                |    1 +
 pop3d/popauth.c                              |    1 +
 readmsg/readmsg.c                            |    1 +
 sieve/sieve.c                                |    1 +
 32 files changed, 250 insertions(+), 49 deletions(-)
 create mode 100644 libmu_argp/mailutils.c
 rename mu/{mailutils-config.in => mailutils-config} (95%)
 mode change 100644 => 100755

diff --git a/NEWS b/NEWS
index a1367de..52dd05d 100644
--- a/NEWS
+++ b/NEWS
@@ -1,11 +1,11 @@
-GNU mailutils NEWS -- history of user-visible changes. 2013-04-12
+GNU mailutils NEWS -- history of user-visible changes. 2015-07-02
 Copyright (C) 2002-2015 Free Software Foundation, Inc.
 See the end of file for copying conditions.
 
 Please send mailutils bug reports to <address@hidden>.
 
 
-Version 2.99.98 (Git)
+Version 2.99.99 (Git)
 
 This version is a major rewrite of GNU Mailutils.  Quite a few parts
 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.
 
 See <http://mailutils.org/wiki/libmu_dbm>.
 
-** New utility `mu'
+** New utility `mailutils'
 
-`Mu' is a multi-purpose tool which can be of use to users, programmers
+Multi-purpose tool which can be of use to users, programmers
 and system administrators.  It allows you to retrieve information
 about Mailutils configuration, check ACLs and authentication tickets,
 list, create or modify DBM files, construct filters of arbitrary
@@ -100,7 +100,7 @@ pipes the message (or any part thereof) to it.
 See <http://mailutils.org/wiki/Pipe>.
 
 A similar test uses the program exit code to decide what to do with
-the message
+the message.
 
 See <http://mailutils.org/wiki/Pipe_test>.
 
@@ -252,7 +252,32 @@ the "mail" utility:
 ** The --with-mailbindir option
 
 This option changes installation directory for the "mail" utility.
-  
+
+The following command will configure Mailutils to build only a
+statically-linked copy of the "mail" utility and install it to
+/bin:
+
+ ./configure \
+   LDFLAGS=-static\
+   --enable-build-mail\
+   --with-mailbindir='/bin'\
+   --disable-shared\
+   --disable-virtual-domains\
+   --disable-python\
+   --disable-pam\
+   --disable-cxx\
+   --disable-build-servers\
+   --disable-build-clients\
+   --without-gsasl\
+   --without-tcp-wrappers\
+   --without-fribidi\
+   --without-mysql\
+   --without-postgres\
+   --without-odbc\
+   --without-ldap\
+   --without-guile\
+   --without-dbm
+
 ** DBM options
 
 It is normally not needed to specify --with-gdbm, --with-berkeley-db
diff --git a/comsat/comsat.c b/comsat/comsat.c
index 5b23280..31bb569 100644
--- a/comsat/comsat.c
+++ b/comsat/comsat.c
@@ -89,6 +89,7 @@ static struct argp argp = {
 };
 
 static const char *comsat_argp_capa[] = {
+  "mailutils",
   "common",
   "debug",
   "logging",
diff --git a/configure.ac b/configure.ac
index ac70652..fa26b6e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,7 +16,8 @@ dnl You should have received a copy of the GNU General Public 
License along
 dnl with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>.
 
 AC_PREREQ(2.63)
-AC_INIT([GNU Mailutils], [2.99.98], address@hidden, [mailutils])
+AC_INIT([GNU Mailutils], [2.99.99], address@hidden, [mailutils],
+        [http://mailutils.org])
 AC_CONFIG_SRCDIR([libmailutils/mailbox/mailbox.c])
 AC_CONFIG_AUX_DIR([build-aux])
 AM_INIT_AUTOMAKE([gnits 1.11 dist-bzip2 dist-xz std-options silent-rules])
diff --git a/dotlock/dotlock.c b/dotlock/dotlock.c
index 628f37f..16ec56e 100644
--- a/dotlock/dotlock.c
+++ b/dotlock/dotlock.c
@@ -134,6 +134,7 @@ struct mu_cfg_param dotlock_cfg_param[] = {
 
 
 const char *dotlock_capa[] = {
+  "mailutils",
   "common",
   "debug",
   NULL
diff --git a/examples/muauth.c b/examples/muauth.c
index 1cf1068..e8bf543 100644
--- a/examples/muauth.c
+++ b/examples/muauth.c
@@ -31,6 +31,7 @@ static char doc[] =
 static char args_doc[] = "key";
 
 static const char *capa[] = {
+  "mailutils",
   "auth",
   "common",
   "debug",
diff --git a/examples/muemail.c b/examples/muemail.c
index e673b35..b28238e 100644
--- a/examples/muemail.c
+++ b/examples/muemail.c
@@ -24,6 +24,7 @@
 #include "mailutils/libargp.h"
 
 const char *capa[] = {
+  "mailutils",
   "address",
   NULL
 };
diff --git a/frm/frm.c b/frm/frm.c
index 574f340..dcda921 100644
--- a/frm/frm.c
+++ b/frm/frm.c
@@ -201,6 +201,7 @@ static struct argp argp = {
 };
 
 static const char *frm_argp_capa[] = {
+  "mailutils",
   "common",
   "debug",
   "mailbox",
diff --git a/frm/from.c b/frm/from.c
index d4eceb6..31f317c 100644
--- a/frm/from.c
+++ b/frm/from.c
@@ -68,6 +68,7 @@ static struct argp argp = {
 };
 
 static const char *capa[] = {
+  "mailutils",
   "common",
   "debug",
   "mailbox",
diff --git a/imap4d/imap4d.c b/imap4d/imap4d.c
index 2f3020b..4dc4cac 100644
--- a/imap4d/imap4d.c
+++ b/imap4d/imap4d.c
@@ -89,6 +89,7 @@ static struct argp argp = {
 };
 
 static const char *imap4d_capa[] = {
+  "mailutils",
   "auth",
   "common",
   "debug",
diff --git a/include/mailutils/libargp.h b/include/mailutils/libargp.h
index f556e4f..9e1b105 100644
--- a/include/mailutils/libargp.h
+++ b/include/mailutils/libargp.h
@@ -39,12 +39,14 @@ struct mu_cmdline_capa
 {
   char *name;
   struct argp_child *child;
+  void (*modflags) (int *);
 };
 
 extern int mu_help_config_mode;
 extern int mu_rcfile_lint;
 extern int (*mu_app_cfg_verifier) (void);
-  
+
+extern struct mu_cmdline_capa mu_mailutils_cmdline;
 extern struct mu_cmdline_capa mu_common_cmdline;
 extern struct mu_cmdline_capa mu_logging_cmdline;
 extern struct mu_cmdline_capa mu_mailbox_cmdline;
@@ -62,10 +64,12 @@ extern struct mu_cmdline_capa mu_virtdomain_cmdline;
 
 extern void mu_libargp_init (void);
   
-extern struct argp *mu_argp_build (const struct argp *argp, char ***pcapa);
+extern struct argp *mu_argp_build (const struct argp *argp, char ***pcapa,
+                                  int *flags);
 extern void mu_argp_done (struct argp *argp);
   
-extern int mu_register_argp_capa (const char *name, struct argp_child *child);
+extern int mu_register_argp_capa (const char *name, struct argp_child *child,
+                                 void (*modflags) (int*));
 
 void mu_argp_init (const char *vers, const char *bugaddr);
 int mu_app_init (struct argp *myargp, const char **capa,
diff --git a/libmailutils/cfg/gocs.c b/libmailutils/cfg/gocs.c
index 4c2fc15..29317a8 100644
--- a/libmailutils/cfg/gocs.c
+++ b/libmailutils/cfg/gocs.c
@@ -285,6 +285,7 @@ find_init_function (struct mu_gocs_entry *tab, const char 
*capa)
 }
 
 static struct mu_gocs_entry std_gocs_table[] = {
+  { "mailutils", mu_gocs_dummy },
   { "common", mu_gocs_dummy },
   { "mailbox", mu_gocs_mailbox_init },
   { "locking", mu_gocs_locking_init },
diff --git a/libmu_argp/Makefile.am b/libmu_argp/Makefile.am
index 5f380c1..92a52fb 100644
--- a/libmu_argp/Makefile.am
+++ b/libmu_argp/Makefile.am
@@ -29,6 +29,7 @@ libmu_argp_la_SOURCES =\
  cmdline.c\
  cmdline.h\
  common.c\
+ mailutils.c\
  mu_argp.c\
  muinit.c\
  sieve.c
diff --git a/libmu_argp/cmdline.c b/libmu_argp/cmdline.c
index 7e5e271..61f2737 100644
--- a/libmu_argp/cmdline.c
+++ b/libmu_argp/cmdline.c
@@ -22,6 +22,7 @@
 #include "cmdline.h"
 
 static struct mu_cmdline_capa *all_cmdline_capa[] = {
+  &mu_mailutils_cmdline,
   &mu_common_cmdline,
   &mu_logging_cmdline,
   &mu_mailer_cmdline,
@@ -42,7 +43,7 @@ mu_libargp_init ()
   for (cpp = all_cmdline_capa; *cpp; cpp++)
     {
       struct mu_cmdline_capa *cp = *cpp;
-      if (mu_register_argp_capa (cp->name, cp->child))
+      if (mu_register_argp_capa (cp->name, cp->child, cp->modflags))
        {
          mu_error (_("INTERNAL ERROR: cannot register argp capability `%s'"),
                    cp->name);
diff --git a/libmu_argp/mailutils.c b/libmu_argp/mailutils.c
new file mode 100644
index 0000000..5606236
--- /dev/null
+++ b/libmu_argp/mailutils.c
@@ -0,0 +1,144 @@
+/* GNU Mailutils -- a suite of utilities for electronic mail
+   Copyright (C) 2007-2012, 2014-2015 Free Software Foundation, Inc.
+
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 3 of the License, or (at your option) any later version.
+
+   This library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General
+   Public License along with this library.  If not, see
+   <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+#include "cmdline.h"
+#include <unistd.h>
+#include <stdlib.h>
+
+
+/* ************************************************************************* */
+/* GNU Mailutils help and version output                                     */
+/* ************************************************************************* */
+
+#define OPT_PROGNAME    -2
+#define OPT_USAGE       -3
+#define OPT_HANG        -4
+
+static struct argp_option mu_mailutils_argp_options[] = 
+{
+  {"help",        '?',          0, 0,  N_("give this help list"), -1},
+  {"usage",       OPT_USAGE,    0, 0,  N_("give a short usage message"), 0},
+  {"version",     'V',          0, 0,  N_("print program version"), -1},
+  {"program-name",OPT_PROGNAME,N_("NAME"), OPTION_HIDDEN, N_("set the program 
name"), 0},
+  {"HANG",        OPT_HANG,    N_("SECS"), OPTION_ARG_OPTIONAL | OPTION_HIDDEN,
+     N_("hang for SECS seconds (default 3600)"), 0},
+  { NULL }
+};
+
+static error_t
+mu_mailutils_argp_parser (int key, char *arg, struct argp_state *state)
+{
+  switch (key)
+    {
+    case '?':
+      argp_state_help (state, state->out_stream,
+                      ARGP_HELP_SHORT_USAGE | ARGP_HELP_LONG | ARGP_HELP_DOC);
+      /* TRANSLATORS: The placeholder indicates the bug-reporting address
+        for this package.  Please add _another line_ saying
+        "Report translation bugs to <...>\n" with the address for translation
+        bugs (typically your translation team's web or email address).  */
+      printf (_("\nReport bugs to: %s\n"), "<" PACKAGE_BUGREPORT ">");
+      
+#ifdef PACKAGE_PACKAGER_BUG_REPORTS
+      printf (_("Report %s bugs to: %s\n"), PACKAGE_PACKAGER,
+             PACKAGE_PACKAGER_BUG_REPORTS);
+#endif
+      
+#ifdef PACKAGE_URL
+      printf (_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL);
+#endif
+      fputs (_("General help using GNU software: 
<http://www.gnu.org/gethelp/>\n"),
+       stdout);
+      exit (0);
+
+    case OPT_USAGE:
+      argp_state_help (state, state->out_stream,
+                      ARGP_HELP_USAGE | ARGP_HELP_EXIT_OK);
+      break;
+
+    case 'V':
+      if (argp_program_version_hook)
+        (*argp_program_version_hook) (state->out_stream, state);
+      else if (argp_program_version)
+        fprintf (state->out_stream, "%s\n", argp_program_version);
+      else
+        argp_error (state, "%s",
+                   dgettext (state->root_argp->argp_domain,
+                             "(PROGRAM ERROR) No version known!?"));
+      exit(0);
+      
+    case OPT_PROGNAME:          /* Set the program name.  */
+#if HAVE_DECL_PROGRAM_INVOCATION_NAME
+      program_invocation_name = arg;
+#endif
+      /* Update what we use for messages.  */
+      state->name = __argp_base_name (arg);
+
+#if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
+      program_invocation_short_name = state->name;
+#endif
+
+      if ((state->flags & (ARGP_PARSE_ARGV0 | ARGP_NO_ERRS))
+         == ARGP_PARSE_ARGV0)
+        /* Update what getopt uses too.  */
+        state->argv[0] = arg;
+      break;
+
+    case OPT_HANG:
+      {
+       int hang = atoi (arg ? arg : "3600");
+       while (hang-- > 0)
+         sleep (1);
+       break;      
+      }
+      
+    default:
+      return ARGP_ERR_UNKNOWN;
+    }
+  return 0;
+}
+
+struct argp mu_mailutils_argp = {
+  mu_mailutils_argp_options,
+  mu_mailutils_argp_parser,
+};
+
+struct argp_child mu_mailutils_argp_child = {
+  &mu_mailutils_argp,
+  0,
+  NULL,
+  -1,
+};
+
+static void
+mu_mailutils_modflags(int *flags)
+{
+  *flags |= ARGP_NO_HELP;
+}
+
+struct mu_cmdline_capa mu_mailutils_cmdline = {
+  "mailutils", &mu_mailutils_argp_child, mu_mailutils_modflags
+};
+
+
+    
+
+
+  
diff --git a/libmu_argp/mu_argp.c b/libmu_argp/mu_argp.c
index b4d3195..1379e2c 100644
--- a/libmu_argp/mu_argp.c
+++ b/libmu_argp/mu_argp.c
@@ -41,12 +41,14 @@
 struct argp_capa {
   char *capability;
   struct argp_child *child;
+  void (*modflags)(int*);
 } mu_argp_capa[MU_MAX_CAPA] = {
   {NULL,}
 };
 
 int
-mu_register_argp_capa (const char *name, struct argp_child *child)
+mu_register_argp_capa (const char *name, struct argp_child *child,
+                      void (*modflags)(int*))
 {
   int i;
   
@@ -56,6 +58,7 @@ mu_register_argp_capa (const char *name, struct argp_child 
*child)
         if ((mu_argp_capa[i].capability = strdup (name)) == NULL)
           return ENOMEM;
        mu_argp_capa[i].child = child;
+       mu_argp_capa[i].modflags = modflags;
        return 0;
       }
   return 1;
@@ -72,7 +75,7 @@ find_capa (const char *name)
 }
 
 static struct argp *
-mu_build_argp (const struct argp *template, char **capa)
+mu_build_argp (const struct argp *template, char **capa, int *flags)
 {
   int n;
   int nchild;
@@ -115,9 +118,17 @@ mu_build_argp (const struct argp *template, char **capa)
       struct argp_capa *cp = find_capa (capa[n]);
       if (cp)
        {
-         ap[nchild] = *cp->child;
-         ap[nchild].group = group++;
-         nchild++;
+         if (cp->modflags)
+           cp->modflags (flags);
+         if (cp->child)
+           {
+             ap[nchild] = *cp->child;
+             if (ap[nchild].group < 0)
+               ap[nchild].group = 0;
+             else
+               ap[nchild].group = group++;
+             nchild++;
+           }
        }
     }
   ap[nchild].argp = NULL;
@@ -191,7 +202,7 @@ argp_reg_action (void *item, void *data)
 }
 
 struct argp *
-mu_argp_build (const struct argp *init_argp, char ***pcapa)
+mu_argp_build (const struct argp *init_argp, char ***pcapa, int *flags)
 {
   struct cap_buf cb;
   struct argp *argp;
@@ -200,7 +211,7 @@ mu_argp_build (const struct argp *init_argp, char ***pcapa)
   mu_gocs_enumerate (argp_reg_action, &cb);
   cap_buf_add (&cb, NULL);
   mu_libargp_init ();
-  argp = mu_build_argp (init_argp, cb.capa);
+  argp = mu_build_argp (init_argp, cb.capa, flags);
   if (pcapa)
     *pcapa = cb.capa;
   else
diff --git a/libmu_argp/muinit.c b/libmu_argp/muinit.c
index f9dc5c2..cfdf5b0 100644
--- a/libmu_argp/muinit.c
+++ b/libmu_argp/muinit.c
@@ -35,7 +35,7 @@ const char version_etc_copyright[] =
   /* Do *not* mark this string for translation.  %s is a copyright
      symbol suitable for this locale, and %d is the copyright
      year.  */
-  "Copyright %s 2007-2014 Free Software Foundation, inc.";
+  "Copyright %s 2007-2015 Free Software Foundation, inc.";
 
 void
 mu_program_version_hook (FILE *stream, struct argp_state *state)
@@ -116,7 +116,7 @@ mu_app_init (struct argp *myargp, const char **capa,
       mu_gocs_register_std (capa[i]); /*FIXME*/
   if (!myargp)
     myargp = &argpnull;
-  argp = mu_argp_build (myargp, &excapa);
+  argp = mu_argp_build (myargp, &excapa, &flags);
 
   mu_cfg_tree_create (&mu_argp_tree);
   rc = argp_parse (argp, argc, argv, flags, pindex, data);
diff --git a/libmu_cfg/common.c b/libmu_cfg/common.c
index d4145b4..2a9d62d 100644
--- a/libmu_cfg/common.c
+++ b/libmu_cfg/common.c
@@ -210,3 +210,4 @@ static struct mu_cfg_param mu_debug_param[] = {
 };
 
 DCL_CFG_CAPA (debug);
+
diff --git a/libmu_cfg/init.c b/libmu_cfg/init.c
index 3669650..ba9ed56 100644
--- a/libmu_cfg/init.c
+++ b/libmu_cfg/init.c
@@ -90,12 +90,14 @@ mu_libcfg_init (char **cnames)
       if (!reserved_name (cnames[i]))
        {
          struct mu_cfg_capa *cp = find_cfg_capa (cnames[i]);
-         if (!cp)
-           mu_error (_("unknown configuration group requested `%s'"),
-                     cnames[i]);
-         else
+         if (cp)
            mu_config_root_register_section (NULL, cp->name, NULL,
                                             cp->parser, cp->cfgparam);
+#if 0
+         else
+           mu_error (_("unknown configuration group requested `%s'"),
+                     cnames[i]);
+#endif
        }
     }
 }
diff --git a/maidag/maidag.c b/maidag/maidag.c
index 8964cc7..32869e3 100644
--- a/maidag/maidag.c
+++ b/maidag/maidag.c
@@ -133,6 +133,7 @@ static struct argp argp = {
 };
 
 static const char *maidag_argp_capa[] = {
+  "mailutils",
   "auth",
   "common",
   "debug",
diff --git a/mail/mail.c b/mail/mail.c
index 2d50917..ad728a7 100644
--- a/mail/mail.c
+++ b/mail/mail.c
@@ -229,6 +229,7 @@ static struct argp argp = {
 };
 
 static const char *mail_capa[] = {
+  "mailutils",
   "common",
   "debug",
   "mailbox",
diff --git a/messages/messages.c b/messages/messages.c
index e0ce7f5..da12c12 100644
--- a/messages/messages.c
+++ b/messages/messages.c
@@ -42,6 +42,7 @@ static struct argp_option options[] = {
 };
 
 static const char *argp_capa[] = {
+  "mailutils",
   "common",
   "debug",
   "mailbox",
diff --git a/mimeview/mimeview.c b/mimeview/mimeview.c
index 347c28d..42a6c94 100644
--- a/mimeview/mimeview.c
+++ b/mimeview/mimeview.c
@@ -176,6 +176,7 @@ struct mu_cfg_param mimeview_cfg_param[] = {
 
 
 static const char *capa[] = {
+  "mailutils",
   "common",
   "debug",
   NULL
diff --git a/movemail/movemail.c b/movemail/movemail.c
index 820a35c..29c2302 100644
--- a/movemail/movemail.c
+++ b/movemail/movemail.c
@@ -409,6 +409,7 @@ struct mu_cfg_param movemail_cfg_param[] = {
 
 
 static const char *movemail_capa[] = {
+  "mailutils",
   "common",
   "debug",
   "locking",
diff --git a/mu/.gitignore b/mu/.gitignore
index de89b9a..a8c5364 100644
--- a/mu/.gitignore
+++ b/mu/.gitignore
@@ -1,4 +1,3 @@
-mu
+mailutils
 mu-setup.c
 mu-setup.h
-mailutils-config
diff --git a/mu/Makefile.am b/mu/Makefile.am
index ec15ed2..42fbd74 100644
--- a/mu/Makefile.am
+++ b/mu/Makefile.am
@@ -15,18 +15,9 @@
 ## You should have received a copy of the GNU General Public License
 ## along with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>.
 
-bin_PROGRAMS = mu
+bin_PROGRAMS = mailutils
 bin_SCRIPTS = mailutils-config
 
-CLEANFILES=mailutils-config
-mailutils-config: $(top_srcdir)/mu/mailutils-config.in
-       $(AM_V_GEN)muname=mu; \
-             test -n "$(transform)" && \
-               muname=`echo $$muname | \
-                     sed -e 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-       sed 's/MUNAME/'$$muname'/g' $(top_srcdir)/mu/mailutils-config.in > 
mailutils-config
-
-
 IDLE_MODULES=
 
 if MU_COND_SUPPORT_POP
@@ -71,7 +62,7 @@ MODULES = \
  $(SMTP_C)\
  wicket.c
 
-mu_SOURCES = \
+mailutils_SOURCES = \
  dispatch.c\
  getans.c\
  getarg.c\
@@ -83,7 +74,7 @@ mu_SOURCES = \
  verbose.c\
  $(MODULES)
 
-mu_LDADD = \
+mailutils_LDADD = \
  ${MU_APP_LIBRARIES}\
  ${MU_LIB_MBOX}\
  ${MU_LIB_IMAP}\
@@ -110,12 +101,12 @@ AM_CPPFLAGS = \
   -DDBMLIBS="\"$(DBMLIBS)\""
 
 BUILT_SOURCES=mu-setup.c mu-setup.h
-EXTRA_DIST=mu-setup.awk mu-setup.c mu-setup.h template.c mailutils-config.in
+EXTRA_DIST=mu-setup.awk mu-setup.c mu-setup.h template.c mailutils-config
 
 mu-setup.h: Makefile.am $(MODULES) $(IDLE_MODULES) 
-       $(AM_V_GEN)$(AWK) -f $(top_srcdir)/mu/mu-setup.awk -v mode=h \
+       $(AM_V_GEN)$(AWK) -f $(srcdir)/mu-setup.awk -v mode=h \
            $(MODULES) $(IDLE_MODULES) > mu-setup.h
 
 mu-setup.c: Makefile.am $(MODULES)
-       $(AM_V_GEN)$(AWK) -f $(top_srcdir)/mu/mu-setup.awk -v mode=c \
+       $(AM_V_GEN)$(AWK) -f $(srcdir)/mu-setup.awk -v mode=c \
            $(MODULES) $(IDLE_MODULES) > mu-setup.c
diff --git a/mu/dispatch.c b/mu/dispatch.c
index ec112ea..991bb4f 100644
--- a/mu/dispatch.c
+++ b/mu/dispatch.c
@@ -21,6 +21,7 @@
 #include <string.h>
 #include <mailutils/alloc.h>
 #include <mailutils/stream.h>
+#include <mailutils/stdstream.h>
 #include <mailutils/nls.h>
 #include "mu.h"
 #include "mu-setup.h"
@@ -60,11 +61,13 @@ dispatch_docstring (const char *text)
   mu_memory_stream_create (&str, MU_STREAM_RDWR);
   mu_stream_printf (str, "%s\n%s\n\n", text, _("Commands are:"));
   for (p = mutool_action_tab; p->name; p++)
-    mu_stream_printf (str, "  mu %-16s - %s\n",
+    mu_stream_printf (str, "  %s %-16s - %s\n",
+                     mu_program_name,
                      p->name, gettext (p->docstring));
-  mu_stream_printf (str, "\n%s\n\n",
-                   _("Try `mu COMMAND --help' to get help on a particular "
-                     "COMMAND."));
+  mu_stream_printf (str,
+                     _("\nTry `%s COMMAND --help' to get help on a particular "
+                     "COMMAND.\n\n"),
+                     mu_program_name);
   mu_stream_printf (str, "%s\n", _("Options are:"));
   mu_stream_flush (str);
   mu_stream_size (str, &size);
diff --git a/mu/mailutils-config.in b/mu/mailutils-config
old mode 100644
new mode 100755
similarity index 95%
rename from mu/mailutils-config.in
rename to mu/mailutils-config
index 6c3877b..e4690b4
--- a/mu/mailutils-config.in
+++ b/mu/mailutils-config
@@ -23,7 +23,7 @@
 mode=
 file=
 dir=`expr "$0" : '\(.*\)/.*'`
-muname=MUNAME
+muname=mailutils
 
 test -n "$dir" && PATH=$PATH:$dir
 
@@ -94,7 +94,7 @@ do
     usage
     ;;
   -V|--version|--versio|--versi|--vers|--ver|--ve|--v)
-    $muname --version | sed -n '1{s/^MUNAME/mailutils-config/;s/(\(GNU 
Mailutils\)) \([0-9][0-9.]*\).*/(\1 \2)/;p}'
+    $muname --version | sed -n '1{s/^mailutils/mailutils-config/;s/(\(GNU 
Mailutils\)) \([0-9][0-9.]*\).*/(\1 \2)/;p}'
     exit 0
     ;;
   *)
diff --git a/mu/mu.c b/mu/mu.c
index bb77458..1218dfe 100644
--- a/mu/mu.c
+++ b/mu/mu.c
@@ -25,7 +25,7 @@
 #include "mu.h"
 
 static char args_doc[] = N_("COMMAND [CMDOPTS]");
-static char doc[] = N_("mu -- GNU Mailutils multi-purpose tool.");
+static char doc[] = N_("GNU Mailutils multi-purpose tool.");
 
 static struct argp_option options[] = {
   { NULL }
@@ -52,7 +52,7 @@ mu_help_filter (int key, const char *text, void *input)
     case ARGP_KEY_HELP_PRE_DOC:
       s = dispatch_docstring (text);
       break;
-      
+
     default:
       s = (char*) text;
     }
@@ -71,6 +71,7 @@ static struct argp argp = {
 };
 
 static const char *mu_tool_capa[] = {
+  "mailutils",
   "common",
   "debug",
   "locking",
diff --git a/pop3d/pop3d.c b/pop3d/pop3d.c
index dfb9a55..c515b19 100644
--- a/pop3d/pop3d.c
+++ b/pop3d/pop3d.c
@@ -281,6 +281,7 @@ static struct argp argp = {
 };
 
 static const char *pop3d_argp_capa[] = {
+  "mailutils",
   "auth",
   "common",
   "debug",
diff --git a/pop3d/popauth.c b/pop3d/popauth.c
index 0b669d9..f550baa 100644
--- a/pop3d/popauth.c
+++ b/pop3d/popauth.c
@@ -96,6 +96,7 @@ static struct argp argp = {
 };
 
 static const char *popauth_argp_capa[] = {
+  "mailutils",
   "common",
   NULL
 };
diff --git a/readmsg/readmsg.c b/readmsg/readmsg.c
index 767c32f..a511b99 100644
--- a/readmsg/readmsg.c
+++ b/readmsg/readmsg.c
@@ -57,6 +57,7 @@ static struct argp argp = {
 };
 
 static const char *readmsg_argp_capa[] = {
+  "mailutils",
   "common",
   "debug",
   "mailbox",
diff --git a/sieve/sieve.c b/sieve/sieve.c
index 392c798..cf2c3c5 100644
--- a/sieve/sieve.c
+++ b/sieve/sieve.c
@@ -309,6 +309,7 @@ static struct mu_cfg_param sieve_cfg_param[] = {
 
 static const char *sieve_argp_capa[] =
 {
+  "mailutils",
   "common",
   "debug",
   "mailbox",


hooks/post-receive
-- 
GNU Mailutils



reply via email to

[Prev in Thread] Current Thread [Next in Thread]