Commit 530953e1 530953e151f011eb2f57918039c402f475431a09 by Sergey Poznyakoff

Rename mu_list_do to mu_list_foreach. Add comments to mailutils/list.h

1 parent c96bc2c0
......@@ -83,7 +83,7 @@ _auth_try (void *item, void *data)
void
imap4d_auth_capability ()
{
mu_list_do (imap_auth_list, _auth_capa, NULL);
mu_list_foreach (imap_auth_list, _auth_capa, NULL);
}
/*
......@@ -112,7 +112,7 @@ imap4d_authenticate (struct imap4d_command *command, imap4d_tokbuf_t tok)
adata.auth_type = auth_type;
adata.username = NULL;
res = mu_list_do (imap_auth_list, _auth_try, &adata);
res = mu_list_foreach (imap_auth_list, _auth_try, &adata);
switch (res)
{
......
......@@ -75,7 +75,7 @@ imap4d_capability (struct imap4d_command *command, imap4d_tokbuf_t tok)
io_sendf ("* CAPABILITY");
mu_list_do (capa_list, print_capa, NULL);
mu_list_foreach (capa_list, print_capa, NULL);
imap4d_auth_capability ();
io_sendf ("\n");
......
......@@ -1057,7 +1057,7 @@ _frt_header_fields (struct fetch_function_closure *ffc,
io_sendf (".NOT");
io_sendf (" (");
status = 0;
mu_list_do (ffc->headers, _send_header_name, &status);
mu_list_foreach (ffc->headers, _send_header_name, &status);
io_sendf (")]");
msg = fetch_get_part (ffc, frt);
......@@ -1683,7 +1683,7 @@ imap4d_fetch0 (imap4d_tokbuf_t tok, int isuid, char **err_text)
{
io_sendf ("* %lu FETCH (", (unsigned long) frc.msgno);
frc.eltno = 0;
rc = mu_list_do (pclos.fnlist, _do_fetch, &frc);
rc = mu_list_foreach (pclos.fnlist, _do_fetch, &frc);
io_sendf (")\n");
}
}
......
......@@ -56,7 +56,7 @@ print_namespace (int nsid)
int count;
count = 0;
io_sendf ("(");
mu_list_do (list, print_namespace_fun, &count);
mu_list_foreach (list, print_namespace_fun, &count);
io_sendf (")");
}
}
......@@ -84,7 +84,7 @@ namespace_enumerate (int id, nsfp_t f, void *closure)
nsc.fun = f;
nsc.closure = closure;
return namespace[id] == 0 ? 0 :
mu_list_do (namespace[id], _enum_fun, &nsc);
mu_list_foreach (namespace[id], _enum_fun, &nsc);
}
static int
......@@ -271,7 +271,7 @@ namespace_init ()
mu_list_t list;
mu_list_create (&list);
mu_list_set_destroy_item (list, mu_list_free_item);
mu_list_do (namespace[i], normalize_fun, list);
mu_list_foreach (namespace[i], normalize_fun, list);
mu_list_set_destroy_item (namespace[i], mu_list_free_item);
mu_list_destroy (&namespace[i]);
namespace[i] = list;
......
......@@ -659,7 +659,7 @@ util_bye ()
{
mu_stream_close (iostream);
mu_stream_destroy (&iostream);
mu_list_do (atexit_list, atexit_run, 0);
mu_list_foreach (atexit_list, atexit_run, 0);
}
void
......
......@@ -136,7 +136,7 @@ mu_authority_authenticate (mu_authority_t authority)
struct auth_cb cb;
cb.status = MU_ERR_AUTH_FAILURE;
cb.authority = authority;
mu_list_do (authority->auth_methods, try_auth, &cb);
mu_list_foreach (authority->auth_methods, try_auth, &cb);
return cb.status;
}
return EINVAL;
......
......@@ -169,7 +169,7 @@ dup_container (struct mu_cfg_cont **pcont)
newcont->v.section.offset = oldcont->v.section.offset;
newcont->v.section.docstring = oldcont->v.section.docstring;
newcont->v.section.children = NULL;
mu_list_do (oldcont->v.section.children, _dup_cont_action, &dd);
mu_list_foreach (oldcont->v.section.children, _dup_cont_action, &dd);
break;
case mu_cfg_cont_param:
......@@ -329,7 +329,7 @@ mu_config_clone_container (struct mu_cfg_cont *cont)
switch (cont->type)
{
case mu_cfg_cont_section:
mu_list_do (cont->v.section.children, _clone_action, NULL);
mu_list_foreach (cont->v.section.children, _clone_action, NULL);
break;
case mu_cfg_cont_param:
......
......@@ -401,7 +401,7 @@ format_section (mu_stream_t stream, struct mu_cfg_section *sect, int level)
mu_stream_write (stream, " {\n", 3, NULL);
c.stream = stream;
c.level = level + 1;
mu_list_do (sect->children, _f_helper, &c);
mu_list_foreach (sect->children, _f_helper, &c);
format_level (stream, level);
mu_stream_write (stream, "};\n\n", 4, NULL);
}
......@@ -409,7 +409,7 @@ format_section (mu_stream_t stream, struct mu_cfg_section *sect, int level)
{
c.stream = stream;
c.level = level;
mu_list_do (sect->children, _f_helper, &c);
mu_list_foreach (sect->children, _f_helper, &c);
}
}
......
......@@ -376,7 +376,7 @@ void
mu_gocs_flush ()
{
int i;
mu_list_do (data_list, _gocs_flush, NULL);
mu_list_foreach (data_list, _gocs_flush, NULL);
for (i = 0; _gocs_table[i].name; i++)
_gocs_table[i].init (mu_gocs_op_flush, NULL);
......
......@@ -234,7 +234,7 @@ block : ident tag '{' '}' opt_sc
{
$$ = mu_cfg_alloc_node (mu_cfg_node_statement, &$1.locus,
$1.name, $2, $4);
mu_list_do ($4, _node_set_parent, $$);
mu_list_foreach ($4, _node_set_parent, $$);
}
;
......@@ -568,7 +568,7 @@ mu_cfg_tree_postprocess (mu_cfg_tree_t *tree,
&& strcmp (node->label->v.string, hints->program) == 0)
{
/* Reset the parent node */
mu_list_do (node->nodes, _node_set_parent,
mu_list_foreach (node->nodes, _node_set_parent,
node->parent);
/* Move all nodes from this block to the topmost
level */
......@@ -656,7 +656,7 @@ _mu_cfg_preorder_recursive (void *item, void *cbdata)
int
mu_cfg_preorder (mu_list_t nodelist, struct mu_cfg_iter_closure *clos)
{
return mu_list_do (nodelist, _mu_cfg_preorder_recursive, clos);
return mu_list_foreach (nodelist, _mu_cfg_preorder_recursive, clos);
}
......@@ -1254,7 +1254,7 @@ parse_param (struct scan_tree_data *sdata, const mu_cfg_node_t *node)
}
mu_list_create (&clos.list);
mu_list_do (node->label->v.list, _set_fun, &clos);
mu_list_foreach (node->label->v.list, _set_fun, &clos);
*(mu_list_t*)tgt = clos.list;
}
else if (clos.type == mu_cfg_callback)
......
......@@ -24,8 +24,8 @@ liblist_la_SOURCES = \
count.c\
create.c\
destroy.c\
do.c\
empty.c\
foreach.c\
get.c\
getcomp.c\
gmap.c\
......
......@@ -24,7 +24,7 @@
#include <mailutils/errno.h>
int
mu_list_do (mu_list_t list, mu_list_action_t *action, void *cbdata)
mu_list_foreach (mu_list_t list, mu_list_action_t *action, void *cbdata)
{
mu_iterator_t itr;
int status = 0;
......@@ -45,3 +45,11 @@ mu_list_do (mu_list_t list, mu_list_action_t *action, void *cbdata)
mu_iterator_destroy (&itr);
return status;
}
/* Retained for compatibility with previous versions.
In the future it will be removed, or changed to a define or weak alias. */
int
mu_list_do (mu_list_t list, mu_list_action_t *action, void *cbdata)
{
return mu_list_foreach (list, action, cbdata);
}
......
......@@ -556,7 +556,7 @@ mu_acl_check_sockaddr (mu_acl_t acl, const struct sockaddr *sa, int salen,
r.result = pres;
*r.result = mu_acl_result_undefined;
r.numbuf = NULL;
mu_list_do (acl->aclist, _run_entry, &r);
mu_list_foreach (acl->aclist, _run_entry, &r);
free (r.numbuf);
free (r.addrstr);
return 0;
......
......@@ -229,7 +229,7 @@ mu_m_server_idle (void *server_data MU_ARG_UNUSED)
need_cleanup = 0;
while ( (ex.pid = waitpid (-1, &ex.status, WNOHANG)) > 0)
/* Iterate over all m-servers and notify them about the fact. */
mu_list_do (m_server_list, m_server_cleanup, &ex);
mu_list_foreach (m_server_list, m_server_cleanup, &ex);
}
return stop;
}
......@@ -619,7 +619,7 @@ mu_m_server_run (mu_m_server_t msrv)
int rc;
size_t count;
mode_t saved_umask = umask (0117);
mu_list_do (msrv->srvlist, _open_conn, msrv);
mu_list_foreach (msrv->srvlist, _open_conn, msrv);
umask (saved_umask);
mu_list_destroy (&msrv->srvlist);
MU_ASSERT (mu_server_count (msrv->server, &count));
......
......@@ -201,7 +201,7 @@ List :: size ()
void
List :: apply (mu_list_action_t* action, void* cbdata)
{
int status = mu_list_do (mu_list, action, cbdata);
int status = mu_list_foreach (mu_list, action, cbdata);
if (status)
throw Exception ("List::apply", status);
}
......
......@@ -131,7 +131,7 @@ mu_sieve_get_comparator (mu_sieve_machine_t mach, mu_list_t tags)
{
mu_sieve_comparator_t comp = NULL;
mu_list_do (tags, _find_comparator, &comp);
mu_list_foreach (tags, _find_comparator, &comp);
return comp ? comp : mu_sieve_comparator_lookup (mach,
"i;ascii-casemap",
MU_SIEVE_MATCH_IS);
......@@ -192,7 +192,7 @@ static void
_free_reglist (void *data)
{
mu_list_t list = data;
mu_list_do (list, _free_regex, NULL);
mu_list_foreach (list, _free_regex, NULL);
mu_list_destroy (&list);
}
......
......@@ -62,15 +62,15 @@ mu_sieve_module_init (enum mu_gocs_op op, void *data)
if (p->clearflags & MU_SIEVE_CLEAR_INCLUDE_PATH)
mu_list_destroy (&mu_sieve_include_path);
mu_list_do (p->include_path, _path_append, &mu_sieve_include_path);
mu_list_foreach (p->include_path, _path_append, &mu_sieve_include_path);
if (p->clearflags & MU_SIEVE_CLEAR_LIBRARY_PATH)
{
mu_list_destroy (&mu_sieve_library_path);
mu_list_destroy (&mu_sieve_library_path_prefix);
}
mu_list_do (p->library_path_prefix, _path_append,
mu_list_foreach (p->library_path_prefix, _path_append,
&mu_sieve_library_path_prefix);
mu_list_do (p->library_path, _path_append, &mu_sieve_library_path);
mu_list_foreach (p->library_path, _path_append, &mu_sieve_library_path);
mu_list_destroy (&p->library_path);
mu_list_destroy (&p->library_path_prefix);
mu_list_destroy (&p->include_path);
......
......@@ -52,11 +52,11 @@ sieve_init_load_path ()
{
if (lt_dlinit ())
return 1;
mu_list_do (mu_sieve_library_path_prefix, _add_load_dir, NULL);
mu_list_foreach (mu_sieve_library_path_prefix, _add_load_dir, NULL);
#ifdef MU_SIEVE_MODDIR
_add_load_dir (MU_SIEVE_MODDIR, NULL);
#endif
mu_list_do (mu_sieve_library_path, _add_load_dir, NULL);
mu_list_foreach (mu_sieve_library_path, _add_load_dir, NULL);
inited = 1;
}
return 0;
......
......@@ -234,7 +234,7 @@ mu_sv_code_command (mu_sieve_register_t *reg, mu_list_t arglist)
err = 1;
break;
}
if (mu_list_do (chk_list, _compare_ptr, cf) == 0)
if (mu_list_foreach (chk_list, _compare_ptr, cf) == 0)
mu_list_append (chk_list, cf);
}
}
......@@ -307,7 +307,7 @@ mu_sv_code_command (mu_sieve_register_t *reg, mu_list_t arglist)
chk_arg.name = reg->name;
chk_arg.tags = tag_list;
chk_arg.args = arg_list;
err = mu_list_do (chk_list, _run_checker, &chk_arg);
err = mu_list_foreach (chk_list, _run_checker, &chk_arg);
}
}
......
......@@ -382,7 +382,7 @@ sieve_include ()
{
char *p = name;
if (mu_sieve_include_path
&& mu_list_do (mu_sieve_include_path, _try_include, &p))
&& mu_list_foreach (mu_sieve_include_path, _try_include, &p))
{
push_source (p);
free (name);
......
......@@ -565,7 +565,7 @@ mu_sieve_machine_destroy (mu_sieve_machine_t *pmach)
MU_IOCTL_LOGSTREAM_SET_LOCUS, NULL);
mu_stream_destroy (&mach->errstream);
mu_mailer_destroy (&mach->mailer);
mu_list_do (mach->destr_list, _run_destructor, NULL);
mu_list_foreach (mach->destr_list, _run_destructor, NULL);
mu_list_destroy (&mach->destr_list);
mu_list_destroy (&mach->action_list);
mu_list_destroy (&mach->test_list);
......
......@@ -51,7 +51,7 @@ address_aget_t
sieve_get_address_part (mu_list_t tags)
{
address_aget_t ret = mu_address_aget_email;
mu_list_do (tags, _get_address_part, &ret);
mu_list_foreach (tags, _get_address_part, &ret);
return ret;
}
......
......@@ -136,7 +136,7 @@ mu_sieve_slist_destroy (mu_list_t *plist)
{
if (!plist)
return;
mu_list_do (*plist, _destroy_item, NULL);
mu_list_foreach (*plist, _destroy_item, NULL);
mu_list_destroy (plist);
}
......@@ -344,11 +344,11 @@ sieve_print_value (mu_sieve_value_t *val, mu_stream_t str)
break;
case SVT_STRING_LIST:
mu_list_do (val->v.list, string_printer, str);
mu_list_foreach (val->v.list, string_printer, str);
break;
case SVT_VALUE_LIST:
mu_list_do (val->v.list, value_printer, str);
mu_list_foreach (val->v.list, value_printer, str);
case SVT_POINTER:
mu_stream_printf (str, "%p", val->v.ptr);
......@@ -386,7 +386,7 @@ tag_printer (void *item, void *data)
void
mu_sv_print_tag_list (mu_list_t list, mu_stream_t str)
{
mu_list_do (list, tag_printer, str);
mu_list_foreach (list, tag_printer, str);
}
static int
......@@ -409,7 +409,7 @@ mu_sieve_tag_lookup (mu_list_t taglist, char *name, mu_sieve_value_t **arg)
mu_sieve_runtime_tag_t t;
t.tag = name;
if (taglist && mu_list_do (taglist, tag_finder, &t))
if (taglist && mu_list_foreach (taglist, tag_finder, &t))
{
if (arg)
*arg = t.arg;
......@@ -425,7 +425,7 @@ mu_sieve_vlist_do (mu_sieve_value_t *val, mu_list_action_t *ac, void *data)
{
case SVT_VALUE_LIST:
case SVT_STRING_LIST:
return mu_list_do (val->v.list, ac, data);
return mu_list_foreach (val->v.list, ac, data);
default:
return -1;
......
......@@ -101,7 +101,7 @@ parse_id_reply (mu_imap_t imap, mu_assoc_t *passoc)
st.item = 0;
st.assoc = assoc;
st.ret = 0;
mu_list_do (response->v.list, _id_convert, &st);
mu_list_foreach (response->v.list, _id_convert, &st);
return st.ret;
}
......
......@@ -98,7 +98,7 @@ _parse_stat (void *item, void *data)
{
if (arg->type != imap_eltype_list)
return 0;
mu_list_do (arg->v.list, _collect_flags,
mu_list_foreach (arg->v.list, _collect_flags,
&imap->mbox_stat.permanent_flags);
imap->mbox_stat.flags |= MU_IMAP_STAT_PERMANENT_FLAGS;
}
......@@ -111,7 +111,7 @@ _parse_stat (void *item, void *data)
return 0;
if (arg->type != imap_eltype_list)
return 0;
mu_list_do (arg->v.list, _collect_flags, &imap->mbox_stat.defined_flags);
mu_list_foreach (arg->v.list, _collect_flags, &imap->mbox_stat.defined_flags);
imap->mbox_stat.flags |= MU_IMAP_STAT_DEFINED_FLAGS;
}
else if (count == 2)
......@@ -202,7 +202,7 @@ mu_imap_select (mu_imap_t imap, const char *mbox, int writable,
}
imap->mbox_writable = writable;
memset (&imap->mbox_stat, 0, sizeof (imap->mbox_stat));
mu_list_do (imap->untagged_resp, _parse_stat, imap);
mu_list_foreach (imap->untagged_resp, _parse_stat, imap);
if (ps)
*ps = imap->mbox_stat;
break;
......
......@@ -80,7 +80,7 @@ mu_smtp_add_auth_mech_list (mu_smtp_t smtp, mu_list_t list)
{
if (!smtp)
return EINVAL;
return mu_list_do (list, _mech_append, smtp);
return mu_list_foreach (list, _mech_append, smtp);
}
/* Set a list of implemented authentication mechanisms */
......@@ -127,7 +127,7 @@ mu_smtp_mech_select (mu_smtp_t smtp, const char **pmech)
{
rc = mu_list_create (&alist);
if (rc == 0)
rc = mu_list_do (smtp->authimpl, _mech_copy, alist);
rc = mu_list_foreach (smtp->authimpl, _mech_copy, alist);
}
else
{
......
......@@ -381,7 +381,7 @@ cfun_data (mu_stream_t iostr, char *arg)
maidag_error (_("copy error: %s"), mu_strerror (rc));
mu_stream_destroy (&flt);
mu_stream_destroy (&tempstr);
mu_list_do (rcpt_list, dot_temp_fail, iostr);
mu_list_foreach (rcpt_list, dot_temp_fail, iostr);
}
lmtp_reply (iostr, "354", NULL, "Go ahead");
......@@ -413,7 +413,7 @@ cfun_data (mu_stream_t iostr, char *arg)
if (rc)
{
maidag_error (_("copy error: %s"), mu_strerror (rc));
mu_list_do (rcpt_list, dot_temp_fail, iostr);
mu_list_foreach (rcpt_list, dot_temp_fail, iostr);
}
rc = mu_stream_to_message (tempstr, &mesg);
......@@ -422,14 +422,14 @@ cfun_data (mu_stream_t iostr, char *arg)
{
maidag_error (_("error creating temporary message: %s"),
mu_strerror (rc));
mu_list_do (rcpt_list, dot_temp_fail, iostr);
mu_list_foreach (rcpt_list, dot_temp_fail, iostr);
}
rc = mu_list_do (rcpt_list, dot_deliver, iostr);
rc = mu_list_foreach (rcpt_list, dot_deliver, iostr);
mu_message_destroy (&mesg, mu_message_get_owner (mesg));
if (rc)
mu_list_do (rcpt_list, dot_temp_fail, iostr);
mu_list_foreach (rcpt_list, dot_temp_fail, iostr);
return 0;
}
......
......@@ -162,7 +162,7 @@ script_apply (mu_message_t msg, struct mu_auth_data *auth)
if (switch_user_id (auth, 1) == 0)
{
chdir (auth->dir);
rc = mu_list_do (script_list, apply_script, &clos);
rc = mu_list_foreach (script_list, apply_script, &clos);
chdir ("/");
switch_user_id (auth, 0);
}
......
......@@ -112,13 +112,13 @@ int
mail_sendheader (int argc, char **argv)
{
if (argc == 1)
mu_list_do (add_header_list, list_headers, NULL);
mu_list_foreach (add_header_list, list_headers, NULL);
else if (argc == 2)
{
if (strchr (argv[1], ':'))
send_append_header (argv[1]);
else
mu_list_do (add_header_list, list_headers, argv[1]);
mu_list_foreach (add_header_list, list_headers, argv[1]);
}
else
{
......@@ -207,7 +207,7 @@ void
compose_init (compose_env_t * env)
{
memset (env, 0, sizeof (*env));
mu_list_do (add_header_list, seed_headers, env);
mu_list_foreach (add_header_list, seed_headers, env);
}
int
......
......@@ -1061,7 +1061,7 @@ _run_and_free (void *item, void *data)
void
util_run_cached_commands (mu_list_t *list)
{
mu_list_do (*list, _run_and_free, NULL);
mu_list_foreach (*list, _run_and_free, NULL);
mu_list_destroy (list);
}
......
......@@ -222,7 +222,7 @@ main (int argc, char **argv)
mu_error (_("--add requires at least one --sequence argument"));
return 1;
}
mu_list_do (seq_list, action_add, (void *) &clos);
mu_list_foreach (seq_list, action_add, (void *) &clos);
mh_global_save_state ();
break;
......@@ -232,7 +232,7 @@ main (int argc, char **argv)
mu_error (_("--delete requires at least one --sequence argument"));
return 1;
}
mu_list_do (seq_list, action_delete, (void *) &clos);
mu_list_foreach (seq_list, action_delete, (void *) &clos);
mh_global_save_state ();
break;
......@@ -240,7 +240,7 @@ main (int argc, char **argv)
if (!seq_list)
list_all (mbox);
else
mu_list_do (seq_list, action_list, &clos);
mu_list_foreach (seq_list, action_list, &clos);
break;
}
mu_mailbox_close (mbox);
......
......@@ -454,7 +454,7 @@ addr_cmp (void *item, void *data)
static int
addrlist_lookup (mu_list_t list, mu_address_t addr)
{
return mu_list_do (list, addr_cmp, addr);
return mu_list_foreach (list, addr_cmp, addr);
}
static int
......@@ -468,7 +468,7 @@ addr_free (void *item, void *data)
static void
addrlist_destroy (mu_list_t *list)
{
mu_list_do (*list, addr_free, NULL);
mu_list_foreach (*list, addr_free, NULL);
mu_list_destroy (list);
}
......
......@@ -356,7 +356,7 @@ _destroy_stmt (void *item, void *data)
void
mhl_format_destroy (mu_list_t *fmt)
{
mu_list_do (*fmt, _destroy_stmt, NULL);
mu_list_foreach (*fmt, _destroy_stmt, NULL);
mu_list_destroy (fmt);
}
......@@ -474,7 +474,7 @@ _comp_name (void *item, void *date)
int
header_is_printed (struct eval_env *env, const char *name)
{
return mu_list_do (env->printed_fields, _comp_name, (void*) name) == 1;
return mu_list_foreach (env->printed_fields, _comp_name, (void*) name) == 1;
}
int
......@@ -781,7 +781,7 @@ eval_comp (struct eval_env *env, char *compname, mu_list_t format)
{
struct eval_env lenv = *env;
mu_list_do (format, eval_stmt, &lenv);
mu_list_foreach (format, eval_stmt, &lenv);
goto_offset (&lenv, lenv.ivar[I_OFFSET]);
......@@ -852,7 +852,7 @@ mhl_format_run (mu_list_t fmt,
env.nlines = 0;
env.msg = msg;
env.output = output;
rc = mu_list_do (fmt, eval_stmt, &env);
rc = mu_list_foreach (fmt, eval_stmt, &env);
mu_list_destroy (&env.printed_fields);
return rc;
}
......
......@@ -307,7 +307,7 @@ annotate (struct mh_whatnow_env *wh)
d.field = wh->anno_field;
d.date = i == 1;
mu_address_to_string (subaddr, d.value, size + 1, NULL);
mu_list_do (wh->anno_list, anno, &d);
mu_list_foreach (wh->anno_list, anno, &d);
free (d.value);
mu_address_destroy (&subaddr);
}
......
......@@ -152,7 +152,7 @@ destroy_addrs (mu_list_t *list)
{
if (!*list)
return;
mu_list_do (*list, _destroy_recipient, NULL);
mu_list_foreach (*list, _destroy_recipient, NULL);
mu_list_destroy (list);
}
......@@ -296,13 +296,13 @@ mh_whom (const char *filename, int check)
if (local_rcp)
{
printf (" %s\n", _("-- Local Recipients --"));
mu_list_do (local_rcp, _print_local_recipient, &count);
mu_list_foreach (local_rcp, _print_local_recipient, &count);
}
if (network_rcp)
{
printf (" %s\n", _("-- Network Recipients --"));
mu_list_do (network_rcp, _print_recipient, &count);
mu_list_foreach (network_rcp, _print_recipient, &count);
}
if (count == 0)
......
......@@ -410,7 +410,7 @@ main (int argc, char **argv)
msgset.list = obstack_finish (&msgno_stk);
clos.mbox = mbox;
clos.msgset = &msgset;
mu_list_do (seq_list, action_add, &clos);
mu_list_foreach (seq_list, action_add, &clos);
}
mh_global_save_state ();
......
......@@ -838,7 +838,7 @@ main (int argc, char **argv)
free (p);
/* Finally, do the work */
rc = mu_list_do (mesg_list, _action_send, NULL);
rc = mu_list_foreach (mesg_list, _action_send, NULL);
mu_mailbox_destroy (&mbox);
return !!rc;
......
......@@ -243,7 +243,7 @@ remop (compfun comp)
struct rem_data d;
d.comp = comp;
d.op = NULL;
mu_list_do (oplist, rem_action, &d);
mu_list_foreach (oplist, rem_action, &d);
mu_list_remove (oplist, d.op);
}
......@@ -297,7 +297,7 @@ compare_messages (mu_message_t a, mu_message_t b, size_t anum, size_t bnum)
d.r = 0;
d.m[0] = a;
d.m[1] = b;
mu_list_do (oplist, compare_action, &d);
mu_list_foreach (oplist, compare_action, &d);
if (d.r == 0)
{
if (anum < bnum)
......
......@@ -702,7 +702,7 @@ const char *
get_file_type ()
{
const char *type = NULL;
mu_list_do (rule_list, evaluate, &type);
mu_list_foreach (rule_list, evaluate, &type);
return type;
}
......
......@@ -1419,7 +1419,7 @@ delete_database (int argc, char **argv)
free_regexes (&m);
}
}
mu_list_do (templist, do_delete, db);
mu_list_foreach (templist, do_delete, db);
mu_list_destroy (&templist);
mu_dbm_destroy (&db);
}
......
......@@ -95,7 +95,7 @@ list_filters ()
mu_diag_funcall (MU_DIAG_ERROR, "mu_filter_get_list", NULL, rc);
return 1;
}
return mu_list_do (list, filter_printer, NULL);
return mu_list_foreach (list, filter_printer, NULL);
}
static int
......
......@@ -188,7 +188,7 @@ static int
odbc_release_result (mu_sql_connection_t conn)
{
struct mu_odbc_data *dp = conn->data;
mu_list_do (dp->result, odbc_free_char_data, NULL);
mu_list_foreach (dp->result, odbc_free_char_data, NULL);
mu_list_destroy (&dp->result);
mu_argcv_free (dp->fcount, dp->fnames);
dp->fcount = 0;
......
......@@ -250,7 +250,7 @@ main (int argc, char **argv)
}
MU_ASSERT (mu_smtp_mail_basic (smtp, from, NULL));
mu_list_do (rcpt_list, send_rcpt_command, smtp);
mu_list_foreach (rcpt_list, send_rcpt_command, smtp);
if (raw)
{
......