summaryrefslogtreecommitdiff
path: root/libmu_argp
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2010-02-20 20:19:45 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2010-02-20 20:22:54 +0200
commit1413567bfd73bfb39404201a4fc19a4d23dae3ec (patch)
tree8983ea8e696cb5fc6dae2519fb28a8a338fa8b76 /libmu_argp
parenta192c1115ffc99fe631826cd6f17ce00f4d22820 (diff)
downloadmailutils-1413567bfd73bfb39404201a4fc19a4d23dae3ec.tar.gz
mailutils-1413567bfd73bfb39404201a4fc19a4d23dae3ec.tar.bz2
Mu_list_replace and mu_list_remove actually reclaim the memory associated with the item.
* include/mailutils/iterator.h (mu_itrctl_delete_nd) (mu_itrctl_replace_nd): New mu_itrctl_req constants. * include/mailutils/list.h (mu_list_remove_nd) (mu_list_replace_nd): New prototypes. (mu_list_destroy_item_t): New typedef. (mu_list_set_destroy_item): Return mu_list_destroy_item_t. * mailbox/list.c (DESTROY_ITEM): New macro. (mu_list_destroy): Use DESTROY_ITEM. (mu_list_remove, mu_list_replace): Actually destroy the item being removed. (mu_list_remove_nd, mu_list_replace_nd): New functions. (mu_list_set_destroy_item): Return previous value of destroy_item. (list_itrctl): Handle mu_itrctl_delete_nd and mu_itrctl_replace_nd. * mailbox/observer.c (mu_observable_create): Register destroy_item function. (mu_observable_destroy): Remove explicit loop. Rely on destroy_item instead. (mu_observable_detach): Use mu_iterator_ctl to actually remove the event. * mh/mh_alias.y (_insert_list): Remove. (alias_expand_list): Use mu_iterator_ctl to insert replacement list and remove the current item. * mh/sortm.c (addop): Register destroy_item function. (remop): Remove call to free. * movemail/movemail.c (main): <uidl loop>: Use mu_itrctl_delete to remove items. * libmu_sieve/util.c: Minor change. * mail/util.c (util_slist_compare): New static function. (util_slist_add): Register destroy_item and comparison functions for the new list. (util_slist_remove,util_slist_destroy): Rewrite. * imap4d/authenticate.c (auth_add): Use mu_list_free_item as destroy_item function. * imap4d/util.c (util_register_event): Likewise. * include/mailutils/cpp/list.h (List)<set_destroy_item>: Change return value. * libmu_cpp/list.cc (List::set_destroy_item): Reflect changes to mu_list_set_destroy_item. * libmu_argp/common.c: Include stdlib.h
Diffstat (limited to 'libmu_argp')
-rw-r--r--libmu_argp/common.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libmu_argp/common.c b/libmu_argp/common.c
index fca1c170e..6584c6a78 100644
--- a/libmu_argp/common.c
+++ b/libmu_argp/common.c
@@ -21,6 +21,7 @@
#endif
#include "cmdline.h"
#include <unistd.h>
+#include <stdlib.h>
#include <string.h>
#include <mailutils/syslog.h>
#include <mailutils/mailbox.h>

Return to:

Send suggestions and report system problems to the System administrator.