diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-11-22 22:26:29 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-11-22 23:20:16 +0200 |
commit | 46b844cf0c0623dd370573ce6da21dd8aa6fd907 (patch) | |
tree | 7f23032ee01646f43723910e35bf6cecd38155f4 /libmailutils/base | |
parent | e34d8c168f9031dbfc2441006e0eb24182ef4389 (diff) | |
download | mailutils-46b844cf0c0623dd370573ce6da21dd8aa6fd907.tar.gz mailutils-46b844cf0c0623dd370573ce6da21dd8aa6fd907.tar.bz2 |
Provide a library function for translating message UIDs to numbers and vice versa.
* include/mailutils/mailbox.h (MU_MAILBOX_UID_TO_MSGNO)
(MU_MAILBOX_MSGNO_TO_UID): New defines.
(mu_mailbox_translate): New proto.
* include/mailutils/sys/mailbox.h (_mu_mailbox) <_translate>: New
method.
* libmailutils/mailbox/mailbox.c (mu_mailbox_translate): New
function.
* libproto/mh/mbox.c (mh_translate): New function. Implements
the _translate method.
* mh/mh_msgset.c (mh_uid_to_msgno, mh_msgno_to_uid): Remove. All
callers updated to use mu_mailbox_translate instead.
(mh_search_message): Remove.
(mh_get_message): Rewrite using mu_mailbox_translate.
* mh/comp.c (copy_message): Check return from mu_mailbox_get_message.
* mh/mh_init.c (mh_draft_message): Rewrite using mu_url_sget_path.
* mh/tests/comp.at: Test draftfolder functionality.
Diffstat (limited to 'libmailutils/base')
-rw-r--r-- | libmailutils/base/amd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libmailutils/base/amd.c b/libmailutils/base/amd.c index c2f3b341c..acbfb296b 100644 --- a/libmailutils/base/amd.c +++ b/libmailutils/base/amd.c @@ -167,7 +167,7 @@ amd_msg_bsearch (struct _amd_data *amd, mu_off_t first, mu_off_t last, /* Search for message MSG in the message array of AMD. If found, return 0 and store index of the located entry in the - variable PRET. Otherwise, return 1 and place into PRET index of + variable PRET. Otherwise, return 1 and store in PRET the index of the array element that is less than MSG (in the sense of amd->msg_cmp) Index returned in PRET is 1-based, so *PRET == 0 means that MSG |