Improve msgset interface. Use it in MH.
* libmailutils/msgset/Makefile.am (libmsgset_la_SOURCES): Add new files. * libmailutils/msgset/addset.c: New file. * libmailutils/msgset/count.c: New file. * libmailutils/msgset/foreachmsgno.c: New file. * libmailutils/msgset/foreachuid.c: New file. * libmailutils/msgset/isempty.c: New file. * libmailutils/msgset/subset.c: New file. * libmailutils/msgset/trans.c: New file. * libmailutils/msgset/add.c (mu_msgset_add_range): Take fourth argument specifying the conversion mode. Translate numbers as necessary. * libmailutils/msgset/foreachmsg.c: Translate numbers as necessary. * libmailutils/msgset/foreachnum.c: Rewrite. * libmailutils/msgset/negate.c (_invert_range) (mu_msgset_add_range): Update calls to mu_msgset_add_range. * libmailutils/msgset/parse.c (parse_msgnum_env)<mode>: New member. (parse_msgrange): Update calls to mu_msgset_add_range. (mu_msgset_parse_imap): Change signature. All callers updated. * libmailutils/msgset/sub.c (mu_msgset_sub_range): Take fourth argument specifying the conversion mode. Translate numbers as necessary. * imap4d/copy.c (imap4d_copy0): Update calls to mu_msgset_create and mu_msgset_parse_imap. * imap4d/fetch.c (fetch_thunk): Likewise. * imap4d/search.c (parse_simple_key): Likewise. * imap4d/store.c (store_thunk): Likewise. * include/mailutils/msgset.h (MU_MSGSET_NUM,MU_MSGSET_UID): New defines. (mu_msgset_add,mu_msgset_sub): New protos. (mu_msgset_add_range,mu_msgset_sub_range): Take 4 arguments. All callers changed. * include/mailutils/sys/msgset.h (_mu_msgset_translate_pair) (_mu_msgset_translate_range): New protos. * libmailutils/tests/msgset.c: Reflect the above changes. * testsuite/msgset.c: Likewise. * libproto/imap/mbox.c: Update calls to mu_msgset functions. * mh/mh.h (mh_msgset_t): Remove. (mh_iterator_fp): Remove typedef. (mh_msgset_parse): Change signature. (mh_msgset_member,mh_msgset_reverse,mh_msgset_negate) (mh_msgset_current,mh_msgset_free,mh_msgset_uids): Remove protos. (mh_msgset_parse_string): New proto. (mh_msgset_first_current,mh_msgset_first): New proto. (mh_iterate: Remove proto. Use mu_msgset_foreach* functions instead. (mh_seq_add,mh_seq_delete): Change signatures. * mh/mh_init.c (mh_iterate): Remove. * mh/mh_msgset.c: Rewrite using mu_msgset_t. * mh/mh_sequence.c: Likewise. * mh/anno.c: Use new msgset functions. * mh/burst.c: Likewise. * mh/comp.c: Likewise. * mh/folder.c: Likewise. * mh/forw.c: Likewise. * mh/mark.c: Likewise. * mh/mhn.c: Likewise. * mh/mhpath.c: Likewise. * mh/mhseq.c: Likewise. * mh/pick.c: Likewise. * mh/refile.c: Likewise. * mh/repl.c: Likewise. * mh/rmm.c: Likewise. * mh/scan.c: Likewise. * mh/send.c: Likewise. * mh/sortm.c: Likewise. * mh/whatnowenv.c: Likewise. * mh/tests/mark.at: Reflect changes in the format of the saved sequences, which may contain ranges now. * mu/imap.c: Update calls to mu_msgset functions.
Showing
46 changed files
with
1175 additions
and
587 deletions
libmailutils/msgset/addset.c
0 → 100644
libmailutils/msgset/count.c
0 → 100644
libmailutils/msgset/foreachmsgno.c
0 → 100644
libmailutils/msgset/foreachuid.c
0 → 100644
libmailutils/msgset/isempty.c
0 → 100644
libmailutils/msgset/subset.c
0 → 100644
libmailutils/msgset/trans.c
0 → 100644
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment