Commit 324975fd 324975fdec9f928a1a5ba60347fa72e341021b41 by Sergey Poznyakoff

Use registrar_record instead of directly accessing registrar list.

1 parent 08f4f14c
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Copyright (C) 1999, 2000, 2001, 2002, 2005 Free Software Foundation, Inc.
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -193,11 +193,7 @@ sig_hup (int sig)
void
comsat_init ()
{
list_t bookie;
registrar_get_list (&bookie);
/* list_append (bookie, mbox_record); */
list_append (bookie, path_record);
registrar_record (path_record);
gethostname (hostname, sizeof hostname);
......
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
Copyright (C) 1999, 2000, 2001, 2005 Free Software Foundation, Inc.
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -81,14 +81,10 @@ main (int argc, char **argv)
mailbox_name = argv[i];
/* Registration. */
{
list_t bookie;
registrar_get_list (&bookie);
list_append (bookie, imap_record);
list_append (bookie, mbox_record);
list_append (bookie, path_record);
list_append (bookie, pop_record);
}
registrar_record (imap_record);
registrar_record (mbox_record);
registrar_record (path_record);
registrar_record (pop_record);
if ((ret = mailbox_create_default (&mbox, mailbox_name)) != 0)
{
......
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
Copyright (C) 1999, 2000, 2001, 2005 Free Software Foundation, Inc.
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -96,12 +96,8 @@ main (int argc, char *argv[])
}
/* Register mailers. */
{
list_t bookie;
registrar_get_list (&bookie);
list_append (bookie, smtp_record);
list_append (bookie, sendmail_record);
}
registrar_record (smtp_record);
registrar_record (sendmail_record);
if (optfrom)
{
......
......@@ -251,12 +251,9 @@ make_tmp (FILE *input, const char *from, char **tempfile)
void
register_handlers ()
{
list_t bookie;
registrar_get_list (&bookie);
list_append (bookie, path_record);
list_append (bookie, sendmail_record);
list_append (bookie, smtp_record);
registrar_record (path_record);
registrar_record (sendmail_record);
registrar_record (smtp_record);
}
int
......
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
Copyright (C) 1999, 2000, 2001, 2005 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
......@@ -82,24 +82,18 @@ static int
register_format (const char *name)
{
int status = 0;
list_t reglist = NULL;
status = registrar_get_list (&reglist);
if (status)
return status;
if (!name)
{
struct format_record *table;
for (table = format_table; table->name; table++)
list_append (reglist, *table->record);
status = 0;
registrar_record (*table->record);
}
else
{
record_t *record = find_format (format_table, name);
if (record)
status = list_append (reglist, *record);
status = registrar_record (*record);
else
status = EINVAL;
}
......@@ -165,7 +159,6 @@ void
mu_scm_init ()
{
int i;
list_t lst;
_mu_scm_mailer = scm_makfrom0str ("sendmail:" _PATH_SENDMAIL);
mu_set_variable ("mu-mailer", _mu_scm_mailer);
......@@ -196,6 +189,5 @@ mu_scm_init ()
mu_scm_mime_init ();
#include "mu_scm.x"
registrar_get_list (&lst);
list_append (lst, path_record);
registrar_record (path_record);
}
......
......@@ -373,15 +373,11 @@ main (int argc, char *argv[])
}
/* Register local mbox formats. */
{
list_t bookie;
registrar_get_list (&bookie);
list_append (bookie, mbox_record);
list_append (bookie, path_record);
registrar_record (mbox_record);
registrar_record (path_record);
/* Possible supported mailers. */
list_append (bookie, sendmail_record);
list_append (bookie, smtp_record);
}
registrar_record (sendmail_record);
registrar_record (smtp_record);
if (make_tmp (from, &mbox))
exit (exit_code);
......
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
Copyright (C) 1999, 2000, 2001, 2002, 2004, 2005 Free Software Foundation,
Inc.
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -159,11 +160,7 @@ main (int argc, char **argv)
mu_init_nls ();
/* Register mailers. */
{
list_t bookie;
registrar_get_list (&bookie);
list_append (bookie, smtp_record);
}
registrar_record (smtp_record);
MU_AUTH_REGISTER_ALL_MODULES();
mu_argp_init (program_version, NULL);
......