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.
Showing
19 changed files
with
266 additions
and
287 deletions
-
Please register or sign in to post a comment