/*
- * send.c -- send a composed 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
- * complete copyright information.
- */
+** send.c -- send a composed 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
+** complete copyright information.
+*/
#include <h/mh.h>
#include <fcntl.h>
adios (NULL, "-%s unknown\n", cp);
case HELPSW:
- snprintf (buf, sizeof(buf), "%s [file] [switches]", invo_name);
+ snprintf (buf, sizeof(buf),
+ "%s [file] [switches]",
+ invo_name);
print_help (buf, switches, 1);
done (1);
case VERSIONSW:
}
/*
- * check for "Aliasfile:" profile entry
- */
+ ** check for "Aliasfile:" profile entry
+ */
if ((cp = context_find ("Aliasfile"))) {
char *dp = NULL;
- for (ap = brkstring(dp = getcpy(cp), " ", "\n"); ap && *ap; ap++) {
+ for (ap = brkstring(dp = getcpy(cp), " ", "\n"); ap && *ap;
+ ap++) {
vec[vecp++] = "-alias";
vec[vecp++] = *ap;
}
#ifdef UCI
else {
snprintf (buf, sizeof(buf), "%s/.signature", mypath);
- if ((fp = fopen (buf, "r")) != NULL
- && fgets (buf, sizeof buf, fp) != NULL) {
+ if ((fp = fopen (buf, "r")) != NULL &&
+ fgets(buf, sizeof buf, fp) != NULL) {
fclose (fp);
if (cp = strchr (buf, '\n'))
*cp = 0;
&& errno != EISREMOTE
#endif /* EISREMOTE */
)
- adios (distfile, "unable to link %s to", altmsg);
+ adios (distfile, "unable to link %s to",
+ altmsg);
free (distfile);
- distfile = getcpy (m_mktemp2(NULL, invo_name, NULL, NULL));
+ distfile = getcpy (m_mktemp2(NULL, invo_name,
+ NULL, NULL));
{
int in, out;
struct stat st;
if ((in = open (altmsg, O_RDONLY)) == NOTOK)
adios (altmsg, "unable to open");
fstat(in, &st);
- if ((out = creat (distfile, (int) st.st_mode & 0777)) == NOTOK)
+ if ((out = creat (distfile,
+ (int) st.st_mode & 0777))
+ == NOTOK)
adios (distfile, "unable to write");
cpydata (in, out, altmsg, distfile);
close (in);
for (msgnum = 0; msgnum < msgp; msgnum++) {
switch (sendsbr (vec, vecp, msgs[msgnum], &st, 1, attach,
- attachformat)) {
+ attachformat)) {
case DONE:
done (++status);
case NOTOK: