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-163-g697384c


From: Sergey Poznyakoff
Subject: [SCM] GNU Mailutils branch, master, updated. release-2.2-163-g697384c
Date: Wed, 27 Oct 2010 16:08:00 +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=697384c64dadb0a4db97136a6cbcf2166c48897b

The branch, master has been updated
       via  697384c64dadb0a4db97136a6cbcf2166c48897b (commit)
       via  b24bf339e41212dfd1a0d88f76150ff0503b7bb2 (commit)
       via  48639a1c168835dd3d462b918f3720a1a70ef50a (commit)
      from  3327a23a49e532c068972a0b2d64021361540f7b (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 697384c64dadb0a4db97136a6cbcf2166c48897b
Author: Sergey Poznyakoff <address@hidden>
Date:   Wed Oct 27 19:03:17 2010 +0300

    Use mu_asprintf and mu_vasnprintf instead of asprintf and vasprintf.
    
    *gnulib.modules (snprintf, vasprintf): Remove.
    *sieve/tests/reject.at: Use AT_PACKAGE_VERSION instead of
    the hardcoded version number.
    *lib/mu_asprintf.h: Remove.
    
    * imap4d/auth_gss.c: Replace asprintf with mu_asprintf and vasprintf by
    mu_vasnprintf.
    * guimb/guimb.h: Likewise.
    * imap4d/imap4d.h: Likewise.
    * imap4d/unsubscribe.c: Likewise.
    * lib/Makefile.am
    * lib/mailcap.c: Likewise.
    * libmu_argp/muinit.c: Likewise.
    * maidag/deliver.c: Likewise.
    * maidag/maidag.h: Likewise.
    * mail/escape.c: Likewise.
    * mail/mail.c: Likewise.
    * mail/mail.h: Likewise.
    * mail/util.c: Likewise.
    * mail/write.c: Likewise.
    * mh/burst.c: Likewise.
    * mh/forw.c: Likewise.
    * mh/mh.h: Likewise.
    * mh/mh_alias.l: Likewise.
    * mh/mh_format.c: Likewise.
    * mh/mh_getopt.c: Likewise.
    * mh/mh_init.c: Likewise.
    * mh/mh_msgset.c: Likewise.
    * mh/mh_sequence.c: Likewise.
    * mh/mh_whatnow.c: Likewise.
    * mh/mhn.c: Likewise.
    * mh/send.c: Likewise.
    * mimeview/mimetypes.l: Likewise.
    * mimeview/mimetypes.y: Likewise.
    * mimeview/mimeview.c: Likewise.
    * movemail/movemail.c: Likewise.
    * mu/ldflags.c: Likewise.
    * pop3d/expire.c: Likewise.
    * pop3d/pop3d.h: Likewise.
    * sieve/sieve.c: Likewise.

commit b24bf339e41212dfd1a0d88f76150ff0503b7bb2
Author: Sergey Poznyakoff <address@hidden>
Date:   Wed Oct 27 16:31:35 2010 +0300

    Remove tcp wrapper configuration keywords that did not actually change 
anything.
    
    The allow_severity and deny_severity variables are valid only for tcpd and
    related applications, hosts_access does not use them.
    
    * lib/tcpwrap.c (mu_tcp_wrapper_cb_hosts_allow_syslog)
    (mu_tcp_wrapper_cb_hosts_deny_syslog): Remove functions.
    (allow_severity, deny_severity): Remove variables.
    (tcpwrapper_param): Remove allow-syslog-priority and
    deny-syslog-priority.

commit 48639a1c168835dd3d462b918f3720a1a70ef50a
Author: Sergey Poznyakoff <address@hidden>
Date:   Wed Oct 27 16:28:55 2010 +0300

    Version 2.9.90
    
    * NEWS, configure: Set version number to 2.9.90 to avoid confusion
    with 2.2.x branch.

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

Summary of changes:
 NEWS                  |    4 ++--
 configure.ac          |    2 +-
 gnulib.modules        |    2 --
 guimb/guimb.h         |    2 +-
 imap4d/auth_gss.c     |    4 ++--
 imap4d/imap4d.h       |    2 +-
 imap4d/unsubscribe.c  |    2 +-
 lib/Makefile.am       |    1 -
 lib/mailcap.c         |    2 +-
 lib/mu_asprintf.h     |   38 --------------------------------------
 lib/tcpwrap.c         |   36 ------------------------------------
 libmu_argp/muinit.c   |   20 ++++++++++----------
 maidag/deliver.c      |   18 +++++++++---------
 maidag/maidag.h       |    2 +-
 mail/escape.c         |    2 +-
 mail/mail.c           |    4 ++--
 mail/mail.h           |    2 +-
 mail/util.c           |   22 ++++++++++++----------
 mail/write.c          |    2 +-
 mh/burst.c            |    2 +-
 mh/forw.c             |    4 ++--
 mh/mh.h               |    4 ++--
 mh/mh_alias.l         |   12 +++++++-----
 mh/mh_format.c        |    4 ++--
 mh/mh_getopt.c        |   10 +++++-----
 mh/mh_init.c          |    7 ++++---
 mh/mh_msgset.c        |    4 ++--
 mh/mh_sequence.c      |    2 +-
 mh/mh_whatnow.c       |    4 ++--
 mh/mhn.c              |   12 ++++++------
 mh/send.c             |    4 ++--
 mimeview/mimetypes.l  |    2 +-
 mimeview/mimetypes.y  |   12 ++++++------
 mimeview/mimeview.c   |    2 +-
 movemail/movemail.c   |    5 ++---
 mu/ldflags.c          |    4 ++--
 pop3d/expire.c        |    2 +-
 pop3d/pop3d.h         |    2 +-
 sieve/sieve.c         |    2 +-
 sieve/tests/reject.at |    6 +++---
 40 files changed, 100 insertions(+), 173 deletions(-)
 delete mode 100644 lib/mu_asprintf.h

diff --git a/NEWS b/NEWS
index 8b255a4..db37c55 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-GNU mailutils NEWS -- history of user-visible changes. 2010-09-09
+GNU mailutils NEWS -- history of user-visible changes. 2010-10-27
 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
 Software Foundation, Inc.
 See the end of file for copying conditions.
@@ -6,7 +6,7 @@ See the end of file for copying conditions.
 Please send mailutils bug reports to <address@hidden>.
 
 
-Version 2.2.90 (Git)
+Version 2.9.90 (Git)
 
 This version is highly experimental.  It features a rewrite from
 scratch of the stream subsystem and other vital parts of the
diff --git a/configure.ac b/configure.ac
index 690171b..e20652d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,7 +17,7 @@ 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.2.90], address@hidden, [mailutils])
+AC_INIT([GNU Mailutils], [2.9.90], address@hidden, [mailutils])
 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/gnulib.modules b/gnulib.modules
