#include <h/utils.h>
#include <h/tws.h>
#include <h/mts.h>
+#include "../sbr/m_mktemp.h"
+#include "../sbr/message_id.h"
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
struct headers *h;
for (h = table; h->value; h++)
- if (!strcasecmp (header ? header : "", h->value ? h->value : ""))
+ if (!strcasecmp (FENDNULL(header), FENDNULL(h->value)))
return (h - table);
return NOTOK;
: &netaddrs;
mp->m_next;
mp = mp->m_next)
- if (!strcasecmp (np->m_host ? np->m_host : "",
- mp->m_next->m_host ? mp->m_next->m_host : "") &&
- !strcasecmp (np->m_mbox ? np->m_mbox : "",
- mp->m_next->m_mbox ? mp->m_next->m_mbox : "") &&
+ if (!strcasecmp (FENDNULL(np->m_host),
+ FENDNULL(mp->m_next->m_host)) &&
+ !strcasecmp (FENDNULL(np->m_mbox),
+ FENDNULL(mp->m_next->m_mbox)) &&
np->m_bcc == mp->m_next->m_bcc)
return 0;
printf ("\nnet:\t");
for (mp = netaddrs.m_next; mp; mp = mp->m_next)
- printf ("%s%s@%s%s%s", mp->m_path ? mp->m_path : "",
+ printf ("%s%s@%s%s%s", FENDNULL(mp->m_path),
mp->m_mbox, mp->m_host,
mp->m_bcc ? "[BCC]" : "",
mp->m_next ? ",\n\t" : "");
}
-#define plural(x) (x == 1 ? "" : "s")
-
static void
chkadr (void)
{
if (badadr && unkadr)
die (NULL, "%d address%s unparsable, %d addressee%s undeliverable",
- badadr, plural (badadr), unkadr, plural (badadr));
+ badadr, PLURALS(badadr), unkadr, PLURALS(badadr));
if (badadr)
- die (NULL, "%d address%s unparsable", badadr, plural (badadr));
+ die (NULL, "%d address%s unparsable", badadr, PLURALS(badadr));
if (unkadr)
- die (NULL, "%d addressee%s undeliverable", unkadr, plural (unkadr));
+ die (NULL, "%d addressee%s undeliverable", unkadr, PLURALS(unkadr));
}
if (!verbose)
fprintf (stderr, " %sFcc %s: ",
msgstate == RESENT ? "Resent-" : "", folder);
- pidstatus (status, verbose ? stdout : stderr, NULL);
+ pidstatus (status, verbose ? stdout : stderr, fileproc);
} else {
if (verbose)
puts("folder ok");