summaryrefslogtreecommitdiff
path: root/mh/comp.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2010-11-30 17:44:41 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2010-11-30 17:44:41 +0200
commit34361061098003122b0ce911a87123f012e79f88 (patch)
tree70f5b85a8b9bb316a79df6b37593baf83c634683 /mh/comp.c
parentf5374bc2ff9bb95dd94668eb8a5fb54c88c30f22 (diff)
downloadmailutils-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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mh/comp.c b/mh/comp.c
index cdb5c5a87..c2333173d 100644
--- a/mh/comp.c
+++ b/mh/comp.c
@@ -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)
{

Return to:

Send suggestions and report system problems to the System administrator.