index 6639959..cedbcb7 100644
--- a/gnulib.modules
+++ b/gnulib.modules
@@ -20,8 +20,6 @@ mbswidth
 obstack
 realloc
 setenv
-snprintf
 stdint
 strtok_r
-vasprintf
 xalloc
diff --git a/guimb/guimb.h b/guimb/guimb.h
index 621a3ec..e0384e8 100644
--- a/guimb/guimb.h
+++ b/guimb/guimb.h
@@ -42,7 +42,7 @@
 #include <mailutils/util.h>
 #include <mailutils/attribute.h>
 #include <mailutils/envelope.h>
-#include <mu_asprintf.h>
+#include <mailutils/io.h>
 
 extern char *program_file;
 extern char *program_expr;
diff --git a/imap4d/auth_gss.c b/imap4d/auth_gss.c
index 11f0745..68f3bf4 100644
--- a/imap4d/auth_gss.c
+++ b/imap4d/auth_gss.c
@@ -62,7 +62,7 @@ display_status_1 (char *m, OM_uint32 code, int type)
                                     type, GSS_C_NO_OID, &msg_ctx, &msg);
       if (GSS_ERROR (maj_stat))
        {
-         asprintf ((char**)&msg.value, "code %d", code);
+         mu_asprintf ((char**)&msg.value, "code %d", code);
          msg.length = strlen (msg.value);
        }
 
@@ -136,7 +136,7 @@ auth_gssapi (struct imap4d_auth *ap)
      work (possibly due to a bug in krb5_gss_accept_sec_context()), so
      we acquire server credentials explicitly. */
 
