-
-/*
- * repl.c -- reply to a message
+/* repl.c -- reply to a message
*
* This code is Copyright (c) 2002, by the authors of nmh. See the
* COPYRIGHT file in the root directory of the nmh distribution for
#include <h/mh.h>
#include <h/mime.h>
#include <h/utils.h>
+#include "../sbr/m_maildir.h"
#define REPL_SWITCHES \
X("group", 0, GROUPSW) \
X("width columns", 0, WIDTHSW) \
X("version", 0, VERSIONSW) \
X("help", 0, HELPSW) \
- X("file file", 4, FILESW) /* interface from msh */ \
+ X("file file", 4, FILESW) \
X("build", 5, BILDSW) /* interface from mhe */ \
X("atfile", 0, ATFILESW) \
X("noatfile", 0, NOATFILESW) \
nwhat = 0;
continue;
case BILDSW:
- buildsw++; /* fall... */
+ buildsw++;
+ /* FALLTHRU */
case NWHATSW:
nwhat++;
continue;
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
- else
- folder = pluspath (cp);
+ folder = pluspath (cp);
} else {
if (msg)
adios (NULL, "only one message at a time!");
- else
- msg = cp;
+ msg = cp;
}
}
i = YESW;
break;
default:
- advise (NULL, "say what?");
+ inform("say what?");
break;
}
}
fclose (in);
{
- char *filename = concat (mp->foldpath, "/", msg, NULL);
+ char *filename = file ? file : concat (mp->foldpath, "/", msg, NULL);
for (n = 0; n < svector_size (convert_types); ++n) {
add_convert_header (svector_at (convert_types, n),
svector_at (convert_args, n),
filename, drft);
}
- free (filename);
+ if (! file) {
+ free (filename);
+ }
}
if (nwhat)