diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-11-30 17:44:41 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-11-30 17:44:41 +0200 |
commit | 34361061098003122b0ce911a87123f012e79f88 (patch) | |
tree | 70f5b85a8b9bb316a79df6b37593baf83c634683 /mh/comp.c | |
parent | f5374bc2ff9bb95dd94668eb8a5fb54c88c30f22 (diff) | |
download | mailutils-34361061098003122b0ce911a87123f012e79f88.tar.gz mailutils-34361061098003122b0ce911a87123f012e79f88.tar.bz2 |
sortm: update current message number; add testsuite.
* mh/sortm.c (current_num): New variable.
(sort): Keep track of the current message UID. Store it back to
mailbox if in reorder mode.
(main): Save initial current message UID. Save global and mailbox
status before exiting.
* mh/mh.h (mh_open_folder): Change last argument name.
* mh_open_folder (mh_open_folder): Change meaning of the 2nd argument:
it contains usual stream flags now. All uses changed.
* mh/tests/sortm.at: New file.
* mh/tests/testsuite.at: Include sortm.at
* mh/tests/Makefile.am (TESTSUITE_AT): Add sortm.at.
Diffstat (limited to 'mh/comp.c')
-rw-r--r-- | mh/comp.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -249,7 +249,8 @@ main (int argc, char **argv) mh_msgset_t msgset; mu_mailbox_t mbox; - mbox = mh_open_folder (draftfolder, 1); + mbox = mh_open_folder (draftfolder, + MU_STREAM_RDWR|MU_STREAM_CREAT); mh_msgset_parse (mbox, &msgset, argc - index, argv + index, use_draft ? "cur" : "new"); @@ -275,7 +276,7 @@ main (int argc, char **argv) mh_msgset_t msgset; mu_mailbox_t mbox; - mbox = mh_open_folder (mh_current_folder (), 0); + mbox = mh_open_folder (mh_current_folder (), MU_STREAM_RDWR); mh_msgset_parse (mbox, &msgset, argc - index, argv + index, "cur"); if (msgset.count != 1) { |