aboutsummaryrefslogtreecommitdiff
path: root/src/mail.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-05-13 10:21:43 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2011-05-13 10:33:34 +0300
commitde3fbe3e8d4dd2a89f7755906d76055784c437cc (patch)
tree65356dd7b5a9010499550c468e960c93515a7e15 /src/mail.c
parentf569a6f2628b9ddef4dfb4424aff2dad644a8f19 (diff)
downloadwydawca-de3fbe3e8d4dd2a89f7755906d76055784c437cc.tar.gz
wydawca-de3fbe3e8d4dd2a89f7755906d76055784c437cc.tar.bz2
Drop gnulib.
* bootstrap: Rewrite. * bootstrap.conf: Remove. * configure.ac: Remove gl_EARLY/gl_INIT * src/backup.c: New file. * src/txtacc.c (txtacc_finish): Make sure a new entry is appended only once to the list. * (all sources): Use grecs memory allocation functions. * src/wydawca.h" Include fnmatch.h and regex.h (backup_type): New enum. (simple_backup_suffix): New extern. (find_backup_file_name): New proto. * tests/bkupname.c: New file. * tests/backup00.at: New file. * tests/backup01.at: New file. * tests/backup02.at: New file. * tests/backup03.at: New file. * tests/Makefile.am: Add new tests. * tests/testsuite.at: Add new tests. * grecs: Update.
Diffstat (limited to 'src/mail.c')
-rw-r--r--src/mail.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mail.c b/src/mail.c
index bac0381..6855ed7 100644
--- a/src/mail.c
+++ b/src/mail.c
@@ -288,22 +288,22 @@ mail_send_message (mu_address_t rcpt, const char *text,
mu_message_get_header (msg, &hdr);
mu_header_append (hdr, "X-Mailer", x_mailer);
if (rcpt)
{
mu_address_to_string (rcpt, NULL, 0, &size);
- buf = xmalloc (size + 1);
+ buf = grecs_malloc (size + 1);
mu_address_to_string (rcpt, buf, size + 1, NULL);
mu_header_set_value (hdr, "To", buf, 1);
free (buf);
if (from_address && mu_header_sget_value (hdr, "From", &sval))
{
mu_address_to_string (from_address, NULL, 0, &size);
- buf = xmalloc (size + 1);
+ buf = grecs_malloc (size + 1);
mu_address_to_string (from_address, buf, size + 1, NULL);
mu_header_set_value (hdr, "From", buf, 1);
free (buf);
}
}
@@ -431,23 +431,23 @@ mail_stats ()
if (debug_level)
{
size_t size;
char *buf;
mu_address_to_string (admin_address, NULL, 0, &size);
- buf = xmalloc (size + 1);
+ buf = grecs_malloc (size + 1);
mu_address_to_string (admin_address, buf, size + 1, NULL);
logmsg (LOG_DEBUG, _("sending stats to %s"), buf);
free (buf);
}
tc = timer_get_count () * 3;
exp = make_stat_expansion (tc + 1);
time (&t);
exp[0].kw = "date";
- exp[0].value = exp[0].storage = xstrdup (ctime (&t));
+ exp[0].value = exp[0].storage = grecs_strdup (ctime (&t));
exp[0].value [strlen (exp[0].value) - 1] = 0;
timer_fill_meta (exp + 1, tc);
tmpl = resolve_message_template (admin_stat_message);
if (!tmpl)
{
@@ -595,13 +595,13 @@ do_notify (struct file_triplet *trp, enum notification_event ev,
{
if (rcpt)
{
size_t size;
char *buf;
mu_address_to_string (rcpt, NULL, 0, &size);
- buf = xmalloc (size + 1);
+ buf = grecs_malloc (size + 1);
mu_address_to_string (rcpt, buf, size + 1, NULL);
logmsg (LOG_DEBUG, _("notifying %s (project %s) about %s"),
buf, trp->project, notification_event_str (ev));
free (buf);
}
else
@@ -639,13 +639,13 @@ const char *
expand_email_admin (struct metadef *def, void *data)
{
size_t size;
if (mu_address_to_string (admin_address, NULL, 0, &size) == 0)
{
size++;
- def->storage = xmalloc (size);
+ def->storage = grecs_malloc (size);
mu_address_to_string (admin_address, def->storage, size, NULL);
def->value = def->storage;
}
else
def->value = "";
return def->value;
@@ -667,13 +667,13 @@ expand_email_owner (struct metadef *def, void *data)
trp->project, gettext (errp));
def->value = "";
}
else if (mu_address_to_string (addr, NULL, 0, &size) == 0)
{
size++;
- def->storage = xmalloc (size);
+ def->storage = grecs_malloc (size);
mu_address_to_string (addr, def->storage, size, NULL);
def->value = def->storage;
mu_address_destroy (&addr);
}
else
def->value = "";

Return to:

Send suggestions and report system problems to the System administrator.