Commit 697384c6 697384c64dadb0a4db97136a6cbcf2166c48897b by Sergey Poznyakoff

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.
1 parent b24bf339
......@@ -20,8 +20,6 @@ mbswidth
obstack
realloc
setenv
snprintf
stdint
strtok_r
vasprintf
xalloc
......
......@@ -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;
......
......@@ -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, "imap@%s", util_localname ());
mu_asprintf ((char **) &tmp, "imap@%s", util_localname ());
tokbuf.value = tmp;
tokbuf.length = strlen (tokbuf.value) + 1;
maj_stat = gss_import_name (&min_stat, &tokbuf,
......
......@@ -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>
......
......@@ -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;
......
......@@ -35,7 +35,6 @@ noinst_HEADERS +=\
mailcap.h\
muaux.h\
mu_dbm.h\
mu_asprintf.h\
tcpwrap.h
EXTRA_DIST += utmp.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;
......
/* 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
......@@ -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);
......
......@@ -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, "%s@%s:%s", biff_user_name,
qid, mu_url_to_string (url));
mu_asprintf (&buf, "%s@%s:%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;
}
......
......@@ -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
......
......@@ -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;
}
......
......@@ -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:
......
......@@ -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" {
......
......@@ -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)
......
......@@ -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);
}
......
......@@ -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]);
......
......@@ -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++)
......
......@@ -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
......
......@@ -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); }
%%
......
......@@ -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);
}
......
......@@ -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++;
......
......@@ -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;
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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);
......
......@@ -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 */
......
......@@ -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);
......
......@@ -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;
......
......@@ -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;
......
......@@ -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));
......
......@@ -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://%s@%s", user_name, host);
mu_asprintf (&tmp, "pop://%s@%s", 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
......
......@@ -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);
......
......@@ -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);
......
......@@ -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>
......
......@@ -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>
......
......@@ -73,7 +73,7 @@ ENVELOPE TO: <coyote@desert.example.org>
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; foobar@nonexistent.net
22: Action: deleted
......@@ -122,7 +122,7 @@ ENVELOPE TO: <b1ff@de.res.example.com>
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; foobar@nonexistent.net
22: Action: deleted
......@@ -169,7 +169,7 @@ ENVELOPE TO: <bar@dontmailme.org>
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; foobar@nonexistent.net
22: Action: deleted
......