Redo message set parser in imap4d
The new parser complies to RFC3501. Its output message sets are formatted as MU lists of non-overlapping contiguous message ranges, which reduces memory consumption and imposes less strain on CPU. The parser automatically translates message UIDs to sequence numbers and provides better error handling. * imap4d/imap4d.h (util_msgset): Remove. (util_parse_msgset): New proto. (imap4d_message_action_t): New typedef. (util_foreach_message): New proto. * imap4d/util.c (util_msgset): Remove. (util_parse_msgset): New function. * imap4d/copy.c: Use util_parse_msgset to parse message set specs and util_foreach_message to iterate over the returned list. * imap4d/fetch.c: Likewise. * imap4d/search.c: Likewise. * imap4d/store.c: Likewise. * imap4d/tests/IDEF0955.at: Update the test. * include/mailutils/list.h (mu_list_action_t): Fix typedef. * libmailutils/list/foreach.c (mu_list_foreach) (mu_list_do): Update signatures.
Showing
10 changed files
with
191 additions
and
208 deletions
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment