Implement new list functions.
* include/mailutils/list.h (_mu_list_ptr_comparator) (mu_list_insert_list, mu_list_append_list) (mu_list_prepend_list): New prototypes. * libproto/include/list0.h (_mu_list_insert_sublist): New prototype. * mailbox/listlist.c: New function. * mailbox/Makefile.am (libmailutils_la_SOURCES): Add listlist.c. * mailbox/list.c: Remove unnecessary parentheses. (def_comp): Rename to _mu_list_ptr_comparator. Remove static qualifier. All uses updated. (_insert_item): Remove. (mu_list_insert): Use _mu_list_insert_sublist instead of _insert_item. * examples/listop.c (print): Print number of elements. (count): New function. (ins): Use mu_list_insert if only one new element was given, mu_list_insert_list otherwise. (help): Update. (main)<count>: New keyword. * mailbox/testsuite/mailbox/list.exp: Update. Add new tests.
Showing
7 changed files
with
320 additions
and
90 deletions
mailbox/listlist.c
0 → 100644
-
Please register or sign in to post a comment