diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-02-21 15:29:07 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-02-21 15:29:07 +0200 |
commit | e1f5e01f24e9b102f0f806b3af9cb47a7f4daca7 (patch) | |
tree | 7c26e7825fc324ce4a5a0fb81d68dd1609dfcce4 /pop3d/pop3d.c | |
parent | afce403c36eab3eecab4db52c92e87395d86ee1e (diff) | |
download | mailutils-e1f5e01f24e9b102f0f806b3af9cb47a7f4daca7.tar.gz mailutils-e1f5e01f24e9b102f0f806b3af9cb47a7f4daca7.tar.bz2 |
Re-do configuration tree support using mu_list_t.
* include/mailutils/cfg.h (mu_cfg_node)
<next,node>: Remove members.
<nodes>: New member.
(mu_cfg_tree)<head,tail>: Remove.
<nodes>: New member.
(mu_cfg_iter_closure): New struct.
(mu_cfg_preorder): Change prototype.
(mu_cfg_postorder): Remove.
(mu_cfg_create_node_list): New proto.
(mu_cfg_tree_create_node): Change signature.
(mu_cfg_tree_add_nodelist): New proto.
(mu_cfg_find_node): Change signature.
* include/mailutils/libargp.h (mu_argp_node_list): Remove struct.
(mu_argp_node_list_init, mu_argp_node_list_add)
(mu_argp_node_list_new, mu_argp_node_list_finish): Change signature.
* libmu_argp/cmdline.c (mu_argp_node_list_init, mu_argp_node_list_add)
(mu_argp_node_list_new, mu_argp_node_list_finish): Take mu_list_t as
the nodelist argument.
* mailbox/cfg_parser.y (parse_head,parse_tail): Remove.
(parse_node_list): New static, used instead of the above.
All uses updated.
(mu_cfg_alloc_node): Last argument is mu_list_t.
(mu_cfg_create_node_list): New function.
(mu_cfg_tree_postprocess): Rewrite.
(mu_cfg_preorder): Rewrite.
(mu_cfg_postorder): Remove.
(mu_cfg_destroy_tree): Use mu_list_destroy to free
the node list.
(mu_cfg_scan_tree): Update calls to mu_cfg_preorder.
(mu_cfg_tree_add_node): Rewrite.
(mu_cfg_tree_add_nodelist): New function.
(mu_cfg_find_node): Change type of the first argument.
(mu_cfg_create_subtree): Rewrite.
* mailbox/cfg_format.c (mu_cfg_format_parse_tree)
(mu_cfg_format_node): Use new mu_cfg_preorder function.
* libmu_argp/common.c: Update calls to mu_argp_node_ functions.
* libmu_argp/auth.c: Likewise.
* comsat/comsat.c: Likewise.
* config/mailutils-config.c: Likewise.
* dotlock/dotlock.c: Likewise.
* imap4d/imap4d.c: Likewise.
* libmu_argp/sieve.c: Likewise.
* libmu_argp/tls.c: Likewise.
* maidag/maidag.c: Likewise.
* mimeview/mimeview.c: Likewise.
* movemail/movemail.c: Likewise.
* pop3d/pop3d.c: Likewise.
* readmsg/readmsg.c: Likewise.
* sieve/sieve.c: Likewise.
Diffstat (limited to 'pop3d/pop3d.c')
-rw-r--r-- | pop3d/pop3d.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pop3d/pop3d.c b/pop3d/pop3d.c index 8490fff1f..d0e7b6057 100644 --- a/pop3d/pop3d.c +++ b/pop3d/pop3d.c @@ -146,22 +146,22 @@ static const char *pop3d_argp_capa[] = { static error_t pop3d_parse_opt (int key, char *arg, struct argp_state *astate) { - static struct mu_argp_node_list lst; + static mu_list_t lst; switch (key) { case 'd': - mu_argp_node_list_new (&lst, "mode", "daemon"); + mu_argp_node_list_new (lst, "mode", "daemon"); if (arg) - mu_argp_node_list_new (&lst, "max-children", arg); + mu_argp_node_list_new (lst, "max-children", arg); break; case 'i': - mu_argp_node_list_new (&lst, "mode", "inetd"); + mu_argp_node_list_new (lst, "mode", "inetd"); break; case OPT_FOREGROUND: - mu_argp_node_list_new (&lst, "foreground", "yes"); + mu_argp_node_list_new (lst, "foreground", "yes"); break; case ARGP_KEY_INIT: @@ -169,7 +169,7 @@ pop3d_parse_opt (int key, char *arg, struct argp_state *astate) break; case ARGP_KEY_FINI: - mu_argp_node_list_finish (&lst, NULL, NULL); + mu_argp_node_list_finish (lst, NULL, NULL); break; default: |