-
-/*
- * comp.c -- compose a message
+/* comp.c -- compose 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/utils.h>
#include <h/fmt_scan.h>
+#include "sbr/m_maildir.h"
#include <fcntl.h>
#define COMP_SWITCHES \
X("cc address", 0, CCSW) \
X("from address", 0, FROMSW) \
X("fcc mailbox", 0, FCCSW) \
- X("width colums", 0, WIDTHSW) \
+ X("width columns", 0, WIDTHSW) \
X("subject text", 0, SUBJECTSW) \
#define X(sw, minchars, id) id,
case BILDSW:
build++;
- /* fall through */
+ /* FALLTHRU */
case NWHATSW:
nwhat++;
continue;
if (*cp == '@')
cp = dp = path(cp + 1, TSUBCWF);
fcc = addlist(fcc, cp);
- if (dp)
- free(dp);
+ free(dp);
continue;
case WIDTHSW:
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;
}
}
- cwd = getcpy (pwd ());
+ cwd = mh_xstrdup(pwd ());
if (!context_find ("path"))
free (path ("./", TFOLDER));
if (mp->numsel > 1)
adios (NULL, "only one message at a time!");
- if ((in = open (form = getcpy (m_name (mp->lowsel)), O_RDONLY)) == NOTOK)
+ if ((in = open (form = mh_xstrdup(m_name (mp->lowsel)), O_RDONLY)) == NOTOK)
adios (form, "unable to open message");
} else {
struct comp *cptr;
i = YESW;
break;
default:
- advise (NULL, "say what?");
+ inform("say what?");
break;
}
}
if (nwhat)
done (0);
- what_now (ed, nedit, use, drft, NULL, 0, NULLMP, NULL, 0, cwd, 0);
+ what_now (ed, nedit, use, drft, NULL, 0, NULL, NULL, 0, cwd, 0);
done (1);
return 1;
}