From: Ken Hornstein Date: Sat, 18 May 2019 03:50:16 +0000 (-0400) Subject: Fix whitespace errors X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/912755a7e0ad3d94d084798dd60bb7397abf3931?hp=612f63b11fa4ac1d97d41943d48702bf16eed947 Fix whitespace errors --- diff --git a/mts/smtp/smtp.c b/mts/smtp/smtp.c index ea7f7196..d5ce434f 100644 --- a/mts/smtp/smtp.c +++ b/mts/smtp/smtp.c @@ -157,7 +157,7 @@ smtp_init (char *client, char *server, char *port, int watch, int verbose, */ 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); } @@ -386,7 +386,7 @@ sendmail_init (char *client, int watch, int verbose, int debug, int sasl, */ 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"); @@ -813,7 +813,7 @@ again: ; rc = sizeof(sm_reply.text) - 1; for (more = false; (buffer = netsec_readline(nsc, &buflen, - &errstr)) != NULL ; ) { + &errstr)) != NULL ; ) { if (doingEHLO && has_prefix(buffer, "250") diff --git a/tools/showbuildenv b/tools/showbuildenv index 37accd2d..9db0f3e2 100755 --- a/tools/showbuildenv +++ b/tools/showbuildenv @@ -63,7 +63,7 @@ case ${os} in 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 diff --git a/uip/aliasbr.c b/uip/aliasbr.c index 22252d72..aaf0c7f1 100644 --- a/uip/aliasbr.c +++ b/uip/aliasbr.c @@ -181,7 +181,7 @@ alias (char *file) 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); @@ -192,8 +192,8 @@ alias (char *file) return i; } continue; - case ':': /* comment */ - case ';': + case ':': /* comment */ + case ';': case '#': case 0: continue; @@ -223,11 +223,11 @@ alias (char *file) } 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; @@ -238,7 +238,7 @@ alias (char *file) } break; - default: /* list */ + default: /* list */ while ((cp = getalias (pp))) add_aka (ak, cp); break; diff --git a/uip/anno.c b/uip/anno.c index 5e3b0a23..1f9eeac9 100644 --- a/uip/anno.c +++ b/uip/anno.c @@ -187,10 +187,10 @@ main (int argc, char **argv) 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++; diff --git a/uip/burst.c b/uip/burst.c index 09ecb992..289ce819 100644 --- a/uip/burst.c +++ b/uip/burst.c @@ -132,13 +132,13 @@ main (int argc, char **argv) continue; case MIMESW: - mimesw = 2; + mimesw = 2; continue; case NMIMESW: - mimesw = 0; + mimesw = 0; continue; case AUTOMIMESW: - mimesw = 1; + mimesw = 1; continue; case QIETSW: @@ -265,7 +265,7 @@ find_delim (int msgnum, struct smsg *smsgs, int *mimesw) */ if (*mimesw > 0) { - content = parse_mime(msgnam); + content = parse_mime(msgnam); if (! content && *mimesw == 2) return 0; if (content) { @@ -275,9 +275,9 @@ find_delim (int msgnum, struct smsg *smsgs, int *mimesw) 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; } } @@ -289,7 +289,7 @@ find_delim (int msgnum, struct smsg *smsgs, int *mimesw) 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 @@ -361,7 +361,7 @@ find_mime_parts (CT content, struct smsg *smsgs, int *msgp) */ 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)++; @@ -373,7 +373,7 @@ find_mime_parts (CT content, struct smsg *smsgs, int *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); @@ -577,7 +577,7 @@ cpybrst (FILE *in, FILE *out, char *ifile, char *ofile, int len, int mime) break; case S4: - fputc (c, out); + fputc (c, out); break; } } diff --git a/uip/comp.c b/uip/comp.c index 00aa1c2c..69210f81 100644 --- a/uip/comp.c +++ b/uip/comp.c @@ -167,7 +167,7 @@ main (int argc, char **argv) use = NOUSE; continue; - case FILESW: /* compatibility */ + case FILESW: /* compatibility */ if (file) die("only one file at a time!"); if (!(file = *argp++) || *file == '-') @@ -300,7 +300,7 @@ main (int argc, char **argv) } else { struct comp *cptr; - if (! form) + if (! form) form = components; cp = new_fs(form, NULL, NULL); @@ -314,33 +314,33 @@ main (int argc, char **argv) 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 diff --git a/uip/fmttest.c b/uip/fmttest.c index 401ec7df..49f2104b 100644 --- a/uip/fmttest.c +++ b/uip/fmttest.c @@ -126,7 +126,7 @@ static char *test_concataddr(char *, char *); 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"; @@ -164,7 +164,7 @@ main (int argc, char **argv) * 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 */ @@ -194,11 +194,11 @@ main (int argc, char **argv) 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; @@ -261,27 +261,27 @@ main (int argc, char **argv) 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; @@ -301,7 +301,7 @@ main (int argc, char **argv) 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); @@ -327,7 +327,7 @@ main (int argc, char **argv) */ 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"); } @@ -364,7 +364,7 @@ main (int argc, char **argv) */ if (!dupaddrs || trace) { - ZERO(&cb); + ZERO(&cb); cbp = &cb; if (!dupaddrs) { @@ -435,23 +435,23 @@ process_addresses(struct format *fmt, struct msgs_array *addrs, 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); @@ -521,21 +521,21 @@ process_messages(struct format *fmt, struct msgs_array *comps, } 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 */ @@ -549,7 +549,7 @@ process_messages(struct format *fmt, struct msgs_array *comps, */ if (dat[4] == -1) { - if ((cp = context_find(usequence)) && *cp) { + if ((cp = context_find(usequence)) && *cp) { char **ap, *dp; dp = mh_xstrdup(cp); @@ -563,19 +563,19 @@ process_messages(struct format *fmt, struct msgs_array *comps, } 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 @@ -635,11 +635,11 @@ process_single_file(FILE *in, struct msgs_array *comps, int *dat, int msgsize, */ 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 @@ -716,18 +716,18 @@ process_raw(struct format *fmt, struct msgs_array *text, charstring_t buffer, 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]); } @@ -756,13 +756,13 @@ test_trace(void *context, struct format *fmt, int num, char *str, 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); @@ -774,10 +774,10 @@ test_trace(void *context, struct format *fmt, int num, char *str, 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); } } diff --git a/uip/folder.c b/uip/folder.c index 8a794981..8ab6528b 100644 --- a/uip/folder.c +++ b/uip/folder.c @@ -72,12 +72,12 @@ DEFINE_SWITCH_ARRAY(FOLDER, switches); 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 */ diff --git a/uip/forw.c b/uip/forw.c index b575c05a..5194a5aa 100644 --- a/uip/forw.c +++ b/uip/forw.c @@ -441,8 +441,8 @@ try_it_again: if (!form) form = digestcomps; } else { - if (!form) - form = forwcomps; + if (!form) + form = forwcomps; } dat[0] = digest ? issue : msgnum; @@ -453,7 +453,7 @@ try_it_again: 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"); diff --git a/uip/imaptest.c b/uip/imaptest.c index 8a73f08c..9ad22341 100644 --- a/uip/imaptest.c +++ b/uip/imaptest.c @@ -190,7 +190,7 @@ main (int argc, char **argv) snoop = true; continue; case NOSNOOPSW: - snoop = false; + snoop = false; continue; case SASLSW: sasl = true; @@ -203,7 +203,7 @@ main (int argc, char **argv) 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: @@ -753,7 +753,7 @@ send_imap_command(netsec_context *nsc, bool noflush, char **errstr, vsnprintf(cmd->prefix, sizeof(cmd->prefix), fmt, ap); va_end(ap); - p = strchr(cmd->prefix, ' '); + p = strchr(cmd->prefix, ' '); if (p) *p = '\0'; diff --git a/uip/inc.c b/uip/inc.c index bac44429..c34d28ae 100644 --- a/uip/inc.c +++ b/uip/inc.c @@ -477,55 +477,55 @@ main (int argc, char **argv) } 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; @@ -596,7 +596,7 @@ main (int argc, char **argv) fprintf (aud, "<> %s -ms %s\n", dtimenow(0), from); else { if (host) - fprintf (aud, "<> %s -host %s -user %s\n", dtimenow(0), + fprintf (aud, "<> %s -host %s -user %s\n", dtimenow(0), host, user); else fprintf (aud, "<> %s\n", dtimenow (0)); @@ -759,7 +759,7 @@ main (int argc, char **argv) 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) @@ -874,7 +874,7 @@ main (int argc, char **argv) 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 */ diff --git a/uip/mhbuild.c b/uip/mhbuild.c index 34a797e4..48f7e4b4 100644 --- a/uip/mhbuild.c +++ b/uip/mhbuild.c @@ -143,12 +143,12 @@ main (int argc, char **argv) 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 */ @@ -158,7 +158,7 @@ main (int argc, char **argv) case CHECKSW: case NCHECKSW: - /* Currently a NOP */ + /* Currently a NOP */ continue; case HEADSW: @@ -204,7 +204,7 @@ main (int argc, char **argv) continue; case HEADERENCSW: { - int encoding; + int encoding; if (!(cp = *argp++) || *cp == '-') die("missing argument to %s", argp[-2]); @@ -230,7 +230,7 @@ main (int argc, char **argv) } case AUTOHEADERENCSW: - header_encoding = CE_UNKNOWN; + header_encoding = CE_UNKNOWN; continue; case MAXUNENCSW: @@ -345,7 +345,7 @@ main (int argc, char **argv) /* 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 diff --git a/uip/mhlsbr.c b/uip/mhlsbr.c index 86a1f41d..ffb39b9c 100644 --- a/uip/mhlsbr.c +++ b/uip/mhlsbr.c @@ -781,7 +781,7 @@ evalvar (struct mcomp *c1) 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; } @@ -906,9 +906,9 @@ process (char *folder, char *fname, int ofilen, int ofilec) 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) @@ -917,7 +917,7 @@ process (char *folder, char *fname, int ofilen, int ofilec) 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; } @@ -1074,7 +1074,7 @@ mhlfile (FILE *fp, char *mname, int ofilen, int ofilec) } 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 { @@ -1733,7 +1733,7 @@ compile_filterargs (void) 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; } @@ -1771,7 +1771,7 @@ filterbody (struct mcomp *c1, char *buf, int bufsz, int state, } if (pipe(fdoutput) < 0) { - die("Unable to create output pipe"); + die("Unable to create output pipe"); } /* @@ -1794,7 +1794,7 @@ filterbody (struct mcomp *c1, char *buf, int bufsz, int state, 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. */ @@ -1826,7 +1826,7 @@ filterbody (struct mcomp *c1, char *buf, int bufsz, int state, */ _exit(0); case -1: - die("Unable to fork for filter writer process"); + die("Unable to fork for filter writer process"); break; } @@ -1841,7 +1841,7 @@ filterbody (struct mcomp *c1, char *buf, int bufsz, int state, int i, dat[5], argp; case 0: - /* + /* * Configure an argument array for us */ @@ -1896,7 +1896,7 @@ filterbody (struct mcomp *c1, char *buf, int bufsz, int state, break; case -1: - die("Unable to fork format program"); + die("Unable to fork format program"); } /* @@ -1914,12 +1914,12 @@ filterbody (struct mcomp *c1, char *buf, int bufsz, int state, 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"); } /* @@ -1928,22 +1928,22 @@ filterbody (struct mcomp *c1, char *buf, int bufsz, int state, */ 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); } diff --git a/uip/mhoutsbr.c b/uip/mhoutsbr.c index c69c7b40..354a3013 100644 --- a/uip/mhoutsbr.c +++ b/uip/mhoutsbr.c @@ -388,7 +388,7 @@ three_print: } if (c != '\n') - putc ('\n', out); + putc ('\n', out); (*ct->c_ceclosefnx) (ct); free (bufp); diff --git a/uip/pick.c b/uip/pick.c index 40346d1a..1b399b19 100644 --- a/uip/pick.c +++ b/uip/pick.c @@ -271,7 +271,7 @@ main (int argc, char **argv) if (listsw) puts(m_name (msgnum)); } else { - app_msgnum(&nums, msgnum); + app_msgnum(&nums, msgnum); } if (fp) fclose (fp); @@ -305,7 +305,7 @@ main (int argc, char **argv) */ for (msgnum = 0; msgnum < nums.size; msgnum++) { - unset_selected(mp2, nums.msgnums[msgnum]); + unset_selected(mp2, nums.msgnums[msgnum]); mp2->numsel--; } diff --git a/uip/picksbr.c b/uip/picksbr.c index c11fba62..c5d4a414 100644 --- a/uip/picksbr.c +++ b/uip/picksbr.c @@ -616,8 +616,8 @@ gcompile (struct nexus *n, char *astr) 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; } diff --git a/uip/popsbr.c b/uip/popsbr.c index d61ce767..ced55606 100644 --- a/uip/popsbr.c +++ b/uip/popsbr.c @@ -121,7 +121,7 @@ pop_start_tls(void) */ if (command("STLS") == NOTOK) - return NOTOK; + return NOTOK; if (netsec_negotiate_tls(nsc, &errstr) != OK) { snprintf(response, sizeof(response), "%s", errstr); @@ -304,7 +304,7 @@ pop_init (char *host, char *port, char *user, char *proxy, int snoop, 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); diff --git a/uip/post.c b/uip/post.c index 86c53ae7..c36f43aa 100644 --- a/uip/post.c +++ b/uip/post.c @@ -241,7 +241,7 @@ static short fccind = 0; /* index into fccfold[] */ 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 */ @@ -261,7 +261,7 @@ static char *user=NULL; /* Authenticate as this user */ 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 */ @@ -701,11 +701,11 @@ main (int argc, char **argv) */ if (msgflags & MEFM) { - envelope = efrom; + envelope = efrom; } else if (seensender) { - envelope = sender; + envelope = sender; } else { - envelope = from; + envelope = from; } if (tls == -1) { @@ -788,7 +788,7 @@ main (int argc, char **argv) (void) m_unlink (tmpfil); if (verbose) { - if (partno) + if (partno) printf ("Partial Message #%s Processed\n", partno); else puts("Message Processed"); @@ -1164,9 +1164,9 @@ finish_headers (FILE *out) */ 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 { @@ -1214,9 +1214,9 @@ finish_headers (FILE *out) */ 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 { @@ -1853,7 +1853,7 @@ do_an_address (struct mailname *lp, int talk) 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); diff --git a/uip/rcvdist.c b/uip/rcvdist.c index fcf9dd77..b6594a4f 100644 --- a/uip/rcvdist.c +++ b/uip/rcvdist.c @@ -273,7 +273,7 @@ rcvdistout (FILE *inb, char *form, char *addrs) 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) { diff --git a/uip/refile.c b/uip/refile.c index 5994d905..bbc1bae4 100644 --- a/uip/refile.c +++ b/uip/refile.c @@ -373,7 +373,7 @@ remove_files (int filep, char **files) /* 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]; diff --git a/uip/repl.c b/uip/repl.c index e588799e..6caa5e0d 100644 --- a/uip/repl.c +++ b/uip/repl.c @@ -468,7 +468,7 @@ try_it_again: } replout (in, msg, drft, mp, outputlinelen, mime, form, filter, - fcc, fmtproc); + fcc, fmtproc); fclose (in); { diff --git a/uip/replsbr.c b/uip/replsbr.c index ed5e94ed..292f4695 100644 --- a/uip/replsbr.c +++ b/uip/replsbr.c @@ -467,7 +467,7 @@ replfilter (FILE *in, FILE *out, char *filter, int fmtproc) arglist[argnum++] = formatproc; break; case 0: - arglist[argnum++] = "-nofmtproc"; + arglist[argnum++] = "-nofmtproc"; break; } @@ -535,7 +535,7 @@ fix_addresses (char *str) /* 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 = diff --git a/uip/scansbr.c b/uip/scansbr.c index 8030715f..b6df6830 100644 --- a/uip/scansbr.c +++ b/uip/scansbr.c @@ -24,7 +24,7 @@ static struct comp *datecomp; /* pntr to "date" comp */ 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 */ @@ -227,7 +227,7 @@ scan (FILE *inb, int innum, int outnum, char *nfs, int width, int curflg, if (outnum == 0) { state = FILEEOF; /* stop now if scan cmd */ if (bodycomp && startbody == NULL) - startbody = tmpbuf; + startbody = tmpbuf; goto finished; } if (scnout) { @@ -266,7 +266,7 @@ body:; case LENERR: case FMTERR: - if (innum) + if (innum) fprintf (stderr, "??Format error (message %d) in ", outnum ? outnum : innum); else diff --git a/uip/sendsbr.c b/uip/sendsbr.c index 9c443005..1fe8d97f 100644 --- a/uip/sendsbr.c +++ b/uip/sendsbr.c @@ -122,7 +122,7 @@ sendsbr (char **vec, int vecp, char *program, char *draft, struct stat *st, break; default: - if (pidXwait(child, buildmimeproc)) + if (pidXwait(child, buildmimeproc)) return NOTOK; break; } @@ -347,7 +347,7 @@ alert (char *file, int out) perror (mailproc); _exit(1); - default: /* no waiting... */ + default: /* no waiting... */ break; } } @@ -390,7 +390,7 @@ anno (int fd, struct stat *st) 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) @@ -420,7 +420,7 @@ anno (int fd, struct stat *st) } break; - default: /* no waiting... */ + default: /* no waiting... */ close (fd); break; } @@ -592,7 +592,7 @@ setup_oauth_params(char *vec[], int *vecp, const char *auth_svc, 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); diff --git a/uip/sortm.c b/uip/sortm.c index 347ea17c..2ba5c8e9 100644 --- a/uip/sortm.c +++ b/uip/sortm.c @@ -68,7 +68,7 @@ int nmsgs; 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; diff --git a/uip/whatnowsbr.c b/uip/whatnowsbr.c index 36e37a24..86b667e7 100644 --- a/uip/whatnowsbr.c +++ b/uip/whatnowsbr.c @@ -236,7 +236,7 @@ WhatNow (int argc, char **argv) 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); @@ -248,7 +248,7 @@ WhatNow (int argc, char **argv) /* 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 (;;) { @@ -279,7 +279,7 @@ WhatNow (int argc, char **argv) if (*++argp) ed = *argp++; if (editfile (&ed, argp, drft, NOUSE, NULL, msgnam, - NULL, 1, atfile) == NOTOK) + NULL, 1, atfile) == NOTOK) done (1); break; @@ -456,7 +456,7 @@ WhatNow (int argc, char **argv) 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); @@ -663,7 +663,7 @@ popen_in_dir(const char *dir, const char *cmd, const char *type) * 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 */