diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2005-07-26 06:27:12 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2005-07-26 06:27:12 +0000 |
commit | 324975fdec9f928a1a5ba60347fa72e341021b41 (patch) | |
tree | eb972110a1c2c52d6f95bc093f1e9497b2cad9a5 | |
parent | 08f4f14c3109239d771392ddac23e60f8a47b61b (diff) | |
download | mailutils-324975fdec9f928a1a5ba60347fa72e341021b41.tar.gz mailutils-324975fdec9f928a1a5ba60347fa72e341021b41.tar.bz2 |
Use registrar_record instead of directly accessing registrar list.
-rw-r--r-- | comsat/comsat.c | 8 | ||||
-rw-r--r-- | examples/mimetest.c | 14 | ||||
-rw-r--r-- | examples/msg-send.c | 10 | ||||
-rw-r--r-- | examples/mta.c | 9 | ||||
-rw-r--r-- | libmu_scm/mu_scm.c | 16 | ||||
-rw-r--r-- | mail.local/main.c | 14 | ||||
-rw-r--r-- | mail.remote/mail.remote.c | 9 |
7 files changed, 25 insertions, 55 deletions
diff --git a/comsat/comsat.c b/comsat/comsat.c index de1c00f1a..a920bf7b0 100644 --- a/comsat/comsat.c +++ b/comsat/comsat.c @@ -1,5 +1,5 @@ /* 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); diff --git a/examples/mimetest.c b/examples/mimetest.c index 385e217e6..dab6edb2d 100644 --- a/examples/mimetest.c +++ b/examples/mimetest.c @@ -1,5 +1,5 @@ /* 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) { diff --git a/examples/msg-send.c b/examples/msg-send.c index e9731ec49..e648185fe 100644 --- a/examples/msg-send.c +++ b/examples/msg-send.c @@ -1,5 +1,5 @@ /* 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) { diff --git a/examples/mta.c b/examples/mta.c index 68c5d4848..69b545ff3 100644 --- a/examples/mta.c +++ b/examples/mta.c @@ -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 diff --git a/libmu_scm/mu_scm.c b/libmu_scm/mu_scm.c index 0048fdd0c..3c73e4b16 100644 --- a/libmu_scm/mu_scm.c +++ b/libmu_scm/mu_scm.c @@ -1,5 +1,5 @@ /* 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 (®list); - 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); } diff --git a/mail.local/main.c b/mail.local/main.c index 499995979..74aea8a98 100644 --- a/mail.local/main.c +++ b/mail.local/main.c @@ -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); - /* Possible supported mailers. */ - list_append (bookie, sendmail_record); - list_append (bookie, smtp_record); - } + registrar_record (mbox_record); + registrar_record (path_record); + /* Possible supported mailers. */ + registrar_record (sendmail_record); + registrar_record (smtp_record); if (make_tmp (from, &mbox)) exit (exit_code); diff --git a/mail.remote/mail.remote.c b/mail.remote/mail.remote.c index 6061a5bb1..cb748a910 100644 --- a/mail.remote/mail.remote.c +++ b/mail.remote/mail.remote.c @@ -1,5 +1,6 @@ /* 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); |