*
* This code is Copyright (c) 2002, by the authors of nmh. See the
* COPYRIGHT file in the root directory of the nmh distribution for
*
* This code is Copyright (c) 2002, by the authors of nmh. See the
* COPYRIGHT file in the root directory of the nmh distribution for
main (int argc, char **argv)
{
int clearflag = 0, hdrflag = 0, ontty;
main (int argc, char **argv)
{
int clearflag = 0, hdrflag = 0, ontty;
int i, state, msgnum;
ivector_t seqnum = ivector_create (0);
int unseen, num_unseen_seq = 0;
int i, state, msgnum;
ivector_t seqnum = ivector_create (0);
int unseen, num_unseen_seq = 0;
arguments = getarguments (invo_name, argc, argv, 1);
argp = arguments;
arguments = getarguments (invo_name, argc, argv, 1);
argp = arguments;
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
state = scan (in, msgnum, -1, nfs, width, 0, 0,
state = scan (in, msgnum, -1, nfs, width, 0, 0,
- hdrflag ? file : NULL, 0L, 1);
+ hdrflag ? file : NULL, 0L, 1, &scanl);
+ charstring_free (scanl);
ap = brkstring (dp, " ", "\n");
for (i = 0; ap && *ap; i++, ap++)
ivector_push_back (seqnum, seq_getnum (mp, *ap));
num_unseen_seq = i;
ap = brkstring (dp, " ", "\n");
for (i = 0; ap && *ap; i++, ap++)
ivector_push_back (seqnum, seq_getnum (mp, *ap));
num_unseen_seq = i;
(revflag ? msgnum >= mp->lowsel : msgnum <= mp->hghsel);
msgnum += (revflag ? -1 : 1)) {
if (is_selected(mp, msgnum)) {
(revflag ? msgnum >= mp->lowsel : msgnum <= mp->hghsel);
msgnum += (revflag ? -1 : 1)) {
if (is_selected(mp, msgnum)) {
if ((in = fopen (cp = m_name (msgnum), "r")) == NULL) {
admonish (cp, "unable to open message");
continue;
if ((in = fopen (cp = m_name (msgnum), "r")) == NULL) {
admonish (cp, "unable to open message");
continue;
switch (state = scan (in, msgnum, 0, nfs, width,
msgnum == mp->curmsg, unseen,
switch (state = scan (in, msgnum, 0, nfs, width,
msgnum == mp->curmsg, unseen,