-  asprintf ((char **) &tmp, "address@hidden", util_localname ());
+  mu_asprintf ((char **) &tmp, "address@hidden", util_localname ());
   tokbuf.value = tmp;
   tokbuf.length = strlen (tokbuf.value) + 1;
   maj_stat = gss_import_name (&min_stat, &tokbuf,
diff --git a/imap4d/imap4d.h b/imap4d/imap4d.h
index 6cf6f58..21d3b72 100644
--- a/imap4d/imap4d.h
+++ b/imap4d/imap4d.h
@@ -103,8 +103,8 @@
 #include <mailutils/vartab.h>
 #include <mailutils/cctype.h>
 #include <mailutils/cstr.h>
+#include <mailutils/io.h>
 
-#include <mu_asprintf.h>
 #include <mu_umaxtostr.h>
 #include <muaux.h>
 
diff --git a/imap4d/unsubscribe.c b/imap4d/unsubscribe.c
index 108f7f3..9379da5 100644
--- a/imap4d/unsubscribe.c
+++ b/imap4d/unsubscribe.c
@@ -115,7 +115,7 @@ imap4d_unsubscribe (struct imap4d_command *command, 
imap4d_tokbuf_t tok)
       if (sd.result)
        {
          char *tmpname = NULL;
-         asprintf (&tmpname, "%s.%d", file, getpid ());
+         mu_asprintf (&tmpname, "%s.%d", file, getpid ());
          sd.tmp = fopen (tmpname, "a");
          if (!sd.tmp)
            rc = -1;
diff --git a/lib/Makefile.am b/lib/Makefile.am
index ed88cd0..504e463 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -35,7 +35,6 @@ noinst_HEADERS +=\
  mailcap.h\
  muaux.h\
  mu_dbm.h\
- mu_asprintf.h\
  tcpwrap.h
 
 EXTRA_DIST += utmp.c
diff --git a/lib/mailcap.c b/lib/mailcap.c
index e4f0b57..fc2c3ec 100644
--- a/lib/mailcap.c
+++ b/lib/mailcap.c
@@ -658,7 +658,7 @@ display_stream_mailcap (const char *ident, mu_stream_t 
stream, mu_header_t hdr,
   if (!mailcap_path)
     {
       char *home = mu_get_homedir ();
-      asprintf (&mailcap_path, "%s/.mailcap:%s", home, DEFAULT_MAILCAP);
+      mu_asprintf (&mailcap_path, "%s/.mailcap:%s", home, DEFAULT_MAILCAP);
       free (home);
       if (!mailcap_path)
         return 1;
diff --git a/lib/mu_asprintf.h b/lib/mu_asprintf.h
deleted file mode 100644
index 0f893e9..0000000
--- a/lib/mu_asprintf.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright (C) 2007, 2010 Free Software Foundation, Inc.
-
-   GNU Mailutils is free software; you can redistribute it and/or modify
-   it under the terms of the GNU Library General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   GNU Mailutils 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 Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General
-   Public License along with GNU Mailutils.  If not, see 
-   <http://www.gnu.org/licenses/>. */
-
-#ifndef MUASPRINTF_H
-#define MUASPRINTF_H
-
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE
-#endif
-#include <stdarg.h>
-#include <stdio.h>
-
-#if !HAVE_DECL_VASPRINTF
-extern int vasprintf (char **result, const char *format, va_list args);
-#endif
-#if !HAVE_DECL_ASPRINTF
-#if __STDC__
-extern int asprintf (char **result, const char *format, ...);
-#else
-extern int asprintf ();
-#endif
-#endif
-
-#endif
-
diff --git a/lib/tcpwrap.c b/lib/tcpwrap.c
index 001fc9c..3f29b1e 100644
--- a/lib/tcpwrap.c
+++ b/lib/tcpwrap.c
@@ -33,34 +33,6 @@ char *mu_tcp_wrapper_daemon;
 
 #ifdef WITH_LIBWRAP
 # include <tcpd.h>
-int deny_severity = LOG_INFO;
-int allow_severity = LOG_INFO;
-
-int
-mu_tcp_wrapper_cb_hosts_allow_syslog (mu_debug_t debug, void *data,
-                                     mu_config_value_t *val)
-{
-  if (mu_cfg_assert_value_type (val, MU_CFG_STRING, debug))
-    return 1;
-  if (mu_string_to_syslog_priority (val->v.string, &allow_severity))
-    mu_cfg_format_error (debug, MU_DEBUG_ERROR, 
-                        _("unknown syslog priority `%s'"), 
-                        val->v.string);
-  return 0;
-}
-
-int
-mu_tcp_wrapper_cb_hosts_deny_syslog (mu_debug_t debug, void *data,
-                                    mu_config_value_t *val)
-{
-  if (mu_cfg_assert_value_type (val, MU_CFG_STRING, debug))
-    return 1;
-  if (mu_string_to_syslog_priority (val->v.string, &deny_severity))
-    mu_cfg_format_error (debug, MU_DEBUG_ERROR, 
-                        _("unknown syslog priority `%s'"), 
-                        val->v.string);
-  return 0;
-}
 
 int
 mu_tcpwrapper_access (int fd)
@@ -94,14 +66,6 @@ struct mu_cfg_param tcpwrapper_param[] = {
     N_("Use file for negative client address access control "                
        "(default: /etc/hosts.deny)."),                                       
     N_("file") },                                                            
-  { "allow-syslog-priority", mu_cfg_callback, NULL, 0,               
-    mu_tcp_wrapper_cb_hosts_allow_syslog,                                    
-    N_("Log host allows at this syslog priority."),
-    N_("level") },                                                           
-  { "deny-syslog-priority", mu_cfg_callback, NULL, 0,                        
-    mu_tcp_wrapper_cb_hosts_deny_syslog,                                     
-    N_("Log host denies at this syslog priority."),
-    N_("level") },
   { NULL }
 };
 
diff --git a/libmu_argp/muinit.c b/libmu_argp/muinit.c
index 413389b..ab6e9c9 100644
--- a/libmu_argp/muinit.c
+++ b/libmu_argp/muinit.c
@@ -132,20 +132,20 @@ mu_app_init (struct argp *myargp, const char **capa,
       char *canonical_name = get_canonical_name ();
       mu_stream_t stream;
       mu_stdio_stream_create (&stream, MU_STDOUT_FD, 0);
-      asprintf (&comment,
-               "Configuration file structure for %s utility.",
-               mu_program_name);
+      mu_asprintf (&comment,
+                  "Configuration file structure for %s utility.",
+                  mu_program_name);
       mu_cfg_format_docstring (stream, comment, 0);
       free (comment);
-      asprintf (&comment,
-               "For use in global configuration file (%s), enclose it "
-               "in `program %s { ... };",
-               MU_CONFIG_FILE,
-               mu_program_name);                  
+      mu_asprintf (&comment,
+                  "For use in global configuration file (%s), enclose it "
+                  "in `program %s { ... };",
+                  MU_CONFIG_FILE,
+                  mu_program_name);               
       mu_cfg_format_docstring (stream, comment, 0);
       free (comment);
-      asprintf (&comment, "For more information, use `info %s'.",
-               canonical_name);
+      mu_asprintf (&comment, "For more information, use `info %s'.",
+                  canonical_name);
       mu_cfg_format_docstring (stream, comment, 0);
       free (comment);
       
diff --git a/maidag/deliver.c b/maidag/deliver.c
index 25a7ab6..47d9a54 100644
--- a/maidag/deliver.c
+++ b/maidag/deliver.c
@@ -140,8 +140,8 @@ notify_action (mu_observer_t obs, size_t type, void *data, 
void *action_data)
       char *buf;
       
       mu_mailbox_get_url (mbox, &url);
-      asprintf (&buf, "address@hidden:%s", biff_user_name,
-               qid, mu_url_to_string (url));
+      mu_asprintf (&buf, "address@hidden:%s", biff_user_name,
+                  qid, mu_url_to_string (url));
       if (buf)
        {
          sendto (biff_fd, buf, strlen (buf), 0,
@@ -251,8 +251,8 @@ deliver_to_mailbox (mu_mailbox_t mbox, mu_message_t msg,
          maidag_error (_("%s: mailbox quota exceeded for this recipient"),
                        auth->name);
          if (errp)
-           asprintf (errp, "%s: mailbox quota exceeded for this recipient",
-                     auth->name);
+           mu_asprintf (errp, "%s: mailbox quota exceeded for this recipient",
+                        auth->name);
          exit_code = EX_QUOTA();
          failed++;
          break;
@@ -274,10 +274,10 @@ deliver_to_mailbox (mu_mailbox_t mbox, mu_message_t msg,
                              "this recipient"),
                            auth->name);
              if (errp)
-               asprintf (errp,
-                         "%s: message would exceed maximum mailbox size "
-                         "for this recipient",
-                         auth->name);
+               mu_asprintf (errp,
+                            "%s: message would exceed maximum mailbox size "
+                            "for this recipient",
+                            auth->name);
              exit_code = EX_QUOTA();
              failed++;
            }
@@ -339,7 +339,7 @@ do_delivery (mu_url_t url, mu_message_t msg, const char 
*name, char **errp)
        {
          maidag_error (_("%s: no such user"), name);
          if (errp)
-           asprintf (errp, "%s: no such user", name);
+           mu_asprintf (errp, "%s: no such user", name);
          exit_code = EX_NOUSER;
          return EX_NOUSER;
        }
diff --git a/maidag/maidag.h b/maidag/maidag.h
index 6c7224d..b77491f 100644
--- a/maidag/maidag.h
+++ b/maidag/maidag.h
@@ -84,9 +84,9 @@
 #include <mailutils/acl.h>
 #include <mailutils/server.h>
 #include <mailutils/cctype.h>
+#include <mailutils/io.h>
 
 #include <mu_dbm.h>
-#include <mu_asprintf.h>
 
 #if defined (USE_DBM) || defined (USE_SQL)
 # define USE_MAILBOX_QUOTAS 1
diff --git a/mail/escape.c b/mail/escape.c
index f35bbe1..efa2d79 100644
--- a/mail/escape.c
+++ b/mail/escape.c
@@ -93,7 +93,7 @@ parse_headers (FILE *fp, compose_env_t *env)
              if (name)
                {
                  char *p = NULL;
-                 asprintf (&p, "%s\n%s", value, buf);
+                 mu_asprintf (&p, "%s\n%s", value, buf);
                  free (value);
                  value = p;
                }
diff --git a/mail/mail.c b/mail/mail.c
index 6cd68f3..3f70e66 100644
--- a/mail/mail.c
+++ b/mail/mail.c
@@ -175,14 +175,14 @@ parse_opt (int key, char *arg, struct argp_state *state)
                            _("-f requires at most one command line argument"));
            }
          else if (args->user)
-           asprintf (&args->file, "~/%s/mbox", args->user);
+           mu_asprintf (&args->file, "~/%s/mbox", args->user);
          else
            args->file = "~/mbox";
        }
       else if (args->argc || (args->hint & HINT_SEND_MODE))
        util_cache_command (&command_list, "setq mode=send");
       else if (args->user)
-       asprintf (&args->file, "%%%s", args->user);
+       mu_asprintf (&args->file, "%%%s", args->user);
       break;
       
     default:
diff --git a/mail/mail.h b/mail/mail.h
index cc2de6e..3b33a52 100644
--- a/mail/mail.h
+++ b/mail/mail.h
@@ -79,7 +79,7 @@
 #include <mailutils/argcv.h>
 #include <mailutils/cctype.h>
 #include <mailutils/cstr.h>
-#include <mu_asprintf.h>
+#include <mailutils/io.h>
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/mail/util.c b/mail/util.c
index ae6625f..f337fe7 100644
--- a/mail/util.c
+++ b/mail/util.c
@@ -30,7 +30,7 @@
 #else
 # include <sys/fcntl.h>
 #endif
-#include <mu_asprintf.h>
+#include <mailutils/io.h>
 
 /*
  * expands command into its command and arguments, then runs command
@@ -38,20 +38,21 @@
  * returns exit status of the command
  */
 int
-util_do_command (const char *c, ...)
+util_do_command (const char *fmt, ...)
 {
   int argc = 0;
   char **argv = NULL;
   int status = 0;
   const struct mail_command_entry *entry = NULL;
   char *cmd = NULL;
+  size_t size = 0;
   va_list ap;
   
-  va_start (ap, c);
-  status = vasprintf (&cmd, c, ap);
+  va_start (ap, fmt);
+  status = mu_vasnprintf (&cmd, &size, fmt, ap);
   va_end (ap);
-  if (status < 0)
-    return 0;
+  if (status)
+    return status;
 
   if (cmd)
     {
@@ -84,7 +85,7 @@ util_do_command (const char *c, ...)
              && ((strtoul (argv[0], &p, 10) > 0 && *p == 0)
                  || (argv[0][1] == 0 && strchr("^$", argv[0][0]))))
            {
-             asprintf (&p, "print %s", argv[0]);
+             mu_asprintf (&p, "print %s", argv[0]);
              mu_argcv_free (argc, argv);
              mu_argcv_get (p, NULL, NULL, &argc, &argv);
              free (p);
@@ -685,7 +686,7 @@ util_outfolder_name (char *str)
       if (mailvar_get (&outfolder, "outfolder", mailvar_type_string, 0) == 0)
        {
          char *ns = NULL;
-         asprintf (&ns, "%s/%s", outfolder, str);
+         mu_asprintf (&ns, "%s/%s", outfolder, str);
          str = util_fullpath (ns);
          free (ns);
        }
@@ -1035,11 +1036,12 @@ util_noapp ()
 void
 util_cache_command (mu_list_t *list, const char *fmt, ...)
 {
-  char *cmd;
+  char *cmd = NULL;
+  size_t size = 0;
   va_list ap;
 
   va_start (ap, fmt);
-  vasprintf (&cmd, fmt, ap);
+  mu_vasnprintf (&cmd, &size, fmt, ap);
   va_end (ap);
 
   if (!*list)
diff --git a/mail/write.c b/mail/write.c
index 4840873..1368d11 100644
--- a/mail/write.c
+++ b/mail/write.c
@@ -46,7 +46,7 @@ mail_write (int argc, char **argv)
           util_error (_("No applicable message"));
           return 1;
         }
-      asprintf (&p, "%lu", (unsigned long) n);
+      mu_asprintf (&p, "%lu", (unsigned long) n);
       filename = util_outfolder_name (p);
       free (p);
     }
diff --git a/mh/burst.c b/mh/burst.c
index 1078fda..8dc9163 100644
--- a/mh/burst.c
+++ b/mh/burst.c
@@ -594,7 +594,7 @@ main (int argc, char **argv)
        last_uid += burst_map[i].count;
       VERBOSE ((_("Estimated last UID: %s"), mu_umaxtostr (0, last_uid)));
 
-      asprintf (&xargv[0], "%s-last", mu_umaxtostr (0, burst_map[0].msgno));
+      mu_asprintf (&xargv[0], "%s-last", mu_umaxtostr (0, burst_map[0].msgno));
       xargv[1] = NULL;
       mh_msgset_parse (mbox, &ms, 1, xargv, NULL);
       free (xargv[0]);
diff --git a/mh/forw.c b/mh/forw.c
index 3889601..06a9de5 100644
--- a/mh/forw.c
+++ b/mh/forw.c
@@ -291,7 +291,7 @@ format_message (mu_mailbox_t mbox, mu_message_t msg, size_t 
num, void *data)
   
   if (fp->num)
     {
-      asprintf (&s, "\n------- Message %d\n", fp->num++);
+      mu_asprintf (&s, "\n------- Message %d\n", fp->num++);
       rc = mu_stream_write (fp->stream, s, strlen (s), NULL);
       free (s);
     }
@@ -357,7 +357,7 @@ finish_draft ()
       mbox_path = mu_url_to_string (url);
       if (memcmp (mbox_path, "mh:", 3) == 0)
        mbox_path += 3;
-      asprintf (&str, "#forw [] +%s", mbox_path);
+      mu_asprintf (&str, "#forw [] +%s", mbox_path);
       rc = mu_stream_write (stream, str, strlen (str), NULL);
       free (str);
       for (i = 0; rc == 0 && i < msgset.count; i++)
diff --git a/mh/mh.h b/mh/mh.h
index ec78d01..0ed009c 100644
--- a/mh/mh.h
+++ b/mh/mh.h
@@ -25,7 +25,7 @@
 #include <unistd.h>
 #include <mh_getopt.h>
 #include <xalloc.h>
-#include <mu_asprintf.h>
+#include <mailutils/io.h>
 
 #include <string.h>
 
@@ -53,8 +53,8 @@
 #include <mailutils/mailer.h>
 #include <mailutils/envelope.h>
 #include <mailutils/mime.h>
+#include <mailutils/io.h>
 
-#include <mu_asprintf.h>
 #include <mu_umaxtostr.h>
 
 #if !HAVE_DECL_STRCHRNUL
diff --git a/mh/mh_alias.l b/mh/mh_alias.l
index b002343..e997476 100644
--- a/mh/mh_alias.l
+++ b/mh/mh_alias.l
@@ -26,7 +26,7 @@
 #include <mh_alias.h>
 #include <sys/stat.h>
 #include <mailutils/cctype.h>
-#include <mu_asprintf.h>
+#include <mailutils/io.h>
   
 char *ali_filename;  
 size_t ali_line_num;  
@@ -36,9 +36,10 @@ void
 va_ali_parse_error_loc (const char *name, size_t line,
                              const char *fmt, va_list ap)
 {
-  char *buf;
+  char *buf = NULL;
+  size_t size = 0;
 
-  vasprintf (&buf, fmt, ap);
+  mu_vasnprintf (&buf, &size, fmt, ap);
   if (name)
     mu_error ("%s:%lu: %s", name, (unsigned long) line,  buf);
   else
@@ -372,8 +373,9 @@ SPEC [,:;+=\*]
                    yylval.string[yyleng] = 0;
                    return STRING;}
 .              { char *p;
-                 asprintf (&p,
-                          _("Stray character %03o in alias file"), yytext[0]);
+                 mu_asprintf (&p,
+                             _("Stray character %03o in alias file"), 
+                              yytext[0]);
                  yyerror (p);
                 free (p); }
 %%
diff --git a/mh/mh_format.c b/mh/mh_format.c
index f084f31..60b8d7b 100644
--- a/mh/mh_format.c
+++ b/mh/mh_format.c
@@ -1136,7 +1136,7 @@ static void
 builtin_putnum (struct mh_machine *mach)
 {
   char *p;
-  asprintf (&p, "%ld", mach->arg_num);
+  mu_asprintf (&p, "%ld", mach->arg_num);
   print_string (mach, 0, p);
   free (p);
 }
@@ -1609,7 +1609,7 @@ builtin_pers (struct mh_machine *mach)
   if (mu_address_sget_personal (addr, 1, &str) == 0 && str)
     {
       char *p;
-      asprintf (&p, "\"%s\"", str);
+      mu_asprintf (&p, "\"%s\"", str);
       strobj_create (&mach->arg_str, p);
       free (p);
     }
diff --git a/mh/mh_getopt.c b/mh/mh_getopt.c
index 09b8a3e..138baa7 100644
--- a/mh/mh_getopt.c
+++ b/mh/mh_getopt.c
@@ -25,7 +25,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <mh_getopt.h>
-#include <mu_asprintf.h>
+#include <mailutils/io.h>
 
 static int mh_optind = 1;
 static char *mh_optarg;
@@ -55,7 +55,7 @@ mh_getopt (int argc, char **argv, struct mh_option *mh_opt, 
const char *doc)
     }
 
   if (strcmp (mh_optptr, "-version") == 0)
-    asprintf (&argv[mh_optind], "--version");
+    mu_asprintf (&argv[mh_optind], "--version");
   else
     {
       optlen = strlen (mh_optptr+1);
@@ -81,16 +81,16 @@ mh_getopt (int argc, char **argv, struct mh_option *mh_opt, 
const char *doc)
                mh_optarg = "no";
              else
                mh_optarg = "yes";
-             asprintf (&argv[mh_optind], "--%s=%s", longopt, mh_optarg);
+             mu_asprintf (&argv[mh_optind], "--%s=%s", longopt, mh_optarg);
              break;
              
            case MH_OPT_ARG:
-             asprintf (&argv[mh_optind], "--%s", longopt);
+             mu_asprintf (&argv[mh_optind], "--%s", longopt);
              mh_optarg = argv[++mh_optind];
              break;
              
            default:
-             asprintf (&argv[mh_optind], "--%s", longopt);
+             mu_asprintf (&argv[mh_optind], "--%s", longopt);
              mh_optarg = NULL;
            }
          mh_optind++;
diff --git a/mh/mh_init.c b/mh/mh_init.c
index 9153476..1f64cc3 100644
--- a/mh/mh_init.c
+++ b/mh/mh_init.c
@@ -496,12 +496,13 @@ mh_expand_name (const char *base, const char *name, int 
is_folder)
       if (memcmp (namep, "mh:/", 4) == 0)
        return namep;
       else if (namep[0] == '/')
-       asprintf (&p, "mh:%s", namep);
+       mu_asprintf (&p, "mh:%s", namep);
       else
-       asprintf (&p, "mh:%s/%s", base ? base : mu_folder_directory (), namep);
+       mu_asprintf (&p, "mh:%s/%s", base ? base : mu_folder_directory (), 
+                     namep);
     }
   else if (namep[0] != '/')
-    asprintf (&p, "%s/%s", base ? base : mu_folder_directory (), namep);
+    mu_asprintf (&p, "%s/%s", base ? base : mu_folder_directory (), namep);
   else
     return namep;
   
diff --git a/mh/mh_msgset.c b/mh/mh_msgset.c
index f4706fd..fdf5df2 100644
--- a/mh/mh_msgset.c
+++ b/mh/mh_msgset.c
@@ -201,7 +201,7 @@ msgset_preproc (mu_mailbox_t mbox, char *arg)
     {
       char *rest = msgset_preproc_part (mbox, tail+1, &tail);
       char *p = NULL;
-      asprintf (&p, "%s-%s", buf, rest);
+      mu_asprintf (&p, "%s-%s", buf, rest);
       free (rest);
       free (buf);
       buf = p;
@@ -210,7 +210,7 @@ msgset_preproc (mu_mailbox_t mbox, char *arg)
   if (tail[0])
     {
       char *p = NULL;
-      asprintf (&p, "%s%s", buf, tail);
+      mu_asprintf (&p, "%s%s", buf, tail);
       free (buf);
       buf = p;
     }
diff --git a/mh/mh_sequence.c b/mh/mh_sequence.c
index 4e7f5cf..737461a 100644
--- a/mh/mh_sequence.c
+++ b/mh/mh_sequence.c
@@ -22,7 +22,7 @@ private_sequence_name (const char *name)
 {
   char *p;
   char *mbox_dir = mh_expand_name (NULL, mh_current_folder (), 0);
-  asprintf (&p, "atr-%s-%s", name, mbox_dir);
+  mu_asprintf (&p, "atr-%s-%s", name, mbox_dir);
   free (mbox_dir);
   return p;
 }
diff --git a/mh/mh_whatnow.c b/mh/mh_whatnow.c
index 527e73a..6724810 100644
--- a/mh/mh_whatnow.c
+++ b/mh/mh_whatnow.c
@@ -375,7 +375,7 @@ edit (struct mh_whatnow_env *wh, int argc, char **argv, int 
*status)
 {
   char *name;
   
-  asprintf (&name, "%s-next", wh->editor);
+  mu_asprintf (&name, "%s-next", wh->editor);
   invoke (name, wh->editor, argc, argv, wh->file, NULL);
   free (name);
   
@@ -631,7 +631,7 @@ mh_usedraft (const char *filename)
   
   memset (&wh, 0, sizeof (wh));
   wh.file = xstrdup (filename);
-  asprintf (&wh.prompt, _("Use \"%s\"?"), filename);
+  mu_asprintf (&wh.prompt, _("Use \"%s\"?"), filename);
   rc = _whatnow (&wh, usedraft_tab);
   free (wh.prompt);
   free (wh.file);
diff --git a/mh/mhn.c b/mh/mhn.c
index 2f95838..5aef07f 100644
--- a/mh/mhn.c
+++ b/mh/mhn.c
@@ -583,7 +583,7 @@ _mhn_profile_get (char *prefix, char *type, char *subtype, 
char *defval)
   
   if (subtype)
     {
-      asprintf (&name, "mhn-%s-%s/%s", prefix, type, subtype);
+      mu_asprintf (&name, "mhn-%s-%s/%s", prefix, type, subtype);
       str = mh_global_profile_get (name, NULL);
       free (name);
       if (!str)
@@ -591,7 +591,7 @@ _mhn_profile_get (char *prefix, char *type, char *subtype, 
char *defval)
     }
   else
     {
-      asprintf (&name, "mhn-%s-%s", prefix, type);
+      mu_asprintf (&name, "mhn-%s-%s", prefix, type);
       str = mh_global_profile_get (name, defval);
       free (name);
     }
@@ -1596,7 +1596,7 @@ store_handler (mu_message_t msg, msg_part_t part, char 
*type, char *encoding,
       char *p;
       int rc;
        
-      asprintf (&p, _("File %s already exists. Rewrite"), name);
+      mu_asprintf (&p, _("File %s already exists. Rewrite"), name);
       rc = mh_getyn (p);
       free (p);
       if (!rc)
@@ -2131,7 +2131,7 @@ edit_forw (char *cmd, struct compose_env *env, 
mu_message_t *pmsg, int level)
   sp = strchr (val, ';');
   if (!sp)
     abort ();
-  asprintf (&newval, "multipart/digest%s", sp);
+  mu_asprintf (&newval, "multipart/digest%s", sp);
   mu_header_set_value (hdr, MU_HEADER_CONTENT_TYPE, newval, 1);
   free (val);
   free (newval);
@@ -2576,13 +2576,13 @@ mhn_compose ()
     {
       *p = 0;
       name = mu_tempname (input_file);
-      asprintf (&backup, "%s/,%s.orig", input_file, p + 1);
+      mu_asprintf (&backup, "%s/,%s.orig", input_file, p + 1);
       *p = '/';
     }
   else
     {
       name = mu_tempname (NULL);
-      asprintf (&backup, ",%s.orig", input_file);
+      mu_asprintf (&backup, ",%s.orig", input_file);
     }
   
   /* Create working draft file */
diff --git a/mh/send.c b/mh/send.c
index a642d80..ef39d84 100644
--- a/mh/send.c
+++ b/mh/send.c
@@ -647,7 +647,7 @@ _action_send (void *item, void *data)
          const char *pers = get_sender_personal ();
          if (pers)
            {
-             asprintf (&from, "\"%s\" <%s>", pers, email);
+             mu_asprintf (&from, "\"%s\" <%s>", pers, email);
              free (email);
            }
          else
@@ -733,7 +733,7 @@ do_send (int argc, char **argv)
 
   /* Prepend url specifier to the folder dir. We won't need this
      when the default format becomes configurable */
-  asprintf (&p, "mh:%s", mu_folder_directory ());
+  mu_asprintf (&p, "mh:%s", mu_folder_directory ());
   mu_set_folder_directory (p);
   free (p);
   
diff --git a/mimeview/mimetypes.l b/mimeview/mimetypes.l
index 222f9bf..0d4c126 100644
--- a/mimeview/mimetypes.l
+++ b/mimeview/mimetypes.l
@@ -26,7 +26,7 @@
 #include <sys/stat.h>
 #include <mimeview.h>
 #include <mimetypes-decl.h>  
-#include <mu_asprintf.h>
+#include <mailutils/io.h>
 
 static int line_num;
 static char *file_name;
diff --git a/mimeview/mimetypes.y b/mimeview/mimetypes.y
index 50be133..44593c3 100644
--- a/mimeview/mimetypes.y
+++ b/mimeview/mimetypes.y
@@ -533,7 +533,7 @@ make_functional_node (char *ident, mu_list_t list)
       if (!p->name)
        {
          char *s;
-         asprintf (&s, _("%s: unknown function"), ident);
+         mu_asprintf (&s, _("%s: unknown function"), ident);
          yyerror (s);
          free (s);
          return NULL;
@@ -549,7 +549,7 @@ make_functional_node (char *ident, mu_list_t list)
   if (count < i)
     {
       char *s;
-      asprintf (&s, _("too few arguments in call to `%s'"), ident);
+      mu_asprintf (&s, _("too few arguments in call to `%s'"), ident);
       yyerror (s);
       free (s);
       return NULL;
@@ -557,7 +557,7 @@ make_functional_node (char *ident, mu_list_t list)
   else if (count > i)
     {
       char *s;
-      asprintf (&s, _("too many arguments in call to `%s'"), ident);
+      mu_asprintf (&s, _("too many arguments in call to `%s'"), ident);
       yyerror (s);
       free (s);
       return NULL;
@@ -604,9 +604,9 @@ make_functional_node (char *ident, mu_list_t list)
  err:
   {
     char *s;
-    asprintf (&s,
-             _("argument %lu has wrong type in call to `%s'"),
-             (unsigned long) i, ident);
+    mu_asprintf (&s,
+                _("argument %lu has wrong type in call to `%s'"),
+                (unsigned long) i, ident);
     yyerror (s);
     free (s);
     return NULL;
diff --git a/mimeview/mimeview.c b/mimeview/mimeview.c
index 0601255..6523853 100644
--- a/mimeview/mimeview.c
+++ b/mimeview/mimeview.c
@@ -249,7 +249,7 @@ display_file (const char *type)
       mu_header_t hdr;
       char *text;
 
-      asprintf (&text, "Content-Type: %s\n", type);
+      mu_asprintf (&text, "Content-Type: %s\n", type);
       status = mu_header_create (&hdr, text, strlen (text));
       if (status)
        mu_error (_("cannot create header: %s"), mu_strerror (status));
diff --git a/movemail/movemail.c b/movemail/movemail.c
index 914bd77..d030828 100644
--- a/movemail/movemail.c
+++ b/movemail/movemail.c
@@ -27,7 +27,6 @@
 #include <unistd.h>
 #include <mailutils/mailutils.h>
 #include <mailutils/tls.h>
-#include <mu_asprintf.h>
 #include "mailutils/libargp.h"
 #include <muaux.h>
 
@@ -484,7 +483,7 @@ compatibility_mode (mu_mailbox_t *mbx, char *source_name, 
char *password,
       mu_error (_("hostname of the POP3 server is unknown"));
       exit (1);
     }
-  asprintf (&tmp, "pop://address@hidden", user_name, host);
+  mu_asprintf (&tmp, "pop://address@hidden", user_name, host);
   open_mailbox (mbx, tmp, flags, password);
   free (tmp);
 }
@@ -711,7 +710,7 @@ set_program_id (const char *source_name, const char 
*dest_name)
       
   rc = mu_vartab_expand (vtab, program_id_option, &id);
   mu_vartab_destroy (&vtab);
-  /*      asprintf (&id, "%s: %s", mu_program_name, s);
+  /*      mu_asprintf (&id, "%s: %s", mu_program_name, s);
          free (s);*/
   /* FIXME: Don't use mu_set_program_name here, because it
      plays wise with its argument. We need a mu_set_diag_prefix
diff --git a/mu/ldflags.c b/mu/ldflags.c
index ba00bf8..59ac5eb 100644
--- a/mu/ldflags.c
+++ b/mu/ldflags.c
@@ -150,7 +150,7 @@ mutool_ldflags (int argc, char **argv)
            {
              if (p->flags & NOTALL)
                continue;
-             asprintf (&ptr, "-l%s", p->libname);
+             mu_asprintf (&ptr, "-l%s", p->libname);
              add_entry (0, ptr);
              if (p->flags & NEEDAUTH)
                add_entry (2, "-lmu_auth " AUTHLIBS);
@@ -166,7 +166,7 @@ mutool_ldflags (int argc, char **argv)
 
          if (p->name)
            {
-             asprintf (&ptr, "-l%s", p->libname);
+             mu_asprintf (&ptr, "-l%s", p->libname);
              add_entry (0, ptr);
              if (p->flags & NEEDAUTH)
                add_entry (2, "-lmu_auth " AUTHLIBS);
diff --git a/pop3d/expire.c b/pop3d/expire.c
index a43ee4e..024360e 100644
--- a/pop3d/expire.c
+++ b/pop3d/expire.c
@@ -91,7 +91,7 @@ expire_mark_message (mu_message_t msg, char **value)
       mu_attribute_t attr = NULL;
       
       if (!*value)
-       asprintf (value, "%lu", (unsigned long) time (NULL));
+       mu_asprintf (value, "%lu", (unsigned long) time (NULL));
       
       mu_message_get_header (msg, &header);
       mu_message_get_attribute (msg, &attr);
diff --git a/pop3d/pop3d.h b/pop3d/pop3d.h
index 39ac438..4981b96 100644
--- a/pop3d/pop3d.h
+++ b/pop3d/pop3d.h
@@ -23,8 +23,8 @@
 #endif
 #include <mailutils/types.h>
 #include <mailutils/stream.h>
+#include <mailutils/io.h>
 #include <mu_dbm.h>
-#include <mu_asprintf.h>
 #include <mu_umaxtostr.h>
 #include <muaux.h>
 
diff --git a/sieve/sieve.c b/sieve/sieve.c
index 93e467a..e021a33 100644
--- a/sieve/sieve.c
+++ b/sieve/sieve.c
@@ -30,7 +30,7 @@
 #include <syslog.h>
 #include <sysexits.h>
 
-#include <mu_asprintf.h>
+#include <mailutils/io.h>
 #include <mailutils/argcv.h>
 #include <mailutils/sieve.h>
 #include <mailutils/auth.h>
diff --git a/sieve/tests/reject.at b/sieve/tests/reject.at
index 91a6cfb..56d5537 100644
--- a/sieve/tests/reject.at
+++ b/sieve/tests/reject.at
@@ -73,7 +73,7 @@ ENVELOPE TO: <address@hidden>
   16: --(boundary)
   17: Content-Type: message/delivery-status
   18: 
-  19: Reporting-UA: sieve; GNU Mailutils 2.2.90
+  19: Reporting-UA: sieve; GNU Mailutils AT_PACKAGE_VERSION
   20: Arrival-Date: (date)
   21: Final-Recipient: RFC822; address@hidden
   22: Action: deleted
@@ -122,7 +122,7 @@ ENVELOPE TO: <address@hidden>
   16: --(boundary)
   17: Content-Type: message/delivery-status
   18: 
-  19: Reporting-UA: sieve; GNU Mailutils 2.2.90
+  19: Reporting-UA: sieve; GNU Mailutils AT_PACKAGE_VERSION
   20: Arrival-Date: (date)
   21: Final-Recipient: RFC822; address@hidden
   22: Action: deleted
@@ -169,7 +169,7 @@ ENVELOPE TO: <address@hidden>
   16: --(boundary)
   17: Content-Type: message/delivery-status
   18: 
-  19: Reporting-UA: sieve; GNU Mailutils 2.2.90
+  19: Reporting-UA: sieve; GNU Mailutils AT_PACKAGE_VERSION
   20: Arrival-Date: (date)
   21: Final-Recipient: RFC822; address@hidden
   22: Action: deleted


hooks/post-receive
-- 
GNU Mailutils



reply via email to

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