*/
#include "h/mh.h"
+#include "whatnowproc.h"
+#include "sbr/m_name.h"
+#include "sbr/m_gmprot.h"
+#include "sbr/getarguments.h"
+#include "sbr/read_switch_multiword.h"
+#include "sbr/seq_setprev.h"
+#include "sbr/seq_setcur.h"
#include "sbr/seq_save.h"
#include "sbr/showfile.h"
#include "sbr/smatch.h"
try_it_again:
strncpy (drft, buildsw ? m_maildir ("draft")
- : m_draft (dfolder, NULL, NOUSE, &isdf), sizeof(drft));
+ : m_draft (dfolder, NULL, NOUSE, &isdf), sizeof(drft) - 1);
+ // TODO(epg): Duplicated from comp.
/* Check if a draft already exists */
if (!buildsw && stat (drft, &st) != NOTOK) {
printf ("Draft \"%s\" exists (%ld bytes).", drft, (long) st.st_size);
for (i = LISTDSW; i != YESW;) {
- if (!(argp = read_switch_multiword ("\nDisposition? ",
- isdf ? aqrnl : aqrl)))
+ char *const *const words = read_switch_multiword ("\nDisposition? ", isdf ? aqrnl : aqrl);
+ if (words == NULL)
done (1);
switch (i = smatch (*argp, isdf ? aqrnl : aqrl)) {
case NOSW:
if (!form)
form = digestcomps;
} else {
- if (!form)
- form = forwcomps;
+ if (!form)
+ form = forwcomps;
}
dat[0] = digest ? issue : msgnum;
in = build_form (form, digest, dat, from, to, cc, fcc, subject,
- file ? file : fwdmsg);
+ file ? file : fwdmsg);
if ((out = creat (drft, m_gmprot ())) == NOTOK)
adios (drft, "unable to create");