Commit 34361061 34361061098003122b0ce911a87123f012e79f88 by Sergey Poznyakoff

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.
1 parent f5374bc2
......@@ -116,7 +116,7 @@ main (int argc, char **argv)
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
mbox = mh_open_folder (mh_current_folder (), 0);
mbox = mh_open_folder (mh_current_folder (), MU_STREAM_RDWR);
if (!component)
{
......
......@@ -721,7 +721,7 @@ main (int argc, char **argv)
argv += index;
VERBOSE ((_("Opening folder `%s'"), mh_current_folder ()));
mbox = mh_open_folder (mh_current_folder (), 0);
mbox = mh_open_folder (mh_current_folder (), MU_STREAM_RDWR);
mh_msgset_parse (mbox, &msgset, argc, argv, "cur");
if (inplace)
......@@ -729,7 +729,7 @@ main (int argc, char **argv)
size_t i, count;
VERBOSE ((_("Opening temporary folder `%s'"), tempfolder));
tmpbox = mh_open_folder (tempfolder, 1);
tmpbox = mh_open_folder (tempfolder, MU_STREAM_RDWR|MU_STREAM_CREAT);
VERBOSE ((_("Cleaning up temporary folder")));
mu_mailbox_messages_count (tmpbox, &count);
for (i = 1; i <= count; i++)
......
......@@ -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)
{
......
......@@ -839,7 +839,7 @@ int
action_pack ()
{
const char *folder_dir = mh_expand_name (NULL, mh_current_folder (), 0);
mu_mailbox_t mbox = mh_open_folder (mh_current_folder (), 0);
mu_mailbox_t mbox = mh_open_folder (mh_current_folder (), MU_STREAM_RDWR);
struct pack_tab *pack_tab;
size_t i, count, start;
int status;
......@@ -917,7 +917,7 @@ action_pack ()
/* Fix-up sequences */
if (!dry_run)
{
mbox = mh_open_folder (mh_current_folder (), 0);
mbox = mh_open_folder (mh_current_folder (), MU_STREAM_RDWR);
fd.mbox = mbox;
fd.folder_dir = folder_dir;
fd.pack_tab = pack_tab;
......@@ -967,7 +967,7 @@ main (int argc, char **argv)
if (argc - index == 1)
{
mu_mailbox_t mbox = mh_open_folder (mh_current_folder (), 0);
mu_mailbox_t mbox = mh_open_folder (mh_current_folder (), MU_STREAM_RDWR);
mh_msgset_parse (mbox, &msgset, argc - index, argv + index, "cur");
mh_msgset_current (mbox, &msgset, 0);
mh_global_save_state ();
......
......@@ -503,7 +503,7 @@ main (int argc, char **argv)
}
else
{
mbox = mh_open_folder (mh_current_folder (), 0);
mbox = mh_open_folder (mh_current_folder (), MU_STREAM_RDWR);
mh_msgset_parse (mbox, &msgset, argc, argv, "cur");
}
......
......@@ -219,7 +219,7 @@ main (int argc, char **argv)
exit (1);
}
output = mh_open_folder (append_folder, 1);
output = mh_open_folder (append_folder, MU_STREAM_RDWR|MU_STREAM_CREAT);
if ((rc = mu_mailbox_messages_count (output, &lastmsg)) != 0)
{
mu_error (_("cannot read output mailbox: %s"),
......
......@@ -201,7 +201,7 @@ main (int argc, char **argv)
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
mbox = mh_open_folder (mh_current_folder (), 0);
mbox = mh_open_folder (mh_current_folder (), MU_STREAM_RDWR);
mu_mailbox_get_url (mbox, &url);
mbox_dir = mu_url_to_string (url);
if (memcmp (mbox_dir, "mh:", 3) == 0)
......
......@@ -302,7 +302,7 @@ void mh_audit_close (FILE *fp);
int mh_message_number (mu_message_t msg, size_t *pnum);
mu_mailbox_t mh_open_folder (const char *folder, int create);
mu_mailbox_t mh_open_folder (const char *folder, int flags);
void mh_msgset_parse (mu_mailbox_t mbox, mh_msgset_t *msgset,
int argc, char **argv, char *def);
......
......@@ -443,14 +443,13 @@ mh_message_number (mu_message_t msg, size_t *pnum)
}
mu_mailbox_t
mh_open_folder (const char *folder, int create)
mh_open_folder (const char *folder, int flags)
{
mu_mailbox_t mbox = NULL;
char *name;
int flags = MU_STREAM_RDWR;
name = mh_expand_name (NULL, folder, 1);
if (create && mh_check_folder (name, 1))
if ((flags & MU_STREAM_CREAT) && mh_check_folder (name, 1))
exit (0);
if (mu_mailbox_create_default (&mbox, name))
......@@ -460,9 +459,6 @@ mh_open_folder (const char *folder, int create)
exit (1);
}
if (create)
flags |= MU_STREAM_CREAT;
if (mu_mailbox_open (mbox, flags))
{
mu_error (_("cannot open mailbox %s: %s"), name, strerror (errno));
......@@ -1045,7 +1041,7 @@ mh_draft_message (const char *name, const char *msgspec, char **pname)
mu_mailbox_t mbox;
const char *path;
mbox = mh_open_folder (name, 0);
mbox = mh_open_folder (name, MU_STREAM_RDWR);
if (!mbox)
return 1;
......
......@@ -1684,7 +1684,8 @@ store_handler (mu_message_t msg, msg_part_t part, char *type, char *encoding,
case store_to_folder_msg:
case store_to_folder:
{
mu_mailbox_t mbox = mh_open_folder (name, 1);
mu_mailbox_t mbox = mh_open_folder (name,
MU_STREAM_RDWR|MU_STREAM_CREAT);
size_t uid;
mu_mailbox_uidnext (mbox, &uid);
......@@ -2284,12 +2285,12 @@ edit_forw (char *cmd, struct compose_env *env, mu_message_t *pmsg, int level)
if (ws.ws_wordv[0][0] == '+')
{
mbox = mh_open_folder (ws.ws_wordv[0], 0);
mbox = mh_open_folder (ws.ws_wordv[0], MU_STREAM_RDWR);
i = 1;
}
else
{
mbox = mh_open_folder (mh_current_folder (), 0);
mbox = mh_open_folder (mh_current_folder (), MU_STREAM_RDWR);
i = 0;
}
......@@ -2930,7 +2931,7 @@ main (int argc, char **argv)
}
else
{
mbox = mh_open_folder (mh_current_folder (), 0);
mbox = mh_open_folder (mh_current_folder (), MU_STREAM_RDWR);
mh_msgset_parse (mbox, &msgset, argc, argv, "cur");
}
......
......@@ -87,7 +87,7 @@ main (int argc, char **argv)
exit (0);
}
mbox = mh_open_folder (current_folder, 0);
mbox = mh_open_folder (current_folder, MU_STREAM_RDWR);
mu_mailbox_messages_count (mbox, &total);
mu_mailbox_get_url (mbox, &url);
......
......@@ -80,7 +80,7 @@ main (int argc, char **argv)
argc -= index;
argv += index;
mbox = mh_open_folder (mh_current_folder (), 0);
mbox = mh_open_folder (mh_current_folder (), MU_STREAM_RDWR);
mh_msgset_parse (mbox, &msgset, argc, argv, "cur");
if (uid_option)
......
......@@ -390,7 +390,7 @@ main (int argc, char **argv)
if (pick_parse (lexlist))
return 1;
mbox = mh_open_folder (mh_current_folder (), 0);
mbox = mh_open_folder (mh_current_folder (), MU_STREAM_RDWR);
argc -= index;
argv += index;
......
......@@ -104,7 +104,7 @@ open_folders ()
mu_mailbox_t mbox;
mu_iterator_current (itr, (void **)&name);
mbox = mh_open_folder (name, 1);
mbox = mh_open_folder (name, MU_STREAM_RDWR|MU_STREAM_CREAT);
mu_list_append (folder_mbox_list, mbox);
free (name);
}
......@@ -261,7 +261,7 @@ main (int argc, char **argv)
}
else
{
mbox = mh_open_folder (mh_current_folder (), 0);
mbox = mh_open_folder (mh_current_folder (), MU_STREAM_RDWR);
mh_msgset_parse (mbox, &msgset, argc, argv, "cur");
status = mh_iterate (mbox, &msgset, refile_iterator, NULL);
......
......@@ -407,7 +407,7 @@ main (int argc, char **argv)
exit (1);
}
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)
{
......
......@@ -94,7 +94,7 @@ opt_handler (int key, char *arg, struct argp_state *state)
static char *
current_folder_path ()
{
mu_mailbox_t mbox = mh_open_folder (mh_current_folder (), 0);
mu_mailbox_t mbox = mh_open_folder (mh_current_folder (), MU_STREAM_RDWR);
mu_url_t url;
char *p;
mu_mailbox_get_url (mbox, &url);
......
......@@ -73,7 +73,7 @@ main (int argc, char **argv)
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
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");
......
......@@ -179,7 +179,7 @@ main (int argc, char **argv)
exit (1);
}
mbox = mh_open_folder (mh_current_folder (), 0);
mbox = mh_open_folder (mh_current_folder (), MU_STREAM_RDWR);
argc -= index;
argv += index;
......
......@@ -765,7 +765,7 @@ main (int argc, char **argv)
const char *path;
size_t i;
mbox = mh_open_folder (draftfolder, 1);
mbox = mh_open_folder (draftfolder, MU_STREAM_RDWR|MU_STREAM_CREAT);
mh_msgset_parse (mbox, &msgset, argc, argv, draftmessage);
mu_mailbox_get_url (mbox, &url);
mu_url_sget_path (url, &path);
......
......@@ -93,6 +93,7 @@ static int verbose;
static mu_mailbox_t mbox;
static const char *mbox_path;
static mh_msgset_t msgset;
static size_t current_num;
#define ACTION_REORDER 0
#define ACTION_DRY_RUN 1
......@@ -193,7 +194,8 @@ opt_handler (int key, char *arg, struct argp_state *state)
/* *********************** Comparison functions **************************** */
struct comp_op {
struct comp_op
{
char *field;
compfun comp;
};
......@@ -219,7 +221,8 @@ addop (char *field, compfun comp)
mu_list_append (oplist, op);
}
struct rem_data {
struct rem_data
{
struct comp_op *op;
compfun comp;
};
......@@ -244,7 +247,8 @@ remop (compfun comp)
mu_list_remove (oplist, d.op);
}
struct comp_data {
struct comp_data
{
int r;
mu_message_t m[2];
};
......@@ -491,7 +495,7 @@ sort ()
switch (algorithm)
{
case ARG_QUICKSORT:
qsort(msgset.list, msgset.count, sizeof(msgset.list[0]),
qsort(msgset.list, msgset.count, sizeof (msgset.list[0]),
comp);
break;
......@@ -528,14 +532,36 @@ sort ()
mh_message_number (msg, &new_num);
transpose (i, oldlist[i]);
if (verbose)
fprintf (stderr, "{%s, %s}\n",
mu_umaxtostr (0, old_num),
mu_umaxtostr (1, new_num));
{
fprintf (stderr, "{%s, %s}",
mu_umaxtostr (0, old_num),
mu_umaxtostr (1, new_num));
}
if (old_num == current_num)
{
if (verbose)
fputc ('*', stderr);
current_num = new_num;
}
else if (new_num == current_num)
{
if (verbose)
fputc ('*', stderr);
current_num = old_num;
}
if (verbose)
fputc ('\n', stderr);
if (action == ACTION_REORDER)
swap_message (old_num, new_num);
}
}
}
if (action == ACTION_REORDER)
{
mu_mailbox_close (mbox);
mu_mailbox_open (mbox, MU_STREAM_RDWR);
mh_mailbox_set_cur (mbox, current_num);
}
}
......@@ -560,7 +586,7 @@ main (int argc, char **argv)
exit (1);
}
mbox = mh_open_folder (mh_current_folder (), 0);
mbox = mh_open_folder (mh_current_folder (), MU_STREAM_READ);
mu_mailbox_get_url (mbox, &url);
mbox_path = mu_url_to_string (url);
if (memcmp (mbox_path, "mh:", 3) == 0)
......@@ -569,7 +595,12 @@ main (int argc, char **argv)
argc -= index;
argv += index;
mh_mailbox_get_cur (mbox, &current_num);
mh_msgset_parse (mbox, &msgset, argc, argv, "all");
sort (mbox, msgset);
sort ();
mh_global_save_state ();
mu_mailbox_destroy (&mbox);
return 0;
}
......
......@@ -56,6 +56,7 @@ TESTSUITE_AT = \
pick.at\
scan.at\
send.at\
sortm.at\
refile.at\
repl.at\
rmf.at\
......
# This file is part of GNU Mailutils. -*- Autotest -*-
# Copyright (C) 2010 Free Software Foundation, Inc.
#
# GNU Mailutils is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3, or (at
# your option) any later version.
#
# GNU Mailutils is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
m4_pushdef([MH_KEYWORDS],[sortm])
m4_pushdef([scancmd],[scan -format '%4(msg)%<(cur)+%| %> %02(mon{date})/%02(mday{date}) %24(friendly{from}) %{subject}'])
MH_CHECK([sortm -textfield],[sortm00 sortm-textfield],[
MUT_MBCOPY($abs_top_srcdir/testsuite/mh/teaparty,[Mail])
echo "cur: 11" > Mail/teaparty/.mh_sequences
sortm -text From -nodate +teaparty || exit $?
scancmd
],
[0],
[ 1 07/29 Alice Re: Invitation
2 07/29 Alice Re: Invitation
3 07/29 Alice Re: Invitation
4 07/29 Alice Re: Personal remark
5 07/29 Alice Re: Riddle
6 07/29 Alice Re: Riddle
7 07/29 Alice Re: Be specific
8 07/29 Alice Re: Watch
9 07/29 Alice Funny watch (was Re: Watch)
10 07/29 Alice Re: Funny watch
11 07/29 Alice Re: Funny watch
12 07/29 Alice Re: Riddle
13 07/29 Alice Re: Riddle
14 07/29 Alice Re: Discussing Time
15 07/29 Alice Re: Discussing Time
16 07/29 Alice Re: Discussing Time
17 07/29 Alice Re: Discussing Time
18 07/29 Alice Re: Discussing Time
19 07/29 Alice Re: Discussing Time
20 07/29 Alice A guess (was Re: Discussing Time)
21 07/29 Alice Re: A guess
22 07/29 Alice Re: A guess
23 07/29 Alice Re: Request for a story
24 07/29 Alice Re: Request for a story
25 07/29 Alice Re: Story
26 07/29 Alice Re: Story
27 07/29 Alice Re: Story
28 07/29 Alice Re: Remark
29 07/29 Alice Personal remark
30 07/29 Alice Re: Story
31 07/29 Alice Re: Story
32 07/29 Alice Re: Story
33 07/29 Alice Re: Story
34 07/29 Alice Re: Story
35 07/29 Alice Re: Story
36 07/29 Alice Re: Story
37 07/29 Alice Re: Story
38 07/29 Alice Thoughts
39 07/29 Dormouse Re: Be specific
40 07/29 Dormouse Re: Remark
41 07/29 Dormouse Re: Discussing Time
42 07/29 Dormouse Re: Request for a story
43 07/29 Dormouse Story (was Re: Request for a story)
44 07/29 Dormouse Re: Story
45 07/29 Dormouse Re: Story
46 07/29 Dormouse Re: Story
47 07/29 Dormouse Re: Story
48 07/29 Dormouse Re: Story
49 07/29 Dormouse Re: Story
50 07/29 Dormouse Re: Story
51 07/29 Dormouse Re: Story
52 07/29 Dormouse Re: Story
53 07/29 Dormouse Re: Story
54 07/29 Hatter Re: Be specific
55 07/29 Hatter Re: Be specific
56 07/29 Hatter Watch
57 07/29 Hatter Re: Watch
58 07/29 Hatter Re: Watch
59 07/29 Hatter Re: Funny watch
60 07/29 Hatter Re: Funny watch
61 07/29 Hatter Remark
62 07/29 Hatter Re: Riddle
63 07/29 Hatter Re: Riddle
64 07/29 Hatter Discussing Time
65 07/29 Hatter Re: Discussing Time
66 07/29 Hatter Re: Discussing Time
67 07/29 Hatter Re: Discussing Time
68 07/29 Hatter Re: Discussing Time
69 07/29 Hatter Re: Discussing Time
70 07/29 Hatter Re: Discussing Time
71 07/29 Hatter Re: Discussing Time
72 07/29 Hatter Re: A guess
73 07/29 Hatter Re: A guess
74 07/29 Hatter Re: Request for a story
75 07/29 Hatter Re: Request for a story
76 07/29 Hatter Re: Remark
77 07/29 Hatter Re: Personal remark
78 07/29 Hatter Let's move
79 07/29 Hatter Re: Story
80 07/29 Hatter Rude remark
81 07/29 March Hare Invitation
82 07/29 March Hare Re: Invitation
83 07/29 March Hare Re: Invitation
84 07/29 March Hare Personal remark
85 07/29 March Hare Riddle (was Re: Personal remark)
86+ 07/29 March Hare Re: Riddle
87 07/29 March Hare Be specific (was Re: Riddle)
88 07/29 March Hare Re: Be specific
89 07/29 March Hare Re: Watch
90 07/29 March Hare Re: Watch
91 07/29 March Hare Re: Riddle
92 07/29 March Hare Thought apart Re: Discussing Time
93 07/29 March Hare Request for a story (was Re: A guess)
94 07/29 March Hare Re: Request for a story
95 07/29 March Hare Remark
])
MH_CHECK([sortm -datefield],[sortm01 sortm-datefield],[
MUT_MBCOPY($abs_top_srcdir/testsuite/mh/teaparty,[Mail])
echo "cur: 11" > Mail/teaparty/.mh_sequences
sortm -text From -nodate +teaparty || exit $?
scancmd
sortm
scancmd
],
[0],
[ 1 07/29 Alice Re: Invitation
2 07/29 Alice Re: Invitation
3 07/29 Alice Re: Invitation
4 07/29 Alice Re: Personal remark
5 07/29 Alice Re: Riddle
6 07/29 Alice Re: Riddle
7 07/29 Alice Re: Be specific
8 07/29 Alice Re: Watch
9 07/29 Alice Funny watch (was Re: Watch)
10 07/29 Alice Re: Funny watch
11 07/29 Alice Re: Funny watch
12 07/29 Alice Re: Riddle
13 07/29 Alice Re: Riddle
14 07/29 Alice Re: Discussing Time
15 07/29 Alice Re: Discussing Time
16 07/29 Alice Re: Discussing Time
17 07/29 Alice Re: Discussing Time
18 07/29 Alice Re: Discussing Time
19 07/29 Alice Re: Discussing Time
20 07/29 Alice A guess (was Re: Discussing Time)
21 07/29 Alice Re: A guess
22 07/29 Alice Re: A guess
23 07/29 Alice Re: Request for a story
24 07/29 Alice Re: Request for a story
25 07/29 Alice Re: Story
26 07/29 Alice Re: Story
27 07/29 Alice Re: Story
28 07/29 Alice Re: Remark
29 07/29 Alice Personal remark
30 07/29 Alice Re: Story
31 07/29 Alice Re: Story
32 07/29 Alice Re: Story
33 07/29 Alice Re: Story
34 07/29 Alice Re: Story
35 07/29 Alice Re: Story
36 07/29 Alice Re: Story
37 07/29 Alice Re: Story
38 07/29 Alice Thoughts
39 07/29 Dormouse Re: Be specific
40 07/29 Dormouse Re: Remark
41 07/29 Dormouse Re: Discussing Time
42 07/29 Dormouse Re: Request for a story
43 07/29 Dormouse Story (was Re: Request for a story)
44 07/29 Dormouse Re: Story
45 07/29 Dormouse Re: Story
46 07/29 Dormouse Re: Story
47 07/29 Dormouse Re: Story
48 07/29 Dormouse Re: Story
49 07/29 Dormouse Re: Story
50 07/29 Dormouse Re: Story
51 07/29 Dormouse Re: Story
52 07/29 Dormouse Re: Story
53 07/29 Dormouse Re: Story
54 07/29 Hatter Re: Be specific
55 07/29 Hatter Re: Be specific
56 07/29 Hatter Watch
57 07/29 Hatter Re: Watch
58 07/29 Hatter Re: Watch
59 07/29 Hatter Re: Funny watch
60 07/29 Hatter Re: Funny watch
61 07/29 Hatter Remark
62 07/29 Hatter Re: Riddle
63 07/29 Hatter Re: Riddle
64 07/29 Hatter Discussing Time
65 07/29 Hatter Re: Discussing Time
66 07/29 Hatter Re: Discussing Time
67 07/29 Hatter Re: Discussing Time
68 07/29 Hatter Re: Discussing Time
69 07/29 Hatter Re: Discussing Time
70 07/29 Hatter Re: Discussing Time
71 07/29 Hatter Re: Discussing Time
72 07/29 Hatter Re: A guess
73 07/29 Hatter Re: A guess
74 07/29 Hatter Re: Request for a story
75 07/29 Hatter Re: Request for a story
76 07/29 Hatter Re: Remark
77 07/29 Hatter Re: Personal remark
78 07/29 Hatter Let's move
79 07/29 Hatter Re: Story
80 07/29 Hatter Rude remark
81 07/29 March Hare Invitation
82 07/29 March Hare Re: Invitation
83 07/29 March Hare Re: Invitation
84 07/29 March Hare Personal remark
85 07/29 March Hare Riddle (was Re: Personal remark)
86+ 07/29 March Hare Re: Riddle
87 07/29 March Hare Be specific (was Re: Riddle)
88 07/29 March Hare Re: Be specific
89 07/29 March Hare Re: Watch
90 07/29 March Hare Re: Watch
91 07/29 March Hare Re: Riddle
92 07/29 March Hare Thought apart Re: Discussing Time
93 07/29 March Hare Request for a story (was Re: A guess)
94 07/29 March Hare Re: Request for a story
95 07/29 March Hare Remark
1 07/29 March Hare Invitation
2 07/29 Alice Re: Invitation
3 07/29 March Hare Re: Invitation
4 07/29 Alice Re: Invitation
5 07/29 March Hare Re: Invitation
6 07/29 Alice Re: Invitation
7 07/29 March Hare Personal remark
8 07/29 Alice Re: Personal remark
9 07/29 March Hare Riddle (was Re: Personal remark)
10 07/29 Alice Re: Riddle
11+ 07/29 March Hare Re: Riddle
12 07/29 Alice Re: Riddle
13 07/29 March Hare Be specific (was Re: Riddle)
14 07/29 Alice Re: Be specific
15 07/29 Hatter Re: Be specific
16 07/29 March Hare Re: Be specific
17 07/29 Dormouse Re: Be specific
18 07/29 Hatter Re: Be specific
19 07/29 Hatter Watch
20 07/29 Alice Re: Watch
21 07/29 Hatter Re: Watch
22 07/29 March Hare Re: Watch
23 07/29 Hatter Re: Watch
24 07/29 March Hare Re: Watch
25 07/29 Alice Funny watch (was Re: Watch)
26 07/29 Hatter Re: Funny watch
27 07/29 Alice Re: Funny watch
28 07/29 Hatter Re: Funny watch
29 07/29 Alice Re: Funny watch
30 07/29 Hatter Remark
31 07/29 Dormouse Re: Remark
32 07/29 Hatter Re: Riddle
33 07/29 Alice Re: Riddle
34 07/29 Hatter Re: Riddle
35 07/29 March Hare Re: Riddle
36 07/29 Alice Re: Riddle
37 07/29 Hatter Discussing Time
38 07/29 Alice Re: Discussing Time
39 07/29 Hatter Re: Discussing Time
40 07/29 Alice Re: Discussing Time
41 07/29 Hatter Re: Discussing Time
42 07/29 March Hare Thought apart Re: Discussing Time
43 07/29 Alice Re: Discussing Time
44 07/29 Hatter Re: Discussing Time
45 07/29 Alice Re: Discussing Time
46 07/29 Hatter Re: Discussing Time
47 07/29 Alice Re: Discussing Time
48 07/29 Hatter Re: Discussing Time
49 07/29 Dormouse Re: Discussing Time
50 07/29 Hatter Re: Discussing Time
51 07/29 Alice Re: Discussing Time
52 07/29 Hatter Re: Discussing Time
53 07/29 Alice A guess (was Re: Discussing Time)
54 07/29 Hatter Re: A guess
55 07/29 Alice Re: A guess
56 07/29 Hatter Re: A guess
57 07/29 Alice Re: A guess
58 07/29 March Hare Request for a story (was Re: A guess)
59 07/29 Alice Re: Request for a story
60 07/29 Hatter Re: Request for a story
61 07/29 Dormouse Re: Request for a story
62 07/29 March Hare Re: Request for a story
63 07/29 Alice Re: Request for a story
64 07/29 Hatter Re: Request for a story
65 07/29 Dormouse Story (was Re: Request for a story)
66 07/29 Alice Re: Story
67 07/29 Dormouse Re: Story
68 07/29 Alice Re: Story
69 07/29 Dormouse Re: Story
70 07/29 Alice Re: Story
71 07/29 March Hare Remark
72 07/29 Alice Re: Remark
73 07/29 Hatter Re: Remark
74 07/29 Alice Personal remark
75 07/29 Hatter Re: Personal remark
76 07/29 Alice Re: Story
77 07/29 Dormouse Re: Story
78 07/29 Alice Re: Story
79 07/29 Dormouse Re: Story
80 07/29 Alice Re: Story
81 07/29 Dormouse Re: Story
82 07/29 Alice Re: Story
83 07/29 Dormouse Re: Story
84 07/29 Hatter Let's move
85 07/29 Alice Re: Story
86 07/29 Hatter Re: Story
87 07/29 Alice Re: Story
88 07/29 Dormouse Re: Story
89 07/29 Dormouse Re: Story
90 07/29 Alice Re: Story
91 07/29 Dormouse Re: Story
92 07/29 Dormouse Re: Story
93 07/29 Alice Re: Story
94 07/29 Hatter Rude remark
95 07/29 Alice Thoughts
])
m4_popdef([scancmd])
m4_popdef([MH_KEYWORDS])
# End of sortm.at
......@@ -81,3 +81,4 @@ m4_include([forw.at])
m4_include([repl.at])
m4_include([mhn.at])
m4_include([send.at])
m4_include([sortm.at])
......
......@@ -42,7 +42,7 @@ mh_whatnow_env_from_environ (struct mh_whatnow_env *wh)
size_t i;
struct mu_wordsplit ws;
mh_msgset_t msgset;
mu_mailbox_t mbox = mh_open_folder (folder, 0);
mu_mailbox_t mbox = mh_open_folder (folder, MU_STREAM_RDWR);
if (mu_wordsplit (p, &ws,
MU_WRDSF_DEFFLAGS & ~MU_WRDSF_CESCAPES))
......