*/
if (tls & S_INITTLS) {
- if (netsec_negotiate_tls(nsc, &errstr) != OK) {
+ if (netsec_negotiate_tls(nsc, &errstr) != OK) {
sm_end(NOTOK);
return sm_nerror(errstr);
}
*/
if (sasl) {
- char *server_mechs;
+ char *server_mechs;
if (! (server_mechs = EHLOset("AUTH"))) {
sm_end(NOTOK);
return sm_ierror("SMTP server does not support SASL");
rc = sizeof(sm_reply.text) - 1;
for (more = false; (buffer = netsec_readline(nsc, &buflen,
- &errstr)) != NULL ; ) {
+ &errstr)) != NULL ; ) {
if (doingEHLO
&& has_prefix(buffer, "250")
header Compilers:
cc -v 2>&1 | offset
- header Installed packages:
+ header Installed packages:
#### pkg(7) or pkg_info(1) might not always be available.
(pkg info 2>/dev/null | offset) || true
(pkg_info 2>/dev/null | offset) || true
while (vfgets (fp, &ap) == OK) {
bp = ap;
switch (*(pp = scanp (bp))) {
- case '<': /* recurse a level */
+ case '<': /* recurse a level */
if (!*(cp = getp (pp + 1))) {
akerrst = "'<' without alias-file";
fclose (fp);
return i;
}
continue;
- case ':': /* comment */
- case ';':
+ case ':': /* comment */
+ case ';':
case '#':
case 0:
continue;
}
switch (*(pp = scanp (ap))) {
- case 0: /* EOL */
+ case 0: /* EOL */
fclose (fp);
return AK_ERROR;
- case '<': /* read values from file */
+ case '<': /* read values from file */
if (!*(cp = getp (pp + 1))) {
fclose (fp);
return AK_ERROR;
}
break;
- default: /* list */
+ default: /* list */
while ((cp = getalias (pp)))
add_aka (ak, cp);
break;
number = 1;
else {
- if (strcmp(*argp, "all") == 0)
- number = -1;
+ if (strcmp(*argp, "all") == 0)
+ number = -1;
- else if (!(number = atoi(*argp)))
+ else if (!(number = atoi(*argp)))
die("missing argument to %s", argp[-1]);
argp++;
continue;
case MIMESW:
- mimesw = 2;
+ mimesw = 2;
continue;
case NMIMESW:
- mimesw = 0;
+ mimesw = 0;
continue;
case AUTOMIMESW:
- mimesw = 1;
+ mimesw = 1;
continue;
case QIETSW:
*/
if (*mimesw > 0) {
- content = parse_mime(msgnam);
+ content = parse_mime(msgnam);
if (! content && *mimesw == 2)
return 0;
if (content) {
find_mime_parts(content, smsgs, &msgp);
free_content(content);
if (msgp == 1 && *mimesw == 2)
- adios (msgnam, "does not have any message/rfc822 parts");
+ adios (msgnam, "does not have any message/rfc822 parts");
if (msgp > 1) {
- *mimesw = 1;
+ *mimesw = 1;
return msgp - 1;
}
}
adios (msgnam, "unable to read message");
for (msgp = 0, pos = 0L; msgp <= MAXFOLDER;) {
- /*
+ /*
* We're either at the beginning of the whole message, or
* we're just past the delimiter of the last message.
* Swallow lines until we get to something that's not a newline
*/
if (content->c_type == CT_MESSAGE &&
- content->c_subtype == MESSAGE_RFC822) {
+ content->c_subtype == MESSAGE_RFC822) {
smsgs[*msgp].s_start = content->c_begin;
smsgs[*msgp].s_stop = content->c_end;
(*msgp)++;
*/
if (content->c_type == CT_MULTIPART) {
- m = (struct multipart *) content->c_ctparams;
+ m = (struct multipart *) content->c_ctparams;
for (part = m->mp_parts; part; part = part->mp_next)
find_mime_parts(part->mp_part, smsgs, msgp);
break;
case S4:
- fputc (c, out);
+ fputc (c, out);
break;
}
}
use = NOUSE;
continue;
- case FILESW: /* compatibility */
+ case FILESW: /* compatibility */
if (file)
die("only one file at a time!");
if (!(file = *argp++) || *file == '-')
} else {
struct comp *cptr;
- if (! form)
+ if (! form)
form = components;
cp = new_fs(form, NULL, NULL);
if (from) {
cptr = fmt_findcomp("from");
if (cptr)
- cptr->c_text = from;
+ cptr->c_text = from;
}
if (to) {
cptr = fmt_findcomp("to");
if (cptr)
- cptr->c_text = to;
+ cptr->c_text = to;
}
if (cc) {
cptr = fmt_findcomp("cc");
if (cptr)
- cptr->c_text = cc;
+ cptr->c_text = cc;
}
if (fcc) {
cptr = fmt_findcomp("fcc");
if (cptr)
- cptr->c_text = fcc;
+ cptr->c_text = fcc;
}
if (subject) {
cptr = fmt_findcomp("subject");
if (cptr)
- cptr->c_text = subject;
+ cptr->c_text = subject;
}
}
try_it_again:
strncpy (drft, build ? m_maildir ("draft")
- : m_draft (dfolder, file, use, &isdf), sizeof(drft));
+ : m_draft (dfolder, file, use, &isdf), sizeof(drft));
/*
* Check if we have an existing draft
static int insert(struct mailname *);
static void mlistfree(void);
-static bool nodupcheck; /* If set, no check for duplicates */
+static bool nodupcheck; /* If set, no check for duplicates */
static bool ccme; /* Should I cc myself? */
static struct mailname mq; /* Mail addresses to check for duplicates */
static char *dummy = "dummy";
* save the component name and the next argument for the text.
*/
if (*++cp == '-') {
- if (*++cp == '\0')
+ if (*++cp == '\0')
die("missing component name after --");
app_msgarg(&compargs, cp);
/* Grab next argument for component text */
case OUTSIZESW:
outputsize_given = true;
if (!(cp = *argp++) || *cp == '-')
- die("missing argument to %s", argp[-2]);
+ die("missing argument to %s", argp[-2]);
if (strcmp(cp, "max") == 0)
outputsize = INT_MAX;
else if (strcmp(cp, "width") == 0)
- outputsize = sc_width();
+ outputsize = sc_width();
else
outputsize = atoi(cp);
continue;
case WIDTHSW:
if (!(cp = *argp++) || *cp == '-')
- die("missing argument to %s", argp[-2]);
+ die("missing argument to %s", argp[-2]);
colwidth = atoi(cp);
continue;
case MSGNUMSW:
if (!(cp = *argp++) || *cp == '-')
- die("missing argument to %s", argp[-2]);
+ die("missing argument to %s", argp[-2]);
msgnum = atoi(cp);
continue;
case MSGCURSW:
if (!(cp = *argp++) || *cp == '-')
- die("missing argument to %s", argp[-2]);
+ die("missing argument to %s", argp[-2]);
msgcur = atoi(cp);
continue;
case MSGSIZESW:
if (!(cp = *argp++) || *cp == '-')
- die("missing argument to %s", argp[-2]);
+ die("missing argument to %s", argp[-2]);
msgsize = atoi(cp);
continue;
case UNSEENSW:
if (!(cp = *argp++) || *cp == '-')
- die("missing argument to %s", argp[-2]);
+ die("missing argument to %s", argp[-2]);
msgunseen = atoi(cp);
continue;
if (mode == MESSAGE && !files && (*cp == '+' || *cp == '@')) {
if (folder)
- die("only one folder at a time!");
+ die("only one folder at a time!");
folder = pluspath (cp);
} else
app_msgarg(&msgs, cp);
*/
if (mode == RAW && form == NULL && format == NULL) {
- die("You must specify a format with -form or -format when "
+ die("You must specify a format with -form or -format when "
"using -raw");
}
*/
if (!dupaddrs || trace) {
- ZERO(&cb);
+ ZERO(&cb);
cbp = &cb;
if (!dupaddrs) {
struct comp *c;
if (dat[0] == -1)
- dat[0] = 0;
+ dat[0] = 0;
if (dat[1] == -1)
- dat[1] = 0;
+ dat[1] = 0;
if (dat[2] == -1)
- dat[2] = 0;
+ dat[2] = 0;
if (dat[4] == -1)
- dat[4] = 0;
+ dat[4] = 0;
for (i = 0; i < addrs->size; i++) {
- (q = &pq)->pq_next = NULL;
+ (q = &pq)->pq_next = NULL;
while ((cp = getname(addrs->msgs[i]))) {
NEW0(p);
if ((mp = getm(cp, NULL, 0, error, sizeof(error))) == NULL) {
- p->pq_text = mh_xstrdup(cp);
+ p->pq_text = mh_xstrdup(cp);
p->pq_error = mh_xstrdup(error);
} else {
- p->pq_text = getcpy(mp->m_text);
+ p->pq_text = getcpy(mp->m_text);
mnfree(mp);
}
q = (q->pq_next = p);
}
if (! folder)
- folder = getfolder(1);
+ folder = getfolder(1);
maildir = m_maildir(folder);
if (chdir(maildir) < 0)
- adios(maildir, "unable to change directory to");
+ adios(maildir, "unable to change directory to");
if (!(mp = folder_read(folder, 1)))
- die("unable to read folder %s", folder);
+ die("unable to read folder %s", folder);
if (mp->nummsg == 0)
- die("no messages in %s", folder);
+ die("no messages in %s", folder);
for (i = 0; i < msgs->size; i++)
- if (!m_convert(mp, msgs->msgs[i]))
+ if (!m_convert(mp, msgs->msgs[i]))
done(1);
seq_setprev(mp); /* set the Previous-Sequence */
*/
if (dat[4] == -1) {
- if ((cp = context_find(usequence)) && *cp) {
+ if ((cp = context_find(usequence)) && *cp) {
char **ap, *dp;
dp = mh_xstrdup(cp);
}
for (msgnum = mp->lowsel; msgnum <= mp->hghsel; msgnum++) {
- if (is_selected(mp, msgnum)) {
+ if (is_selected(mp, msgnum)) {
if ((in = fopen(cp = m_name(msgnum), "r")) == NULL) {
- admonish(cp, "unable to open message");
+ admonish(cp, "unable to open message");
continue;
}
fmt_freecomptext();
if (num == -1)
- dat[0] = msgnum;
+ dat[0] = msgnum;
if (cur == -1)
- dat[1] = msgnum == mp->curmsg;
+ dat[1] = msgnum == mp->curmsg;
/*
* Check to see if this is in the unseen sequence
*/
if (dat[0] == -1)
- dat[0] = 0;
+ dat[0] = 0;
if (dat[1] == -1)
- dat[1] = 0;
+ dat[1] = 0;
if (dat[4] == -1)
- dat[4] = 0;
+ dat[4] = 0;
/*
* Read in the message and process the components
struct comp *c;
if (dat[0] == -1)
- dat[0] = 0;
+ dat[0] = 0;
if (dat[1] == -1)
- dat[1] = 0;
+ dat[1] = 0;
if (dat[2] == -1)
- dat[2] = 0;
+ dat[2] = 0;
if (dat[4] == -1)
- dat[4] = 0;
+ dat[4] = 0;
c = fmt_findcomp("text");
for (i = 0; i < text->size; i++) {
- if (c != NULL) {
+ if (c != NULL) {
free(c->c_text);
c->c_text = getcpy(text->msgs[i]);
}
dumpone(fmt);
if (num != ctx->num) {
- printf("num=%d", num);
+ printf("num=%d", num);
ctx->num = num;
changed = true;
}
if (str != ctx->str) {
- if (changed)
+ if (changed)
putchar(' ');
changed = true;
fputs("str=", stdout);
putchar('\n');
if (strcmp(outbuf, ctx->outbuf) != 0) {
- fputs("outbuf=", stdout);
+ fputs("outbuf=", stdout);
litputs(outbuf);
putchar('\n');
- free(ctx->outbuf);
+ free(ctx->outbuf);
ctx->outbuf = mh_xstrdup(outbuf);
}
}
static bool fshort; /* output only folder names */
static int fcreat = 0; /* should we ask to create new folders? */
-static bool fpack; /* are we packing the folder? */
-static bool fverb; /* print actions taken while packing folder */
+static bool fpack; /* are we packing the folder? */
+static bool fverb; /* print actions taken while packing folder */
static int fheader = 0; /* should we output a header? */
-static bool frecurse; /* recurse through subfolders */
+static bool frecurse; /* recurse through subfolders */
static int ftotal = 0; /* should we output the totals? */
-static bool all; /* should we output all folders */
+static bool all; /* should we output all folders */
static int total_folders = 0; /* total number of folders */
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");
snoop = true;
continue;
case NOSNOOPSW:
- snoop = false;
+ snoop = false;
continue;
case SASLSW:
sasl = true;
die("missing argument to %s", argp[-2]);
continue;
case AUTHSERVICESW:
- if (!(oauth_svc = *argp++) || *oauth_svc == '-')
+ if (!(oauth_svc = *argp++) || *oauth_svc == '-')
die("missing argument to %s", argp[-2]);
continue;
case TLSSW:
vsnprintf(cmd->prefix, sizeof(cmd->prefix), fmt, ap);
va_end(ap);
- p = strchr(cmd->prefix, ' ');
+ p = strchr(cmd->prefix, ' ');
if (p)
*p = '\0';
}
if (stat (newmail, &s1) == NOTOK || s1.st_size == 0)
die("no mail to incorporate");
- if (s1.st_mode & S_IFDIR) {
- DIR *md;
- struct dirent *de;
- struct stat ms;
- int i;
- i = 0;
- cp = concat (newmail, "/new", NULL);
- if ((md = opendir(cp)) == NULL)
- die("unable to open %s", cp);
- while ((de = readdir (md)) != NULL) {
- if (de->d_name[0] == '.')
- continue;
- if (i >= num_maildir_entries) {
- if ((Maildir = realloc(Maildir, sizeof(*Maildir) * (2*i+16))) == NULL)
- die("not enough memory for %d messages", 2*i+16);
- num_maildir_entries = 2*i+16;
- }
- Maildir[i].filename = concat (cp, "/", de->d_name, NULL);
- if (stat(Maildir[i].filename, &ms) != 0)
- adios (Maildir[i].filename, "couldn't get delivery time");
- Maildir[i].mtime = ms.st_mtime;
- i++;
- }
- free (cp);
- closedir (md);
- cp = concat (newmail, "/cur", NULL);
- if ((md = opendir(cp)) == NULL)
- die("unable to open %s", cp);
- while ((de = readdir (md)) != NULL) {
- if (de->d_name[0] == '.')
- continue;
- if (i >= num_maildir_entries) {
- if ((Maildir = realloc(Maildir, sizeof(*Maildir) * (2*i+16))) == NULL)
- die("not enough memory for %d messages", 2*i+16);
- num_maildir_entries = 2*i+16;
- }
- Maildir[i].filename = concat (cp, "/", de->d_name, NULL);
- if (stat(Maildir[i].filename, &ms) != 0)
- adios (Maildir[i].filename, "couldn't get delivery time");
- Maildir[i].mtime = ms.st_mtime;
- i++;
- }
- free (cp);
- closedir (md);
- if (i == 0)
- die("no mail to incorporate");
- num_maildir_entries = i;
- qsort (Maildir, num_maildir_entries, sizeof(*Maildir), maildir_srt);
- }
+ if (s1.st_mode & S_IFDIR) {
+ DIR *md;
+ struct dirent *de;
+ struct stat ms;
+ int i;
+ i = 0;
+ cp = concat (newmail, "/new", NULL);
+ if ((md = opendir(cp)) == NULL)
+ die("unable to open %s", cp);
+ while ((de = readdir (md)) != NULL) {
+ if (de->d_name[0] == '.')
+ continue;
+ if (i >= num_maildir_entries) {
+ if ((Maildir = realloc(Maildir, sizeof(*Maildir) * (2*i+16))) == NULL)
+ die("not enough memory for %d messages", 2*i+16);
+ num_maildir_entries = 2*i+16;
+ }
+ Maildir[i].filename = concat (cp, "/", de->d_name, NULL);
+ if (stat(Maildir[i].filename, &ms) != 0)
+ adios (Maildir[i].filename, "couldn't get delivery time");
+ Maildir[i].mtime = ms.st_mtime;
+ i++;
+ }
+ free (cp);
+ closedir (md);
+ cp = concat (newmail, "/cur", NULL);
+ if ((md = opendir(cp)) == NULL)
+ die("unable to open %s", cp);
+ while ((de = readdir (md)) != NULL) {
+ if (de->d_name[0] == '.')
+ continue;
+ if (i >= num_maildir_entries) {
+ if ((Maildir = realloc(Maildir, sizeof(*Maildir) * (2*i+16))) == NULL)
+ die("not enough memory for %d messages", 2*i+16);
+ num_maildir_entries = 2*i+16;
+ }
+ Maildir[i].filename = concat (cp, "/", de->d_name, NULL);
+ if (stat(Maildir[i].filename, &ms) != 0)
+ adios (Maildir[i].filename, "couldn't get delivery time");
+ Maildir[i].mtime = ms.st_mtime;
+ i++;
+ }
+ free (cp);
+ closedir (md);
+ if (i == 0)
+ die("no mail to incorporate");
+ num_maildir_entries = i;
+ qsort (Maildir, num_maildir_entries, sizeof(*Maildir), maildir_srt);
+ }
cp = mh_xstrdup(newmail);
newmail = cp;
fprintf (aud, "<<inc>> %s -ms %s\n", dtimenow(0), from);
else {
if (host)
- fprintf (aud, "<<inc>> %s -host %s -user %s\n", dtimenow(0),
+ fprintf (aud, "<<inc>> %s -host %s -user %s\n", dtimenow(0),
host, user);
else
fprintf (aud, "<<inc>> %s\n", dtimenow (0));
size_t nrd;
if ((sf = fopen (sp, "r")) == NULL)
- adios (sp, "unable to read for copy");
+ adios (sp, "unable to read for copy");
if ((pf = fopen (cp, "w+")) == NULL)
adios (cp, "unable to write for copy");
while ((nrd = fread(buf, 1, sizeof(buf), sf)) > 0)
if (msgnum == hghnum) {
inform("no messages incorporated, continuing...");
} else {
- /*
+ /*
* Lock the sequence file now, and loop to set the right flags
* in the folder structure
*/
done (0);
case AUTOSW:
- /* -auto implies -nodirectives */
+ /* -auto implies -nodirectives */
autobuild = true;
directives = false;
continue;
case NAUTOSW:
- /*
+ /*
* We're turning directives back on since this is likely here
* to override a profile entry
*/
case CHECKSW:
case NCHECKSW:
- /* Currently a NOP */
+ /* Currently a NOP */
continue;
case HEADSW:
continue;
case HEADERENCSW: {
- int encoding;
+ int encoding;
if (!(cp = *argp++) || *cp == '-')
die("missing argument to %s", argp[-2]);
}
case AUTOHEADERENCSW:
- header_encoding = CE_UNKNOWN;
+ header_encoding = CE_UNKNOWN;
continue;
case MAXUNENCSW:
/* build the content structures for MIME message */
ct = build_mime (compfile, autobuild, dist, directives, header_encoding,
- maxunencoded, verbosw);
+ maxunencoded, verbosw);
/*
* If ct == NULL, that means -auto was set and we found a MIME version
if (! c1->c_name || strcasecmp (c1->c_name, "body")) {
inform("format filters are currently only supported on "
- "the \"body\" component");
+ "the \"body\" component");
return 1;
}
fp = stdin;
}
if (fstat(fileno(fp), &st) == 0) {
- filesize = st.st_size;
+ filesize = st.st_size;
} else {
- filesize = 0;
+ filesize = 0;
}
cp = folder ? concat (folder, ":", fname2, NULL) : mh_xstrdup(fname2);
if (ontty != PITTY)
free (cp);
for (ap = arglist_head; ap; ap = ap->a_next) {
- fmt_free(ap->a_fmt, 0);
+ fmt_free(ap->a_fmt, 0);
ap->a_fmt = NULL;
}
}
if (dobody && (!c1->c_name ||
!strcasecmp (c1->c_name, "body"))) {
- if (c1->c_flags & FMTFILTER && state == BODY &&
+ if (c1->c_flags & FMTFILTER && state == BODY &&
formatproc != NULL) {
filterbody(c1, buf, sizeof(buf), state, gstate);
} else {
fmt_free(NULL, 1);
while (arg) {
- fmt_compile(arg->a_nfs, &arg->a_fmt, 0);
+ fmt_compile(arg->a_nfs, &arg->a_fmt, 0);
arg = arg->a_next;
}
}
if (pipe(fdoutput) < 0) {
- die("Unable to create output pipe");
+ die("Unable to create output pipe");
}
/*
switch (writerpid = fork()) {
case 0:
- /*
+ /*
* Our child process - just write to the filter input (fdinput[1]).
* Close all other descriptors that we don't need.
*/
*/
_exit(0);
case -1:
- die("Unable to fork for filter writer process");
+ die("Unable to fork for filter writer process");
break;
}
int i, dat[5], argp;
case 0:
- /*
+ /*
* Configure an argument array for us
*/
break;
case -1:
- die("Unable to fork format program");
+ die("Unable to fork format program");
}
/*
holder.c_text = buf;
while ((cc = read(fdoutput[0], buf, bufsz - 1)) > 0) {
- buf[cc] = '\0';
- putcomp(c1, &holder, BODYCOMP);
+ buf[cc] = '\0';
+ putcomp(c1, &holder, BODYCOMP);
}
if (cc < 0) {
- die("reading from formatproc");
+ die("reading from formatproc");
}
/*
*/
if (waitpid(filterpid, &waitstat, 0) < 0) {
- if (errno != ECHILD) {
+ if (errno != ECHILD) {
adios("filterproc", "Unable to determine status");
}
} else {
- if (! (WIFEXITED(waitstat) && WEXITSTATUS(waitstat) == 0)) {
+ if (! (WIFEXITED(waitstat) && WEXITSTATUS(waitstat) == 0)) {
pidstatus(waitstat, stderr, "filterproc");
}
}
if (waitpid(writerpid, &waitstat, 0) < 0) {
- if (errno != ECHILD) {
+ if (errno != ECHILD) {
adios("writer process", "Unable to determine status");
done(1);
}
} else {
- if (! (WIFEXITED(waitstat) && WEXITSTATUS(waitstat) == 0)) {
+ if (! (WIFEXITED(waitstat) && WEXITSTATUS(waitstat) == 0)) {
pidstatus(waitstat, stderr, "writer process");
done(1);
}
}
if (c != '\n')
- putc ('\n', out);
+ putc ('\n', out);
(*ct->c_ceclosefnx) (ct);
free (bufp);
if (listsw)
puts(m_name (msgnum));
} else {
- app_msgnum(&nums, msgnum);
+ app_msgnum(&nums, msgnum);
}
if (fp)
fclose (fp);
*/
for (msgnum = 0; msgnum < nums.size; msgnum++) {
- unset_selected(mp2, nums.msgnums[msgnum]);
+ unset_selected(mp2, nums.msgnums[msgnum]);
mp2->numsel--;
}
do {
if (c == '-' && *sp != '\0' && *sp != ']') {
for (c = ep[-1]+1; c < *sp; c++) {
- *ep++ = c;
- cclcnt++;
+ *ep++ = c;
+ cclcnt++;
if (c == '\0' || ep >= dp)
goto cerror;
}
*/
if (command("STLS") == NOTOK)
- return NOTOK;
+ return NOTOK;
if (netsec_negotiate_tls(nsc, &errstr) != OK) {
snprintf(response, sizeof(response), "%s", errstr);
if (check_mech(server_mechs, sizeof(server_mechs)) != OK)
return NOTOK;
if (netsec_negotiate_sasl(nsc, server_mechs,
- &errstr) != OK) {
+ &errstr) != OK) {
strncpy(response, errstr, sizeof(response));
response[sizeof(response) - 1] = '\0';
free(errstr);
static short outputlinelen = OUTPUTLINELEN;
static int pfd = NOTOK; /* fd to write annotation list to */
-static bool recipients; /* how many people will get a copy */
+static bool recipients; /* how many people will get a copy */
static int unkadr = 0; /* how many of those were unknown */
static int badadr = 0; /* number of bad addrs */
static bool badmsg; /* message has bad semantics */
static char *port="submission"; /* Name of server port for SMTP submission */
static int tlsflag=0; /* Flags to control TLS settings */
static int fromcount=0; /* Count of addresses on From: header */
-static bool seensender; /* Have we seen a Sender: header? */
+static bool seensender; /* Have we seen a Sender: header? */
static unsigned msgflags = 0; /* what we've seen */
*/
if (msgflags & MEFM) {
- envelope = efrom;
+ envelope = efrom;
} else if (seensender) {
- envelope = sender;
+ envelope = sender;
} else {
- envelope = from;
+ envelope = from;
}
if (tls == -1) {
(void) m_unlink (tmpfil);
if (verbose) {
- if (partno)
+ if (partno)
printf ("Partial Message #%s Processed\n", partno);
else
puts("Message Processed");
*/
if (fromcount > 1 && !seensender) {
- if (efrom[0] == '\0') {
+ if (efrom[0] == '\0') {
inform("Envelope-From cannot be blank when there "
- "is multiple From: addresses\nand no Sender: "
+ "is multiple From: addresses\nand no Sender: "
"header");
badmsg = true;
} else {
*/
if (fromcount > 1 && !seensender) {
- if (efrom[0] == '\0') {
+ if (efrom[0] == '\0') {
inform("Envelope-From cannot be blank when there "
- "is multiple Resent-From: addresses and no "
+ "is multiple Resent-From: addresses and no "
"Resent-Sender: header");
badmsg = true;
} else {
snprintf (addr, sizeof(addr), "%s!%s", lp->m_host, lp->m_mbox);
break;
- default: /* let SendMail decide if the host is bad */
+ default: /* let SendMail decide if the host is bad */
mbox = lp->m_mbox;
host = lp->m_host;
snprintf (addr, sizeof(addr), "%s at %s", mbox, host);
switch (state = m_getfld2(&gstate, name, tmpbuf, &msg_count)) {
case FLD:
case FLDPLUS:
- i = fmt_addcomptext(name, tmpbuf);
+ i = fmt_addcomptext(name, tmpbuf);
if (i != -1) {
char_read += msg_count;
while (state == FLDPLUS) {
/* If rmmproc is defined, we use that */
if (rmmproc) {
- vec = argsplit(rmmproc, &program, &vecp);
+ vec = argsplit(rmmproc, &program, &vecp);
files++; /* Yes, we need to do this */
for (i = 0; i < filep; i++)
vec[vecp++] = files[i];
}
replout (in, msg, drft, mp, outputlinelen, mime, form, filter,
- fcc, fmtproc);
+ fcc, fmtproc);
fclose (in);
{
arglist[argnum++] = formatproc;
break;
case 0:
- arglist[argnum++] = "-nofmtproc";
+ arglist[argnum++] = "-nofmtproc";
break;
}
/* With AD_NAME, errors are not reported to user. */
if ((mp = getm (cp, dfhost, dftype, error,
- sizeof(error))) == NULL) {
+ sizeof(error))) == NULL) {
const char *no_at_sign = "no at-sign after local-part";
adr_nodep->escape_local_part =
static struct comp *bodycomp; /* pntr to "body" pseudo-comp *
* (if referenced) */
static int ncomps = 0; /* # of interesting components */
-static char **compbuffers = 0; /* buffers for component text */
+static char **compbuffers = 0; /* buffers for component text */
static struct comp **used_buf = 0; /* stack for comp that use buffers */
static int dat[5]; /* aux. data for format routine */
if (outnum == 0) {
state = FILEEOF; /* stop now if scan cmd */
if (bodycomp && startbody == NULL)
- startbody = tmpbuf;
+ startbody = tmpbuf;
goto finished;
}
if (scnout) {
case LENERR:
case FMTERR:
- if (innum)
+ if (innum)
fprintf (stderr, "??Format error (message %d) in ",
outnum ? outnum : innum);
else
break;
default:
- if (pidXwait(child, buildmimeproc))
+ if (pidXwait(child, buildmimeproc))
return NOTOK;
break;
}
perror (mailproc);
_exit(1);
- default: /* no waiting... */
+ default: /* no waiting... */
break;
}
}
child_id = debugsw ? NOTOK : fork ();
switch (child_id) {
- case NOTOK: /* oops */
+ case NOTOK: /* oops */
if (!debugsw)
inform("unable to fork, so doing annotations by hand...");
if (cwd == NULL)
}
break;
- default: /* no waiting... */
+ default: /* no waiting... */
close (fd);
break;
}
if (saslmech && ! strcasecmp(saslmech, "xoauth2")) {
if (! mh_oauth_get_service_info(auth_svc, &svc, errbuf,
- sizeof(errbuf)))
+ sizeof(errbuf)))
die("Unable to retrieve oauth profile entries: %s",
errbuf);
char *subjsort; /* sort on subject if != 0 */
time_t datelimit = 0;
-bool submajor; /* if true, sort on subject-major */
+bool submajor; /* if true, sort on subject-major */
bool verbose;
int allmsgs = 1;
int check_failed = 0;
msgnam = (cp = getenv ("mhaltmsg")) && *cp ? mh_xstrdup(cp) : NULL;
if ((cp = getenv ("mhatfile")) && *cp)
- atfile = atoi(cp);
+ atfile = atoi(cp);
if ((cp = getenv ("mhuse")) && *cp)
use = atoi (cp);
/* start editing the draft, unless -noedit was given */
if (!nedit && editfile (&ed, NULL, drft, use, NULL, msgnam,
- NULL, 1, atfile) < 0)
+ NULL, 1, atfile) < 0)
done (1);
for (;;) {
if (*++argp)
ed = *argp++;
if (editfile (&ed, argp, drft, NOUSE, NULL, msgnam,
- NULL, 1, atfile) == NOTOK)
+ NULL, 1, atfile) == NOTOK)
done (1);
break;
trim_suffix_c(shell, '\n');
if (*shell == '/') {
- strncpy(file, shell, sizeof(file));
+ strncpy(file, shell, sizeof(file));
file[sizeof(file) - 1] = '\0';
} else {
snprintf(file, sizeof(file), "%s/%s", cwd, shell);
* EDIT
*/
-static bool reedit; /* have we been here before? */
+static bool reedit; /* have we been here before? */
static char *edsave = NULL; /* the editor we used previously */