From: Ken Hornstein Date: Sat, 18 May 2019 14:17:15 +0000 (-0400) Subject: Clean up more whitespace errors X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/0f043edd0c369786faa28e4ec2dd583467d048be Clean up more whitespace errors Get rid of more whitespace errors; hopefully I got them all. --- diff --git a/docs/contrib/replyfilter b/docs/contrib/replyfilter index 78c5c4ac..ac8601ff 100755 --- a/docs/contrib/replyfilter +++ b/docs/contrib/replyfilter @@ -577,7 +577,7 @@ sub process_multipart if ($subtype eq 'alternative' && ! defined $altout && $type eq 'text/plain') { - $altout = 1; + $altout = 1; } # diff --git a/h/aliasbr.h b/h/aliasbr.h index 6e7a5a32..a80d8b05 100644 --- a/h/aliasbr.h +++ b/h/aliasbr.h @@ -28,7 +28,7 @@ char *akerror (int); /* codes returned by alias() */ -#define AK_OK 0 /* file parsed OK */ -#define AK_NOFILE 1 /* couldn't read file */ -#define AK_ERROR 2 /* error parsing file */ +#define AK_OK 0 /* file parsed OK */ +#define AK_NOFILE 1 /* couldn't read file */ +#define AK_ERROR 2 /* error parsing file */ #define AK_LIMIT 3 /* memory limit exceeded */ diff --git a/h/mh.h b/h/mh.h index bc3766e4..e11876a3 100644 --- a/h/mh.h +++ b/h/mh.h @@ -229,13 +229,13 @@ struct swit { #define DEFINE_SWITCH_ENUM(name) \ enum { \ - name ## _SWITCHES \ + name ## _SWITCHES \ LEN_ ## name \ } #define DEFINE_SWITCH_ARRAY(name, array) \ static struct swit array[] = { \ - name ## _SWITCHES \ + name ## _SWITCHES \ { NULL, 0, 0 } \ } diff --git a/h/utils.h b/h/utils.h index 91c637d9..4df5e156 100644 --- a/h/utils.h +++ b/h/utils.h @@ -86,7 +86,7 @@ bool contains8bit(const char *start, const char *end); * See if file has any 8-bit bytes. * Arguments include: * - * fd - file descriptor + * fd - file descriptor * eightbit - address of result, will be set to 1 if the file contains * any 8-bit bytes, 0 otherwise. * diff --git a/m4/locking.m4 b/m4/locking.m4 index f0d4c312..3eaf27fa 100644 --- a/m4/locking.m4 +++ b/m4/locking.m4 @@ -51,5 +51,5 @@ AC_ARG_ENABLE([lockdir], AS_IF([test "x$enableval" = xyes],[ AC_MSG_ERROR([--enable-lockdir requires an argument])]) AC_DEFINE_UNQUOTED([LOCKDIR], ["$enableval"], - [Directory to store dot-locking lock files]) + [Directory to store dot-locking lock files]) ])]) diff --git a/m4/tputs.m4 b/m4/tputs.m4 index c8e64fba..6b04fb70 100644 --- a/m4/tputs.m4 +++ b/m4/tputs.m4 @@ -13,7 +13,7 @@ AC_DEFUN([NMH_TPUTS_PUTC_ARG], [for tputs_arg1 in 'const char *' 'char *'; do for tputs_putc_arg in 'int' 'char'; do AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( + [AC_LANG_PROGRAM( [AC_INCLUDES_DEFAULT #include #include diff --git a/sbr/addrsbr.c b/sbr/addrsbr.c index 43352bde..b7527976 100644 --- a/sbr/addrsbr.c +++ b/sbr/addrsbr.c @@ -233,10 +233,10 @@ auxformat (struct mailname *mp, int extras) strncpy (addr, FENDNULL(mp->m_mbox), sizeof(addr)); else if (mp->m_type != UUCPHOST) { if (mp->m_host) - snprintf (addr, sizeof(addr), "%s%s@%s", FENDNULL(mp->m_path), + snprintf (addr, sizeof(addr), "%s%s@%s", FENDNULL(mp->m_path), FENDNULL(mp->m_mbox), mp->m_host); else snprintf (addr, sizeof(addr), "%s%s", FENDNULL(mp->m_path), - FENDNULL(mp->m_mbox)); + FENDNULL(mp->m_mbox)); } else snprintf (addr, sizeof(addr), "%s!%s", mp->m_host, mp->m_mbox); @@ -312,7 +312,7 @@ ismymbox (struct mailname *np) /* Sigh, it turns out that the address parser gets messed up * if you don't call getname() until it returns NULL. */ while (getname(am) != NULL) - ; + ; } if ((am = context_find ("alternate-mailboxes")) == NULL) diff --git a/sbr/arglist.c b/sbr/arglist.c index 168e36b7..f771155a 100644 --- a/sbr/arglist.c +++ b/sbr/arglist.c @@ -48,7 +48,7 @@ argsplit(char *command, char **file, int *argp) bool space = false; bool metachar = false; for (p = command; *p; p++) { - if (*p == ' ' || *p == '\t') { + if (*p == ' ' || *p == '\t') { space = true; } else if (strchr(METACHARS, *p)) { metachar = true; @@ -63,7 +63,7 @@ argsplit(char *command, char **file, int *argp) */ if (!space && !metachar) { - argvarray[0] = mh_xstrdup(r1bindex(command, '/')); + argvarray[0] = mh_xstrdup(r1bindex(command, '/')); argvarray[1] = NULL; *file = mh_xstrdup(command); if (argp) @@ -77,7 +77,7 @@ argsplit(char *command, char **file, int *argp) */ if (space && !metachar) { - char **split; + char **split; p = mh_xstrdup(command); split = brkstring(p, " \t", NULL); if (split[0] == NULL) { @@ -123,7 +123,7 @@ argsplit(char *command, char **file, int *argp) argvarray[4] = NULL; if (argp) - *argp = 4; + *argp = 4; return argvarray; } @@ -140,7 +140,7 @@ arglist_free(char *command, char **argvarray) free(command); if (argvarray != NULL) { - for (i = 0; argvarray[i] != NULL; i++) + for (i = 0; argvarray[i] != NULL; i++) free(argvarray[i]); free(argvarray); } @@ -172,7 +172,7 @@ argsplit_msgarg(struct msgs_array *msgs, char *command, char **program) */ for (i = 0; i < argp; i++) { - app_msgarg(msgs, vec[i]); + app_msgarg(msgs, vec[i]); } free(vec); @@ -210,7 +210,7 @@ argsplit_insert(struct msgs_array *msgs, char *command, char **program) } for (i = msgs->size - 1; i >= 0; i--) - msgs->msgs[i + argp] = msgs->msgs[i]; + msgs->msgs[i + argp] = msgs->msgs[i]; msgs->size += argp; @@ -219,7 +219,7 @@ argsplit_insert(struct msgs_array *msgs, char *command, char **program) */ for (i = 0; i < argp; i++) - msgs->msgs[i] = vec[i]; + msgs->msgs[i] = vec[i]; free(vec); } diff --git a/sbr/base64.c b/sbr/base64.c index 8fb5357e..0de4a85f 100644 --- a/sbr/base64.c +++ b/sbr/base64.c @@ -60,18 +60,18 @@ writeBase64aux (FILE *in, FILE *out, int crlf) * everything down and push the last character back. */ if (i == cc - 1) { - /* + /* * If we're at the end of the input, there might be * more room in inbuf; if so, add it there. Otherwise * push it back to the input. */ - if (cc < sizeof(inbuf)) + if (cc < sizeof(inbuf)) inbuf[cc++] = '\n'; else ungetc('\n', in); skipnl = true; } else { - /* This only works as long as sizeof(inbuf) == 3 */ + /* This only works as long as sizeof(inbuf) == 3 */ ungetc(inbuf[cc - 1], in); if (cc == 3 && i == 0) inbuf[2] = inbuf[1]; diff --git a/sbr/client.c b/sbr/client.c index 2bed9052..cc884926 100644 --- a/sbr/client.c +++ b/sbr/client.c @@ -79,7 +79,7 @@ client (char *server, char *service, char *response, int len_response, flags = fcntl(sd, F_GETFD, 0); if (flags != -1) - fcntl(sd, F_SETFD, flags | FD_CLOEXEC); + fcntl(sd, F_SETFD, flags | FD_CLOEXEC); return sd; } diff --git a/sbr/context_read.c b/sbr/context_read.c index 499dba41..2be6b936 100644 --- a/sbr/context_read.c +++ b/sbr/context_read.c @@ -43,7 +43,7 @@ context_read (void) char *nd; /* nmh directory pointer */ struct stat st; /* stat() results */ struct passwd *pw; /* getpwuid() results */ - FILE *ib; /* profile and context file pointer */ + FILE *ib; /* profile and context file pointer */ int failed_to_lock = 0; /* diff --git a/sbr/dtimep.l b/sbr/dtimep.l index 656f96b2..455d4039 100644 --- a/sbr/dtimep.l +++ b/sbr/dtimep.l @@ -130,14 +130,14 @@ static int day_map[] = { SKIPA(); } #define SETMON() { cp++; \ tw.tw_mon = month_map[(((unsigned char) cp[0]) + ((unsigned char) cp[1])) & 0x1f]; \ - SKIPA(); } + SKIPA(); } #define SETMON_NUM() { tw.tw_mon = atoi(cp)-1; \ - SKIPD(); } + SKIPD(); } #define SETYEAR() { tw.tw_year = atoi(cp); \ - SKIPD(); } + SKIPD(); } #define SETDAY() { tw.tw_mday = atoi(cp); \ tw.tw_flags |= TW_SUCC; \ - SKIPD(); } + SKIPD(); } #define SETTIME() { tw.tw_hour = atoi(cp); \ cp += 2; \ SKIPTOD(); \ diff --git a/sbr/encode_rfc2047.c b/sbr/encode_rfc2047.c index e463bf68..bb45b5c1 100644 --- a/sbr/encode_rfc2047.c +++ b/sbr/encode_rfc2047.c @@ -83,13 +83,13 @@ encode_rfc2047(const char *name, char **value, int encoding, if (isascii((unsigned char) *p)) { asciicount++; if (qpspecial((unsigned char) *p)) - qpspecialcount++; + qpspecialcount++; } else eightbitcount++; } if (eightbitcount == 0) - return 0; + return 0; /* * Some rules from RFC 2047: @@ -108,10 +108,10 @@ encode_rfc2047(const char *name, char **value, int encoding, */ if (charset == NULL) - charset = write_charset_8bit(); + charset = write_charset_8bit(); if (strcasecmp(charset, "US-ASCII") == 0) { - inform("Cannot use US-ASCII with 8 bit characters in header"); + inform("Cannot use US-ASCII with 8 bit characters in header"); return 1; } @@ -121,7 +121,7 @@ encode_rfc2047(const char *name, char **value, int encoding, */ for (i = 0; address_headers[i]; i++) { - if (strcasecmp(name, address_headers[i]) == 0) + if (strcasecmp(name, address_headers[i]) == 0) return field_encode_address(name, value, encoding, charset); } @@ -143,14 +143,14 @@ encode_rfc2047(const char *name, char **value, int encoding, switch (encoding) { case CE_BASE64: - return field_encode_base64(name, value, charset); + return field_encode_base64(name, value, charset); case CE_QUOTED: return field_encode_quoted(name, value, charset, asciicount, eightbitcount + qpspecialcount, 0); default: - inform("Internal error: unknown RFC-2047 encoding type"); + inform("Internal error: unknown RFC-2047 encoding type"); return 1; } } @@ -180,10 +180,10 @@ field_encode_quoted(const char *name, char **value, const char *charset, bool newline = true; while (*p != '\0') { - /* + /* * Start a new line, if it's time */ - if (newline) { + if (newline) { /* * If it's the start of the header, we don't need to pad it * @@ -215,12 +215,12 @@ field_encode_quoted(const char *name, char **value, const char *charset, for (i = 0; i < prefixlen; i++) *q++ = ' '; } else { - /* + /* * A bit of a hack here; the header can contain multiple * spaces (probably at least one) until we get to the * actual text. Copy until we get to a non-space. */ - output = mh_xmalloc(outlen); + output = mh_xmalloc(outlen); q = output; while (is_fws(*p)) *q++ = *p++; @@ -246,7 +246,7 @@ field_encode_quoted(const char *name, char **value, const char *charset, ascii--; } else if (isascii((unsigned char) *p) && (phraserules ? qphrasevalid((unsigned char) *p) : - !qpspecial((unsigned char) *p))) { + !qpspecial((unsigned char) *p))) { *q++ = *p; ascii--; } else { @@ -331,7 +331,7 @@ field_encode_base64(const char *name, char **value, const char *charset) */ while (*p == ' ' || *p == '\t') - p++; + p++; /* * If we had a zero-length prefix, then just encode the whole field @@ -343,7 +343,7 @@ field_encode_base64(const char *name, char **value, const char *charset) */ while (prefixlen && ((base64len(strlen(p)) + 7 + charsetlen + - prefixlen) > ENCODELINELIMIT)) { + prefixlen) > ENCODELINELIMIT)) { /* * Our very first time, don't pad the line in the front @@ -387,7 +387,7 @@ field_encode_base64(const char *name, char **value, const char *charset) if (numencode <= 0) { inform("Internal error: tried to encode %d characters " - "in base64", numencode); + "in base64", numencode); return 1; } @@ -407,10 +407,10 @@ field_encode_base64(const char *name, char **value, const char *charset) */ while (numencode > 0 && ((*(p + numencode) & 0xc0) == 0x80)) - numencode--; + numencode--; if (numencode == 0) { - inform("Internal error: could not find start of " + inform("Internal error: could not find start of " "UTF-8 character when base64 encoding header"); return 1; } @@ -461,10 +461,10 @@ field_encode_base64(const char *name, char **value, const char *charset) q = output + curlen; q += snprintf(q, outlen - (q - output), "%s=?%s?B?", - prefixlen ? " " : "", charset); + prefixlen ? " " : "", charset); if (writeBase64raw((unsigned char *) p, strlen(p), - (unsigned char *) q) != OK) { + (unsigned char *) q) != OK) { inform("Internal error: base64 encoding of header failed"); return 1; } @@ -472,7 +472,7 @@ field_encode_base64(const char *name, char **value, const char *charset) strcat(q, "?="); if (prefixlen) - strcat(q, "\n"); + strcat(q, "\n"); free(*value); @@ -494,14 +494,14 @@ utf8len(const char *p) int len = 1; if (*p == '\0') - return 0; + return 0; if (isascii((unsigned char) *p) || (((unsigned char) *p) & 0xc0) == 0x80) - return 0; + return 0; p++; while ((((unsigned char) *p++) & 0xc0) == 0x80) - len++; + len++; return len; } @@ -520,7 +520,7 @@ unfold_header(char **value, int len) char *p = str, *q = *value; while (*q != '\0') { - if (*q == '\n') { + if (*q == '\n') { /* * When we get a newline, skip to the next non-whitespace * character and add a space to replace all of the whitespace @@ -529,9 +529,9 @@ unfold_header(char **value, int len) * for the header; we put it back in the encoding routine. */ while (is_fws(*q)) - q++; + q++; if (*q == '\0') - break; + break; *p++ = ' '; } else { @@ -582,7 +582,7 @@ field_encode_address(const char *name, char **value, int encoding, output = add(" ", output); for (groupflag = 0; (mp = getname(*value)); ) { - if ((mn = getm(mp, NULL, 0, errbuf, sizeof(errbuf))) == NULL) { + if ((mn = getm(mp, NULL, 0, errbuf, sizeof(errbuf))) == NULL) { inform("%s: %s", errbuf, mp); errflag = true; continue; @@ -613,7 +613,7 @@ field_encode_address(const char *name, char **value, int encoding, */ if (encoding == CE_UNKNOWN) - encoding = pref_encoding(asciichars, specialchars, + encoding = pref_encoding(asciichars, specialchars, eightbitchars); /* @@ -626,14 +626,14 @@ field_encode_address(const char *name, char **value, int encoding, switch (encoding) { case CE_BASE64: - if (field_encode_base64(NULL, &mn->m_pers, charset)) { + if (field_encode_base64(NULL, &mn->m_pers, charset)) { errflag = true; goto out; } break; case CE_QUOTED: - if (field_encode_quoted(NULL, &mn->m_pers, charset, asciichars, + if (field_encode_quoted(NULL, &mn->m_pers, charset, asciichars, eightbitchars + specialchars, 1)) { errflag = true; goto out; @@ -668,7 +668,7 @@ field_encode_address(const char *name, char **value, int encoding, if (mn->m_note[0] != '(' || mn->m_note[len - 1] != ')') { inform("Internal error: Invalid note field \"%s\"", - mn->m_note); + mn->m_note); errflag = true; goto out; } @@ -683,20 +683,20 @@ field_encode_address(const char *name, char **value, int encoding, */ if (encoding == CE_UNKNOWN) - encoding = pref_encoding(asciichars, specialchars, + encoding = pref_encoding(asciichars, specialchars, eightbitchars); switch (encoding) { case CE_BASE64: - if (field_encode_base64(NULL, &tmpbuf, charset)) { + if (field_encode_base64(NULL, &tmpbuf, charset)) { errflag = true; goto out; } break; case CE_QUOTED: - if (field_encode_quoted(NULL, &tmpbuf, charset, asciichars, + if (field_encode_quoted(NULL, &tmpbuf, charset, asciichars, eightbitchars + specialchars, 1)) { errflag = true; goto out; @@ -771,13 +771,13 @@ do_reformat: if (column != prefixlen) { if (len + column + 2 > OUTPUTLINELEN) { - if ((size_t) (prefixlen + 3) < tmpbufsize) + if ((size_t) (prefixlen + 3) < tmpbufsize) tmpbuf = mh_xrealloc(tmpbuf, tmpbufsize = prefixlen + 3); snprintf(tmpbuf, tmpbufsize, ",\n%*s", column = prefixlen, ""); output = add(tmpbuf, output); } else { - output = add(", ", output); + output = add(", ", output); column += 2; } } @@ -826,7 +826,7 @@ scanstring(const char *string, int *asciilen, int *eightbitchars, *specialchars = 0; for (; *string != '\0'; string++) { - if ((isascii((unsigned char) *string))) { + if ((isascii((unsigned char) *string))) { (*asciilen)++; /* * So, a space is not a valid phrase character, but we're counting @@ -834,7 +834,7 @@ scanstring(const char *string, int *asciilen, int *eightbitchars, * encoded as an underscore. */ if (!qphrasevalid((unsigned char) *string) && *string != ' ') - (*specialchars)++; + (*specialchars)++; } else { (*eightbitchars)++; } @@ -873,5 +873,5 @@ pref_encoding(int ascii, int specials, int eightbits) */ return base64len(ascii + eightbits) < (ascii - specials + - (specials + eightbits) * 3) ? CE_BASE64 : CE_QUOTED; + (specials + eightbits) * 3) ? CE_BASE64 : CE_QUOTED; } diff --git a/sbr/ext_hook.c b/sbr/ext_hook.c index ede098f0..cbd0f1af 100644 --- a/sbr/ext_hook.c +++ b/sbr/ext_hook.c @@ -21,7 +21,7 @@ ext_hook(char *hook_name, char *message_file_name_1, char *message_file_name_2) int status; /* exit or other child process status */ char **vec; /* argument vector for child process */ int vecp; /* Vector index */ - char *program; /* Name of program to execute */ + char *program; /* Name of program to execute */ static bool did_message; /* set if we've already output a message */ diff --git a/sbr/fmt_compile.c b/sbr/fmt_compile.c index 3ada1d41..e34dd4df 100644 --- a/sbr/fmt_compile.c +++ b/sbr/fmt_compile.c @@ -71,13 +71,13 @@ static int infunction; /* function nesting cnt */ extern struct mailname fmt_mnull; /* ftable->type (argument type) */ -#define TF_COMP 0 /* component expected */ -#define TF_NUM 1 /* number expected */ -#define TF_STR 2 /* string expected */ -#define TF_EXPR 3 /* component or func. expected */ -#define TF_NONE 4 /* no argument */ -#define TF_MYBOX 5 /* special - get current user's mbox */ -#define TF_NOW 6 /* special - get current unix time */ +#define TF_COMP 0 /* component expected */ +#define TF_NUM 1 /* number expected */ +#define TF_STR 2 /* string expected */ +#define TF_EXPR 3 /* component or func. expected */ +#define TF_NONE 4 /* no argument */ +#define TF_MYBOX 5 /* special - get current user's mbox */ +#define TF_NOW 6 /* special - get current unix time */ #define TF_EXPR_SV 7 /* like expr but save current str reg */ #define TF_NOP 8 /* like expr but no result */ #define TF_MYNAME 9 /* special - get current name of user */ @@ -128,7 +128,7 @@ extern struct mailname fmt_mnull; struct ftable { char *name; /* function name */ char type; /* argument type */ - char f_type; /* fmt type */ + char f_type; /* fmt type */ char extra; /* arg. type dependent extra info */ char flags; }; @@ -229,7 +229,7 @@ static struct ftable functable[] = { { "getmymbox", TF_COMP, FT_STR, FT_GETMYMBOX, 0 }, { "getmyaddr", TF_COMP, FT_LS_ADDR, FT_GETMYADDR, TFL_PUTS }, - { "unquote", TF_EXPR, FT_LS_UNQUOTE, 0, TFL_PUTS }, + { "unquote", TF_EXPR, FT_LS_UNQUOTE, 0, TFL_PUTS }, { "bold", TF_BOLD, FT_LS_LIT, 0, TFL_PUTS }, { "underline", TF_UNDERLN,FT_LS_LIT, 0, TFL_PUTS }, @@ -399,7 +399,7 @@ fmt_compile(char *fstring, struct format **fmt, int reset_comptable) usr_fstring = fstring; if (reset_comptable || !comptable_initialized) { - free_comptable(); + free_comptable(); comptable_initialized = true; } @@ -667,41 +667,41 @@ do_func(char *sp) break; case TF_MYNAME: - LS(t->f_type, getfullname()); + LS(t->f_type, getfullname()); break; case TF_MYHOST: - LS(t->f_type, LocalName(0)); + LS(t->f_type, LocalName(0)); break; case TF_LMBOX: - LS(t->f_type, getlocalmbox()); + LS(t->f_type, getlocalmbox()); break; case TF_BOLD: - LS(t->f_type, get_term_stringcap("bold")); + LS(t->f_type, get_term_stringcap("bold")); break; case TF_UNDERLN: - LS(t->f_type, get_term_stringcap("smul")); + LS(t->f_type, get_term_stringcap("smul")); break; case TF_STNDOUT: - LS(t->f_type, get_term_stringcap("smso")); + LS(t->f_type, get_term_stringcap("smso")); break; case TF_RESET: - LS(t->f_type, get_term_stringcap("sgr0")); + LS(t->f_type, get_term_stringcap("sgr0")); break; case TF_HASCLR: - LV(t->f_type, get_term_numcap("colors") > 1); + LV(t->f_type, get_term_numcap("colors") > 1); break; case TF_FGCOLR: case TF_BGCOLR: { struct colormap *cmap = colortable; - char *code; + char *code; sp = cp - 1; while (c && c != ')') @@ -710,7 +710,7 @@ do_func(char *sp) while (cmap->colorname != NULL) { if (strcasecmp(sp, cmap->colorname) == 0) - break; + break; cmap++; } @@ -728,7 +728,7 @@ do_func(char *sp) if (! code) code = get_term_stringparm(t->type == TF_FGCOLR ? "setf" : "setb", - cmap->nonansinum, 0); + cmap->nonansinum, 0); LS(t->f_type, code); break; @@ -944,18 +944,18 @@ fmt_free(struct format *fmt, int reset_comptable) struct format *fp = fmt; if (fp) { - while (! (fp->f_type == FT_DONE && fp->f_value == 0)) { + while (! (fp->f_type == FT_DONE && fp->f_value == 0)) { if (fp->f_flags & FF_STRALLOC) - free(fp->f_text); + free(fp->f_text); if (fp->f_flags & FF_COMPREF) - free_component(fp->f_comp); + free_component(fp->f_comp); fp++; } free(fmt); } if (reset_comptable) - free_comptable(); + free_comptable(); } /* @@ -1022,7 +1022,7 @@ fmt_addcompentry(char *component) FINDCOMP(cm, component); if (cm) - return 0; + return 0; NEWCOMP(cm, component); @@ -1088,9 +1088,9 @@ fmt_appendcomp(int bucket, char *component, char *text) struct comp *cptr; if (bucket != -1) { - for (cptr = wantcomp[bucket]; cptr; cptr = cptr->c_next) + for (cptr = wantcomp[bucket]; cptr; cptr = cptr->c_next) if (strcasecmp(component, FENDNULL(cptr->c_name)) == 0) - cptr->c_text = add(text, cptr->c_text); + cptr->c_text = add(text, cptr->c_text); } } @@ -1124,7 +1124,7 @@ free_comptable(void) struct comp *cm, *cm2; for (i = 0; i < DIM(wantcomp); i++) { - cm = wantcomp[i]; + cm = wantcomp[i]; while (cm != NULL) { cm2 = cm->c_next; free_component(cm); @@ -1145,13 +1145,13 @@ static void free_component(struct comp *cm) { if (--cm->c_refcount <= 0) { - /* Shouldn't ever be NULL, but just in case ... */ + /* Shouldn't ever be NULL, but just in case ... */ free(cm->c_name); free(cm->c_text); if (cm->c_type & CT_DATE) free(cm->c_tws); if (cm->c_type & CT_ADDR && cm->c_mn && cm->c_mn != &fmt_mnull) mnfree(cm->c_mn); - free(cm); + free(cm); } } diff --git a/sbr/fmt_rfc2047.c b/sbr/fmt_rfc2047.c index 8022c2f6..b5ce57f8 100644 --- a/sbr/fmt_rfc2047.c +++ b/sbr/fmt_rfc2047.c @@ -150,7 +150,7 @@ decode_rfc2047 (char *str, char *dst, size_t dstlen) */ for (endofcharset = startofmime; - *endofcharset != '*' && endofcharset < pp; + *endofcharset != '*' && endofcharset < pp; endofcharset++) ; diff --git a/sbr/fmt_scan.c b/sbr/fmt_scan.c index f9aee54b..c75a1611 100644 --- a/sbr/fmt_scan.c +++ b/sbr/fmt_scan.c @@ -179,12 +179,12 @@ cptrimmed(charstring_t dest, char *str, int wid, char fill, size_t max) */ if (char_len < 0) { - altstr = "?"; + altstr = "?"; char_len = mbtowc(&wide_char, altstr, 1); } if (char_len <= 0) { - break; + break; } w = wcwidth(wide_char); @@ -936,15 +936,15 @@ fmt_scan (struct format *format, charstring_t scanlp, int width, int *dat, buffer[sizeof(buffer)-1] = '\0'; str = buffer; if (*str == '(') - str++; + str++; sp = str + strlen(str) - 1; if (*sp == ')') { - *sp-- = '\0'; - while (sp >= str) - if (*sp == ' ') - *sp-- = '\0'; - else - break; + *sp-- = '\0'; + while (sp >= str) + if (*sp == ' ') + *sp-- = '\0'; + else + break; } str = memmove(buffer, str, strlen(str) + 1); } else if (!(str = get_x400_friendly (mn->m_mbox, @@ -976,7 +976,7 @@ fmt_scan (struct format *format, charstring_t scanlp, int width, int *dat, /* UNQUOTEs RFC-2822 quoted-string and quoted-pair */ case FT_LS_UNQUOTE: - if (str) { + if (str) { if (str != buffer) strncpy(buffer, str, sizeof(buffer)); /* strncpy doesn't NUL-terminate if it fills the buffer */ @@ -1050,7 +1050,7 @@ fmt_scan (struct format *format, charstring_t scanlp, int width, int *dat, indent = strlen (sp); wid -= indent; if (wid <= 0) { - die("putaddr -- num register (%d) must be greater " + die("putaddr -- num register (%d) must be greater " "than label width (%d)", value, indent); } while ((c = *sp++) && charstring_chars (scanlp) < max) { diff --git a/sbr/folder_free.c b/sbr/folder_free.c index 2e591f2e..3ca5d600 100644 --- a/sbr/folder_free.c +++ b/sbr/folder_free.c @@ -35,7 +35,7 @@ folder_free (struct msgs *mp) /* Close/free the sequence file if it is open */ if (mp->seqhandle) - lkfclosedata (mp->seqhandle, mp->seqname); + lkfclosedata (mp->seqhandle, mp->seqname); free(mp->seqname); diff --git a/sbr/geteditor.c b/sbr/geteditor.c index 9ef6f5c0..a0071998 100644 --- a/sbr/geteditor.c +++ b/sbr/geteditor.c @@ -18,10 +18,10 @@ get_default_editor(void) char *str; if (default_editor) - return default_editor; + return default_editor; if (!(str = context_find("editor")) && !(str = getenv("VISUAL")) && - !(str = getenv("EDITOR"))) { + !(str = getenv("EDITOR"))) { str = "prompter"; } diff --git a/sbr/lock_file.c b/sbr/lock_file.c index f8e4b6c7..81ad0453 100644 --- a/sbr/lock_file.c +++ b/sbr/lock_file.c @@ -161,7 +161,7 @@ lkfopendata(const char *file, const char *mode, int *failed_to_lock) int fd; if (oflags == -1) { - errno = EINVAL; + errno = EINVAL; return NULL; } @@ -185,7 +185,7 @@ lkfopenspool(const char *file, const char *mode) int fd; if (oflags == -1) { - errno = EINVAL; + errno = EINVAL; return NULL; } @@ -215,7 +215,7 @@ lkclosedata(int fd, const char *name) int rc = close(fd); if (datalocktype == DOT_LOCKING) - lkclose_dot(fd, name); + lkclose_dot(fd, name); return rc; } @@ -226,13 +226,13 @@ lkfclosedata(FILE *f, const char *name) int fd, rc; if (f == NULL) - return 0; + return 0; fd = fileno(f); rc = fclose(f); if (datalocktype == DOT_LOCKING) - lkclose_dot(fd, name); + lkclose_dot(fd, name); return rc; } @@ -243,7 +243,7 @@ lkclosespool(int fd, const char *name) int rc = close(fd); if (spoollocktype == DOT_LOCKING) - lkclose_dot(fd, name); + lkclose_dot(fd, name); return rc; } @@ -254,13 +254,13 @@ lkfclosespool(FILE *f, const char *name) int fd, rc; if (f == NULL) - return 0; + return 0; fd = fileno(f); rc = fclose(f); if (spoollocktype == DOT_LOCKING) - lkclose_dot(fd, name); + lkclose_dot(fd, name); return rc; } @@ -301,23 +301,23 @@ lkopen (const char *file, int access, mode_t mode, enum locktype ltype, switch (ltype) { case FCNTL_LOCKING: - return lkopen_fcntl(file, access, mode, failed_to_lock); + return lkopen_fcntl(file, access, mode, failed_to_lock); case DOT_LOCKING: - return lkopen_dot(file, access, mode, failed_to_lock); + return lkopen_dot(file, access, mode, failed_to_lock); #ifdef HAVE_FLOCK case FLOCK_LOCKING: - return lkopen_flock(file, access, mode, failed_to_lock); + return lkopen_flock(file, access, mode, failed_to_lock); #endif /* HAVE_FLOCK */ #ifdef HAVE_LOCKF case LOCKF_LOCKING: - return lkopen_lockf(file, access, mode, failed_to_lock); + return lkopen_lockf(file, access, mode, failed_to_lock); #endif /* HAVE_FLOCK */ default: - die("Internal locking error: unsupported lock type used!"); + die("Internal locking error: unsupported lock type used!"); } return -1; @@ -359,7 +359,7 @@ lkopen_fcntl(const char *file, int access, mode_t mode, int *failed_to_lock) */ for (i = 0; i < LOCK_RETRIES; i++) { - if ((fd = open(file, access, mode)) == -1) + if ((fd = open(file, access, mode)) == -1) return -1; flk.l_start = 0; @@ -397,10 +397,10 @@ lkopen_flock(const char *file, int access, mode_t mode, int *failed_to_lock) */ locktype = (((access & O_ACCMODE) == O_RDONLY) ? LOCK_SH : LOCK_EX) | - LOCK_NB; + LOCK_NB; for (i = 0; i < LOCK_RETRIES; i++) { - if ((fd = open(file, access, mode)) == -1) + if ((fd = open(file, access, mode)) == -1) return -1; if (flock(fd, locktype) != -1) @@ -441,12 +441,12 @@ lkopen_lockf(const char *file, int access, mode_t mode, int *failed_to_lock) access &= ~O_APPEND; if ((access & O_ACCMODE) == O_RDONLY) { - access &= ~O_RDONLY; + access &= ~O_RDONLY; access |= O_RDWR; } for (i = 0; i < LOCK_RETRIES; i++) { - if ((fd = open(file, access, mode)) == -1) + if ((fd = open(file, access, mode)) == -1) return -1; if (lockf(fd, F_TLOCK, 0) != -1) { @@ -454,7 +454,7 @@ lkopen_lockf(const char *file, int access, mode_t mode, int *failed_to_lock) * Seek to end if requested */ if (saved_access & O_APPEND) { - lseek(fd, 0, SEEK_END); + lseek(fd, 0, SEEK_END); } return fd; } @@ -747,7 +747,7 @@ static enum locktype init_locktype(const char *lockname) { if (strcasecmp(lockname, "fcntl") == 0) { - return FCNTL_LOCKING; + return FCNTL_LOCKING; } if (strcasecmp(lockname, "lockf") == 0) { #ifdef HAVE_LOCKF @@ -764,7 +764,7 @@ init_locktype(const char *lockname) #endif /* HAVE_FLOCK */ } if (strcasecmp(lockname, "dot") == 0) { - return DOT_LOCKING; + return DOT_LOCKING; } die("Unknown lock type: \"%s\"", lockname); /* NOTREACHED */ diff --git a/sbr/mf.c b/sbr/mf.c index 93528ee2..51edd645 100644 --- a/sbr/mf.c +++ b/sbr/mf.c @@ -244,7 +244,7 @@ again: ; case LX_END: return DONE; - case LX_LBRK: /* sigh (2) */ + case LX_LBRK: /* sigh (2) */ goto get_addr; case LX_AT: /* sigh (3) */ @@ -303,7 +303,7 @@ again: ; } } - case LX_DOT: /* sigh (1) */ + case LX_DOT: /* sigh (1) */ pers = add (".", pers); goto more_phrase; @@ -349,7 +349,7 @@ again: ; return NOTOK; } - case LX_SEMI: /* no host */ + case LX_SEMI: /* no host */ case LX_COMA: case LX_END: ingrp = glevel; @@ -400,7 +400,7 @@ route_addr (char *buffer) return domain (buffer); case LX_SEMI: /* if in group */ - case LX_RBRK: /* no host */ + case LX_RBRK: /* no host */ case LX_COMA: case LX_END: return OK; @@ -461,7 +461,7 @@ domain (char *buffer) host = add (buffer, host); continue; - case LX_AT: /* sigh (0) */ + case LX_AT: /* sigh (0) */ mbox = add (host, add ("%", mbox)); free (host); host = NULL; diff --git a/sbr/mts.c b/sbr/mts.c index 452dc735..c453e1d8 100644 --- a/sbr/mts.c +++ b/sbr/mts.c @@ -220,7 +220,7 @@ LocalName (int flag) struct addrinfo hints, *res; if (flag < 0 || flag > 1) - return NULL; + return NULL; buf = buffer[flag]; @@ -328,7 +328,7 @@ char * getlocalmbox (void) { if (username[0] == '\0') - getuserinfo(); + getuserinfo(); return localmbox; } @@ -402,7 +402,7 @@ getuserinfo (void) if ((cp = getenv ("SIGNATURE")) && *cp) strncpy (fullname, cp, sizeof(fullname)); else if ((cp = context_find("Signature"))) - strncpy (fullname, cp, sizeof(fullname)); + strncpy (fullname, cp, sizeof(fullname)); fullname[sizeof(fullname) - 1] = '\0'; diff --git a/sbr/netsec.c b/sbr/netsec.c index 75be76a3..a4ede210 100644 --- a/sbr/netsec.c +++ b/sbr/netsec.c @@ -837,7 +837,7 @@ retry: * At that point, just give up. */ netsec_err(errstr, "Internal error: wanted to printf() a total of " - "%d bytes, but our buffer size was only %d bytes", + "%d bytes, but our buffer size was only %d bytes", rc, nsc->ns_outbufsize); return NOTOK; } @@ -926,7 +926,7 @@ netsec_flush(netsec_context *nsc, char **errstr) if (nsc->ns_snoop_savebuf) { cb_len += strlen(nsc->ns_snoop_savebuf); nsc->ns_snoop_savebuf = mh_xrealloc(nsc->ns_snoop_savebuf, - outlen); + outlen); ptr = nsc->ns_snoop_savebuf; } else { ptr = snoopoutbuf; @@ -1260,7 +1260,7 @@ netsec_negotiate_sasl(netsec_context *nsc, const char *mechlist, char **errstr) &xoauth_client_res, &xoauth_client_res_len, nsc->ns_snoop ? stderr : NULL) != OK) { netsec_err(errstr, "Internal error: Unable to get OAuth2 " - "bearer token"); + "bearer token"); return NOTOK; } @@ -1359,7 +1359,7 @@ netsec_negotiate_sasl(netsec_context *nsc, const char *mechlist, char **errstr) */ rc = sasl_client_start(nsc->sasl_conn, - nsc->sasl_mech ? nsc->sasl_mech : mechlist, NULL, + nsc->sasl_mech ? nsc->sasl_mech : mechlist, NULL, (const char **) &saslbuf, &saslbuflen, &chosen_mech); @@ -1383,7 +1383,7 @@ netsec_negotiate_sasl(netsec_context *nsc, const char *mechlist, char **errstr) */ while (rc == SASL_CONTINUE) { - /* + /* * Call our SASL callback, which will handle the details of * reading data from the network. */ @@ -1720,7 +1720,7 @@ netsec_set_tls(netsec_context *nsc, int tls, int noverify, char **errstr) if (! ssl_bio) { netsec_err(errstr, "Unable to create a SSL BIO: %s", - ERR_error_string(ERR_get_error(), NULL)); + ERR_error_string(ERR_get_error(), NULL)); SSL_free(ssl); return NOTOK; } @@ -1845,7 +1845,7 @@ netsec_err(char **errstr, const char *fmt, ...) int rc = 127; if (! errstr) - return; + return; do { errbufsize = rc + 1; diff --git a/sbr/oauth_prof.c b/sbr/oauth_prof.c index 13e5b973..db9c5cda 100644 --- a/sbr/oauth_prof.c +++ b/sbr/oauth_prof.c @@ -86,7 +86,7 @@ update_svc(mh_oauth_service_info *svc, const char *svc_name, char *errbuf, #define update(name) \ update_svc_field(&svc->name, #name, svc_name); \ if (svc->name == NULL) { \ - snprintf(errbuf, errbuflen, "%s", #name " is missing"); \ + snprintf(errbuf, errbuflen, "%s", #name " is missing"); \ errbuf[errbuflen - 1] = '\0'; \ return false; \ } diff --git a/sbr/read_switch_multiword.c b/sbr/read_switch_multiword.c index ff75a016..9c123673 100644 --- a/sbr/read_switch_multiword.c +++ b/sbr/read_switch_multiword.c @@ -42,7 +42,7 @@ read_switch_multiword (const char *prompt, const struct swit *ansp) cp = ansbuf; while ((i = getchar ()) != '\n') { if (i == EOF) { - /* + /* * If we get an EOF, return */ if (feof(stdin)) @@ -56,11 +56,11 @@ read_switch_multiword (const char *prompt, const struct swit *ansp) if (ferror(stdin)) { if (errno == EINTR) { - clearerr(stdin); + clearerr(stdin); continue; } fprintf(stderr, "\nError %s during read\n", - strerror(errno)); + strerror(errno)); siglongjmp (sigenv, 1); } diff --git a/sbr/read_switch_multiword_via_readline.c b/sbr/read_switch_multiword_via_readline.c index df91701c..67d405c5 100644 --- a/sbr/read_switch_multiword_via_readline.c +++ b/sbr/read_switch_multiword_via_readline.c @@ -37,7 +37,7 @@ read_switch_multiword_via_readline(char *prompt, struct swit *ansp) rl_cmds = ansp; for (;;) { - ans = readline(prompt); + ans = readline(prompt); /* * If we get an EOF, return */ @@ -59,10 +59,10 @@ read_switch_multiword_via_readline(char *prompt, struct swit *ansp) cpp = brkstring(ansbuf, " ", NULL); switch (smatch(*cpp, ansp)) { case AMBIGSW: - ambigsw(*cpp, ansp); + ambigsw(*cpp, ansp); continue; case UNKWNSW: - printf(" -%s unknown. Hit for help.\n", *cpp); + printf(" -%s unknown. Hit for help.\n", *cpp); continue; default: return cpp; @@ -83,7 +83,7 @@ nmh_completion(const char *text, int start, int end) NMH_UNUSED (end); if (start == 0) - return rl_completion_matches(text, nmh_command_generator); + return rl_completion_matches(text, nmh_command_generator); return NULL; } @@ -96,12 +96,12 @@ nmh_command_generator(const char *text, int state) char buf[256]; if (!state) { - list_index = 0; + list_index = 0; len = strlen(text); } while ((name = rl_cmds[list_index].sw)) { - list_index++; + list_index++; strncpy(buf, name, sizeof(buf)); buf[sizeof(buf) - 1] = '\0'; p = *brkstring(buf, " ", NULL); diff --git a/sbr/seq_read.c b/sbr/seq_read.c index 20d16ce9..a3c4e0d6 100644 --- a/sbr/seq_read.c +++ b/sbr/seq_read.c @@ -110,7 +110,7 @@ seq_public (struct msgs *mp, int lockflag, int *failed_to_lock) continue; case BODY: - lkfclosedata (fp, seqfile); + lkfclosedata (fp, seqfile); die("no blank lines are permitted in %s", seqfile); break; @@ -118,7 +118,7 @@ seq_public (struct msgs *mp, int lockflag, int *failed_to_lock) break; default: - lkfclosedata (fp, seqfile); + lkfclosedata (fp, seqfile); die("%s is poorly formatted", seqfile); } break; /* break from for loop */ diff --git a/sbr/seq_save.c b/sbr/seq_save.c index 3abf9e27..08fc9a56 100644 --- a/sbr/seq_save.c +++ b/sbr/seq_save.c @@ -36,7 +36,7 @@ seq_save (struct msgs *mp) /* check if sequence information has changed */ if (!(mp->msgflags & SEQMOD)) { - if (mp->seqhandle) { + if (mp->seqhandle) { lkfclosedata (mp->seqhandle, mp->seqname); mp->seqhandle = NULL; free(mp->seqname); diff --git a/sbr/terminal.c b/sbr/terminal.c index 51f97026..d3c3b9f7 100644 --- a/sbr/terminal.c +++ b/sbr/terminal.c @@ -47,12 +47,12 @@ initialize_terminfo(void) int errret, rc; if (termstatus) - return; + return; rc = setupterm(NULL, fileno(stdout), &errret); if (rc != 0 || errret != 1) { - termstatus = -1; + termstatus = -1; return; } termstatus = 1; @@ -173,14 +173,14 @@ get_term_stringcap(char *capability) initialize_terminfo(); if (termstatus == -1) - return NULL; + return NULL; termcbufp = termcbuf; parm = tigetstr(capability); if (parm == (char *) -1 || parm == NULL) { - return NULL; + return NULL; } tputs(parm, 1, termbytes); @@ -215,14 +215,14 @@ get_term_stringparm(char *capability, long arg1, long arg2) initialize_terminfo(); if (termstatus == -1) - return NULL; + return NULL; termcbufp = termcbuf; parm = tigetstr(capability); if (parm == (char *) -1 || parm == NULL) { - return NULL; + return NULL; } parm = tparm(parm, arg1, arg2, 0, 0, 0, 0, 0, 0, 0); @@ -253,7 +253,7 @@ get_term_numcap(char *capability) initialize_terminfo(); if (termstatus == -1) - return -1; + return -1; return tigetnum(capability); } @@ -274,7 +274,7 @@ termbytes(TPUTS_PUTC_ARG c) if ((offset = termcbufp - termcbuf) - 1 >= termcbufsz) { termcbufsz += 64; - termcbuf = mh_xrealloc(termcbuf, termcbufsz); + termcbuf = mh_xrealloc(termcbuf, termcbufsz); termcbufp = termcbuf + offset; } diff --git a/sbr/utils.c b/sbr/utils.c index 9f12132f..fe531ac2 100644 --- a/sbr/utils.c +++ b/sbr/utils.c @@ -177,7 +177,7 @@ char * addlist (char *list, const char *item) { if (list) - list = add (", ", list); + list = add (", ", list); return add (item, list); } diff --git a/test/runpty.c b/test/runpty.c index 661d8753..6e7e058c 100644 --- a/test/runpty.c +++ b/test/runpty.c @@ -57,7 +57,7 @@ main(int argc, char *argv[]) starttime = time(NULL); for (;;) { - fd_set readfds; + fd_set readfds; struct timeval tv; FD_ZERO(&readfds); diff --git a/uip/annosbr.c b/uip/annosbr.c index fcb5e095..8b0c8843 100644 --- a/uip/annosbr.c +++ b/uip/annosbr.c @@ -59,7 +59,7 @@ annotate (char *file, char *comp, char *text, bool inplace, bool datesw, int del if (stat(file, &s) == -1) { inform("can't get access and modification times for %s", file); - preserve_actime_and_modtime = 0; + preserve_actime_and_modtime = 0; } b.actime = s.st_atime; diff --git a/uip/dist.c b/uip/dist.c index 7ad5a4cd..e6720ae7 100644 --- a/uip/dist.c +++ b/uip/dist.c @@ -200,30 +200,30 @@ main (int argc, char **argv) case FROMSW: if (!(cp = *argp++) || *cp == '-') - die("missing argument to %s", argp[-2]); + die("missing argument to %s", argp[-2]); from = addlist(from, cp); continue; case TOSW: if (!(cp = *argp++) || *cp == '-') - die("missing argument to %s", argp[-2]); + die("missing argument to %s", argp[-2]); to = addlist(to, cp); continue; case CCSW: if (!(cp = *argp++) || *cp == '-') - die("missing argument to %s", argp[-2]); + die("missing argument to %s", argp[-2]); cc = addlist(cc, cp); continue; case FCCSW: if (!(cp = *argp++) || *cp == '-') - die("missing argument to %s", argp[-2]); + die("missing argument to %s", argp[-2]); fcc = addlist(fcc, cp); continue; case WIDTHSW: if (!(cp = *argp++) || *cp == '-') - die("missing argument to %s", argp[-2]); + die("missing argument to %s", argp[-2]); if ((outputlinelen = atoi(cp)) < 10) - die("impossible width %d", outputlinelen); + die("impossible width %d", outputlinelen); continue; case ATFILESW: @@ -328,7 +328,7 @@ try_it_again: dat[4] = 0; if (!form) - form = distcomps; + form = distcomps; in = build_form(form, NULL, dat, from, to, cc, fcc, NULL, msgnam); diff --git a/uip/forwsbr.c b/uip/forwsbr.c index 2cdfb303..1b6a92cb 100644 --- a/uip/forwsbr.c +++ b/uip/forwsbr.c @@ -67,7 +67,7 @@ build_form (char *form, char *digest, int *dat, char *from, char *to, */ if ((tmp = fopen(inputfile, "r")) == NULL) - adios (inputfile, "Unable to open"); + adios (inputfile, "Unable to open"); /* Get new format string */ nfs = new_fs (form, NULL, NULL); @@ -100,7 +100,7 @@ build_form (char *form, char *digest, int *dat, char *from, char *to, switch (state) { case FLD: case FLDPLUS: - /* + /* * If we find a component that we're interested in, save * a copy. We don't do all of that weird buffer switching * that replout does. @@ -124,10 +124,10 @@ build_form (char *form, char *digest, int *dat, char *from, char *to, case FMTERR: case BODY: case FILEEOF: - goto finished; + goto finished; default: - die("m_getfld2() returned %d", state); + die("m_getfld2() returned %d", state); } } @@ -146,37 +146,37 @@ finished: cptr = fmt_findcomp ("digest"); if (cptr) { - COMPFREE(cptr); + COMPFREE(cptr); cptr->c_text = getcpy(digest); } cptr = fmt_findcomp ("nmh-date"); if (cptr) { - COMPFREE(cptr); + COMPFREE(cptr); cptr->c_text = getcpy(dtimenow (0)); } cptr = fmt_findcomp ("nmh-from"); if (cptr) { - COMPFREE(cptr); + COMPFREE(cptr); cptr->c_text = getcpy(from); } cptr = fmt_findcomp ("nmh-to"); if (cptr) { - COMPFREE(cptr); + COMPFREE(cptr); cptr->c_text = getcpy(to); } cptr = fmt_findcomp ("nmh-cc"); if (cptr) { - COMPFREE(cptr); + COMPFREE(cptr); cptr->c_text = getcpy(cc); } cptr = fmt_findcomp ("nmh-subject"); if (cptr) { - COMPFREE(cptr); + COMPFREE(cptr); cptr->c_text = getcpy(subject); } cptr = fmt_findcomp ("fcc"); if (cptr) { - COMPFREE(cptr); + COMPFREE(cptr); cptr->c_text = getcpy(fcc); } diff --git a/uip/mhlist.c b/uip/mhlist.c index 6faef9b6..a8e28cbd 100644 --- a/uip/mhlist.c +++ b/uip/mhlist.c @@ -184,10 +184,10 @@ main (int argc, char **argv) continue; case CHGSW: - chgflag = true; + chgflag = true; continue; case NCHGSW: - chgflag = false; + chgflag = false; continue; case VERBSW: diff --git a/uip/mhlistsbr.c b/uip/mhlistsbr.c index 6b4852fc..68cd4d27 100644 --- a/uip/mhlistsbr.c +++ b/uip/mhlistsbr.c @@ -136,9 +136,9 @@ list_content (CT ct, int toplevel, int realsize, int verbose, int debug, PM pm; if (toplevel > 0) - printf (LSTFMT2a, atoi (r1bindex (FENDNULL(ct->c_file), '/'))); + printf (LSTFMT2a, atoi (r1bindex (FENDNULL(ct->c_file), '/'))); else - printf(toplevel < 0 ? "part " : " "); + printf(toplevel < 0 ? "part " : " "); snprintf (buffer, sizeof(buffer), "%s/%s", FENDNULL(ci->ci_type), FENDNULL(ci->ci_subtype)); @@ -193,7 +193,7 @@ list_content (CT ct, int toplevel, int realsize, int verbose, int debug, for (pm = ci->ci_first_pm; pm; pm = pm->pm_next) { printf ("\t %s=\"%s\"\n", pm->pm_name, - get_param_value(pm, '?')); + get_param_value(pm, '?')); } /* diff --git a/uip/mhn.c b/uip/mhn.c index c5c39ecc..785c734f 100644 --- a/uip/mhn.c +++ b/uip/mhn.c @@ -168,7 +168,7 @@ main (int argc, char **argv) case CHECKSW: case NCHECKSW: - /* Currently a NOP */ + /* Currently a NOP */ continue; case HEADSW: diff --git a/uip/mhparse.c b/uip/mhparse.c index ae39cad7..4d5c0499 100644 --- a/uip/mhparse.c +++ b/uip/mhparse.c @@ -625,7 +625,7 @@ get_ctinfo (char *cp, CT ct, int magic) fprintf (stderr, "%s: %s\n", TYPE_FIELD, cp); if (*cp == '(' && get_comment (ct->c_file, TYPE_FIELD, &cp, - &ci->ci_comment) == NOTOK) + &ci->ci_comment) == NOTOK) return NOTOK; for (dp = cp; istoken (*dp); dp++) @@ -647,7 +647,7 @@ get_ctinfo (char *cp, CT ct, int magic) cp++; if (*cp == '(' && get_comment (ct->c_file, TYPE_FIELD, &cp, - &ci->ci_comment) == NOTOK) + &ci->ci_comment) == NOTOK) return NOTOK; if (*cp != '/') { @@ -661,7 +661,7 @@ get_ctinfo (char *cp, CT ct, int magic) cp++; if (*cp == '(' && get_comment (ct->c_file, TYPE_FIELD, &cp, - &ci->ci_comment) == NOTOK) + &ci->ci_comment) == NOTOK) return NOTOK; for (dp = cp; istoken (*dp); dp++) @@ -684,11 +684,11 @@ magic_skip: cp++; if (*cp == '(' && get_comment (ct->c_file, TYPE_FIELD, &cp, - &ci->ci_comment) == NOTOK) + &ci->ci_comment) == NOTOK) return NOTOK; if ((status = parse_header_attrs (ct->c_file, TYPE_FIELD, &cp, - &ci->ci_first_pm, &ci->ci_last_pm, + &ci->ci_first_pm, &ci->ci_last_pm, &ci->ci_comment)) != OK) { return status == NOTOK ? NOTOK : OK; } @@ -776,7 +776,7 @@ magic_skip: */ if (magic && *cp == '*') { - /* + /* * See if it's a CTE we match on */ struct k2v *kv; @@ -874,7 +874,7 @@ get_dispo (char *cp, CT ct, int buildflag) fprintf (stderr, "%s: %s\n", DISPO_FIELD, cp); if (*cp == '(' && get_comment (ct->c_file, DISPO_FIELD, &cp, NULL) == - NOTOK) { + NOTOK) { free(dispoheader); return NOTOK; } @@ -891,7 +891,7 @@ get_dispo (char *cp, CT ct, int buildflag) return NOTOK; if ((status = parse_header_attrs (ct->c_file, DISPO_FIELD, &cp, - &ct->c_dispo_first, &ct->c_dispo_last, + &ct->c_dispo_first, &ct->c_dispo_last, NULL)) != OK) { if (status == NOTOK) { free(dispoheader); @@ -903,7 +903,7 @@ get_dispo (char *cp, CT ct, int buildflag) } if (buildflag) - free(dispoheader); + free(dispoheader); else ct->c_dispo = dispoheader; @@ -1572,7 +1572,7 @@ params_external (CT ct, int composing) e->eb_url = u = mh_xmalloc(strlen(pm->pm_value) + 1); for (; *p != '\0'; p++) { - if (! isspace((unsigned char) *p)) + if (! isspace((unsigned char) *p)) *u++ = *p; } @@ -2414,7 +2414,7 @@ openFTP (CT ct, char **file) vec[vecp++] = e->eb_name; vec[vecp++] = ce->ce_file, vec[vecp++] = e->eb_mode && !strcasecmp (e->eb_mode, "ascii") - ? "ascii" : "binary"; + ? "ascii" : "binary"; vec[vecp] = NULL; fflush (stdout); @@ -2589,15 +2589,15 @@ openURL (CT ct, char **file) pid_t child_id; if ((urlprog = context_find(nmhaccessurl)) && *urlprog == '\0') - urlprog = NULL; + urlprog = NULL; if (! urlprog) { - content_error(NULL, ct, "No entry for nmh-access-url in profile"); - return NOTOK; + content_error(NULL, ct, "No entry for nmh-access-url in profile"); + return NOTOK; } switch (openExternal(e->eb_parent, ce, file, &fd)) { - case NOTOK: + case NOTOK: return NOTOK; case OK: @@ -2608,7 +2608,7 @@ openURL (CT ct, char **file) } if (!e->eb_url) { - content_error(NULL, ct, "missing url parameter"); + content_error(NULL, ct, "missing url parameter"); return NOTOK; } @@ -2626,17 +2626,17 @@ openURL (CT ct, char **file) } if ((ce->ce_fp = fopen(ce->ce_file, "w+")) == NULL) { - content_error(ce->ce_file, ct, "unable to fopen for read/writing"); + content_error(ce->ce_file, ct, "unable to fopen for read/writing"); return NOTOK; } switch (child_id = fork()) { case NOTOK: - adios ("fork", "unable to"); + adios ("fork", "unable to"); /* NOTREACHED */ case OK: - argsplit_msgarg(&args, urlprog, &program); + argsplit_msgarg(&args, urlprog, &program); app_msgarg(&args, e->eb_url); app_msgarg(&args, NULL); dup2(fileno(ce->ce_fp), 1); @@ -2648,7 +2648,7 @@ openURL (CT ct, char **file) /* NOTREACHED */ default: - if (pidXwait(child_id, NULL)) { + if (pidXwait(child_id, NULL)) { ce->ce_unlink = 1; return NOTOK; } @@ -3059,7 +3059,7 @@ parse_header_attrs (const char *filename, const char *fieldname, continue; } if (*vp == '*' && vp == up - 1) { - encoded = true; + encoded = true; } else if (partial) { if (isdigit((unsigned char) *vp)) index = *vp - '0' + index * 10; @@ -3092,7 +3092,7 @@ parse_header_attrs (const char *filename, const char *fieldname, * parameter). */ if (index == 0) { - vp = dp; + vp = dp; while (*vp != '\'' && !isspace((unsigned char) *vp) && *vp != '\0') vp++; @@ -3222,7 +3222,7 @@ bad_quote: valptr = mh_xmalloc(len + 1); if (*dp == '"') { - int i; + int i; for (cp = dp + 1, vp = valptr, i = 0; i < len; i++) { if (*cp == '\\') { cp++; @@ -3231,7 +3231,7 @@ bad_quote: } cp++; } else { - strncpy(valptr, cp = dp, len); + strncpy(valptr, cp = dp, len); cp += len; } @@ -3305,7 +3305,7 @@ bad_quote: if (index == 0 && encoded) { free(pp->charset); - pp->charset = charset; + pp->charset = charset; free(pp->lang); pp->lang = lang; } @@ -3329,7 +3329,7 @@ bad_quote: */ for (pp = phead; pp != NULL; ) { - char *p, *q; + char *p, *q; size_t tlen = 0; int pindex = 0; for (sp = pp->sechead; sp != NULL; sp = sp->next) { @@ -3492,7 +3492,7 @@ output_params(size_t initialwidth, PM params, int *offsetout, int external) if (index > 0) { q += snprintf(q, sizeof(line) - (q - line), "%s*%d", - params->pm_name, index); + params->pm_name, index); } else { strncpy(q, params->pm_name, sizeof(line) - (q - line)); q += strlen(q); @@ -3500,10 +3500,10 @@ output_params(size_t initialwidth, PM params, int *offsetout, int external) if (encode) i = encode_param(params, q, sizeof(line) - (q - line), - strlen(params->pm_value + valoff), valoff, index); + strlen(params->pm_value + valoff), valoff, index); else i = normal_param(params, q, sizeof(line) - (q - line), - strlen(params->pm_value + valoff), valoff); + strlen(params->pm_value + valoff), valoff); if (i == 0) { free(paramout); @@ -3631,7 +3631,7 @@ param_len(PM pm, int index, size_t valueoff, int *encode, int *cont, len += 3; maxfit -= 3; } else { - len++; + len++; maxfit--; } /* @@ -3644,7 +3644,7 @@ param_len(PM pm, int index, size_t valueoff, int *encode, int *cont, fitlimit++; } } else { - /* + /* * Calculate the string length, but add room for quoting \ * and " if necessary. Also account for quotes at beginning * and end. @@ -3653,7 +3653,7 @@ param_len(PM pm, int index, size_t valueoff, int *encode, int *cont, switch (*p) { case '"': case '\\': - len++; + len++; maxfit--; /* FALLTHRU */ default: @@ -3802,7 +3802,7 @@ add_param(PM *first, PM *last, char *name, char *value, int nocopy) (*last)->pm_next = pm; *last = pm; } else { - *first = pm; + *first = pm; *last = pm; } @@ -3847,7 +3847,7 @@ get_param(PM first, const char *name, char replace, int fetchonly) while (first != NULL) { if (strcasecmp(name, first->pm_name) == 0) { if (fetchonly) - return first->pm_value; + return first->pm_value; return getcpy(get_param_value(first, replace)); } first = first->pm_next; @@ -3884,7 +3884,7 @@ get_param_value(PM pm, char replace) */ if (!pm->pm_charset || check_charset(pm->pm_charset, - strlen(pm->pm_charset))) { + strlen(pm->pm_charset))) { return pm->pm_value; } diff --git a/uip/mhshowsbr.c b/uip/mhshowsbr.c index 4ecbc648..cd53d145 100644 --- a/uip/mhshowsbr.c +++ b/uip/mhshowsbr.c @@ -281,7 +281,7 @@ show_switch (CT ct, int alternate, int concatsw, int textonly, int inlineonly, */ default: return show_content (ct, alternate, textonly, - inlineonly, fmt); + inlineonly, fmt); } case CT_TEXT: @@ -384,7 +384,7 @@ show_content_aux (CT ct, int alternate, char *cp, char *cracked, struct format * } if (parse_display_string (ct, cp, &xstdin, &xlist, file, buffer, - sizeof(buffer) - 1, 0)) { + sizeof(buffer) - 1, 0)) { inform("Buffer overflow constructing show command, continuing..."); return NOTOK; } diff --git a/uip/new.c b/uip/new.c index b18a99b3..8e61e772 100644 --- a/uip/new.c +++ b/uip/new.c @@ -135,7 +135,7 @@ get_msgnums(char *folder, char *sequences[]) seqfile = concat(m_maildir(folder), "/", mh_seq, NULL); if (seqfile == NULL) - return NULL; + return NULL; if ((fp = lkfopendata (seqfile, "r", & failed_to_lock)) == NULL) { if (failed_to_lock) diff --git a/uip/slocal.c b/uip/slocal.c index 8cca5e35..f744c9e9 100644 --- a/uip/slocal.c +++ b/uip/slocal.c @@ -8,7 +8,7 @@ /* * Under sendmail, users should add the line * - * "| /usr/local/nmh/lib/slocal" + * "| /usr/local/nmh/lib/slocal" * * to their $HOME/.forward file. * @@ -501,7 +501,7 @@ usr_delivery (int fd, char *delivery, int su) * If previous condition failed, don't * do this - else fall through */ - if (!next) + if (!next) continue; /* FALLTHRU */