#include <h/md5.h>
#include <h/mts.h>
#include <h/tws.h>
+#include <h/fmt_scan.h>
#include <h/mime.h>
#include <h/mhparse.h>
#include <h/utils.h>
+#include "mhshowsbr.h"
+#include "../sbr/m_maildir.h"
+#include "../sbr/m_mktemp.h"
enum clobber_policy_t {
NMH_CLOBBER_ALWAYS = 0,
for (ctq = base; *ctq; ctq++) {
p = *ctq;
pm = (struct partial *) p->c_ctparams;
- if (pm->pm_marked != cur) {
- if (pm->pm_marked == cur - 1) {
- inform("duplicate part %d of %d part multipart message, continuing...",
- pm->pm_marked, hi);
- continue;
- }
+ if (pm->pm_marked == cur) {
+ cur++;
+ continue;
+ }
+
+ if (pm->pm_marked == cur - 1) {
+ inform("duplicate part %d of %d part multipart message, continuing...",
+ pm->pm_marked, hi);
+ continue;
+ }
missing_part:
- inform("missing %spart %d of %d part multipart message",
- cur != hi ? "(at least) " : "", cur, hi);
- goto losing;
- }
- else
- cur++;
+ inform("missing %spart %d of %d part multipart message",
+ cur != hi ? "(at least) " : "", cur, hi);
+ goto losing;
}
if (hi != --cur) {
cur = hi;
* appropriate directory.
*/
if (*cp != '/' && *cp != '|' && *cp != '!') {
- snprintf (bp, buflen, "%s/", dir[1] ? dir : "");
+ if (!strcmp(dir, "/"))
+ dir = ""; /* Don't start with "//". */
+ snprintf (bp, buflen, "%s/", dir);
len = strlen (bp);
bp += len;
buflen -= len;
*bp = '\0';
buflen--;
continue;
- } else {
+ }
+ {
PM pm;
char *s = "";
break;
case 'p':
- /* insert part number withouth leading dot */
+ /* insert part number without leading dot */
if (ct->c_partno)
strncpy (bp, ct->c_partno, buflen);
break;