Get rid of more whitespace errors; hopefully I got them all.
41 files changed:
if ($subtype eq 'alternative' && ! defined $altout &&
$type eq 'text/plain') {
if ($subtype eq 'alternative' && ! defined $altout &&
$type eq 'text/plain') {
/* codes returned by alias() */
/* 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 */
#define AK_LIMIT 3 /* memory limit exceeded */
#define DEFINE_SWITCH_ENUM(name) \
enum { \
#define DEFINE_SWITCH_ENUM(name) \
enum { \
LEN_ ## name \
}
#define DEFINE_SWITCH_ARRAY(name, array) \
static struct swit array[] = { \
LEN_ ## name \
}
#define DEFINE_SWITCH_ARRAY(name, array) \
static struct swit array[] = { \
* See if file has any 8-bit bytes.
* Arguments include:
*
* See if file has any 8-bit bytes.
* Arguments include:
*
* eightbit - address of result, will be set to 1 if the file contains
* any 8-bit bytes, 0 otherwise.
*
* eightbit - address of result, will be set to 1 if the file contains
* any 8-bit bytes, 0 otherwise.
*
AS_IF([test "x$enableval" = xyes],[
AC_MSG_ERROR([--enable-lockdir requires an argument])])
AC_DEFINE_UNQUOTED([LOCKDIR], ["$enableval"],
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])
[for tputs_arg1 in 'const char *' 'char *'; do
for tputs_putc_arg in 'int' 'char'; do
AC_COMPILE_IFELSE(
[for tputs_arg1 in 'const char *' 'char *'; do
for tputs_putc_arg in 'int' 'char'; do
AC_COMPILE_IFELSE(
[AC_INCLUDES_DEFAULT
#include <curses.h>
#include <term.h>
[AC_INCLUDES_DEFAULT
#include <curses.h>
#include <term.h>
strncpy (addr, FENDNULL(mp->m_mbox), sizeof(addr));
else if (mp->m_type != UUCPHOST) {
if (mp->m_host)
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), mp->m_host);
else snprintf (addr, sizeof(addr), "%s%s", FENDNULL(mp->m_path),
} else
snprintf (addr, sizeof(addr), "%s!%s", mp->m_host, mp->m_mbox);
} else
snprintf (addr, sizeof(addr), "%s!%s", mp->m_host, mp->m_mbox);
/* 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)
/* 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)
}
if ((am = context_find ("alternate-mailboxes")) == NULL)
bool space = false;
bool metachar = false;
for (p = command; *p; p++) {
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;
space = true;
} else if (strchr(METACHARS, *p)) {
metachar = true;
*/
if (!space && !metachar) {
*/
if (!space && !metachar) {
- argvarray[0] = mh_xstrdup(r1bindex(command, '/'));
+ argvarray[0] = mh_xstrdup(r1bindex(command, '/'));
argvarray[1] = NULL;
*file = mh_xstrdup(command);
if (argp)
argvarray[1] = NULL;
*file = mh_xstrdup(command);
if (argp)
*/
if (space && !metachar) {
*/
if (space && !metachar) {
p = mh_xstrdup(command);
split = brkstring(p, " \t", NULL);
if (split[0] == NULL) {
p = mh_xstrdup(command);
split = brkstring(p, " \t", NULL);
if (split[0] == NULL) {
argvarray[4] = NULL;
if (argp)
argvarray[4] = NULL;
if (argp)
free(command);
if (argvarray != NULL) {
free(command);
if (argvarray != NULL) {
- for (i = 0; argvarray[i] != NULL; i++)
+ for (i = 0; argvarray[i] != NULL; i++)
free(argvarray[i]);
free(argvarray);
}
free(argvarray[i]);
free(argvarray);
}
*/
for (i = 0; i < argp; i++) {
*/
for (i = 0; i < argp; i++) {
- app_msgarg(msgs, vec[i]);
+ app_msgarg(msgs, vec[i]);
}
for (i = msgs->size - 1; i >= 0; i--)
}
for (i = msgs->size - 1; i >= 0; i--)
- msgs->msgs[i + argp] = msgs->msgs[i];
+ msgs->msgs[i + argp] = msgs->msgs[i];
*/
for (i = 0; i < argp; i++)
*/
for (i = 0; i < argp; i++)
- msgs->msgs[i] = vec[i];
+ msgs->msgs[i] = vec[i];
* everything down and push the last character back.
*/
if (i == cc - 1) {
* 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 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 {
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];
ungetc(inbuf[cc - 1], in);
if (cc == 3 && i == 0)
inbuf[2] = inbuf[1];
flags = fcntl(sd, F_GETFD, 0);
if (flags != -1)
flags = fcntl(sd, F_GETFD, 0);
if (flags != -1)
- fcntl(sd, F_SETFD, flags | FD_CLOEXEC);
+ fcntl(sd, F_SETFD, flags | FD_CLOEXEC);
char *nd; /* nmh directory pointer */
struct stat st; /* stat() results */
struct passwd *pw; /* getpwuid() results */
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;
/*
int failed_to_lock = 0;
/*
SKIPA(); }
#define SETMON() { cp++; \
tw.tw_mon = month_map[(((unsigned char) cp[0]) + ((unsigned char) cp[1])) & 0x1f]; \
SKIPA(); }
#define SETMON() { cp++; \
tw.tw_mon = month_map[(((unsigned char) cp[0]) + ((unsigned char) cp[1])) & 0x1f]; \
#define SETMON_NUM() { tw.tw_mon = atoi(cp)-1; \
#define SETMON_NUM() { tw.tw_mon = atoi(cp)-1; \
#define SETYEAR() { tw.tw_year = atoi(cp); \
#define SETYEAR() { tw.tw_year = atoi(cp); \
#define SETDAY() { tw.tw_mday = atoi(cp); \
tw.tw_flags |= TW_SUCC; \
#define SETDAY() { tw.tw_mday = atoi(cp); \
tw.tw_flags |= TW_SUCC; \
#define SETTIME() { tw.tw_hour = atoi(cp); \
cp += 2; \
SKIPTOD(); \
#define SETTIME() { tw.tw_hour = atoi(cp); \
cp += 2; \
SKIPTOD(); \
if (isascii((unsigned char) *p)) {
asciicount++;
if (qpspecial((unsigned char) *p))
if (isascii((unsigned char) *p)) {
asciicount++;
if (qpspecial((unsigned char) *p))
} else
eightbitcount++;
}
if (eightbitcount == 0)
} else
eightbitcount++;
}
if (eightbitcount == 0)
/*
* Some rules from RFC 2047:
/*
* Some rules from RFC 2047:
- charset = write_charset_8bit();
+ charset = write_charset_8bit();
if (strcasecmp(charset, "US-ASCII") == 0) {
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");
*/
for (i = 0; address_headers[i]; i++) {
*/
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);
}
return field_encode_address(name, value, encoding, charset);
}
switch (encoding) {
case CE_BASE64:
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:
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");
bool newline = true;
while (*p != '\0') {
bool newline = true;
while (*p != '\0') {
* Start a new line, if it's time
*/
* Start a new line, if it's time
*/
/*
* If it's the start of the header, we don't need to pad it
*
/*
* If it's the start of the header, we don't need to pad it
*
for (i = 0; i < prefixlen; i++)
*q++ = ' ';
} else {
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.
*/
* 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++;
q = output;
while (is_fws(*p))
*q++ = *p++;
ascii--;
} else if (isascii((unsigned char) *p) &&
(phraserules ? qphrasevalid((unsigned char) *p) :
ascii--;
} else if (isascii((unsigned char) *p) &&
(phraserules ? qphrasevalid((unsigned char) *p) :
- !qpspecial((unsigned char) *p))) {
+ !qpspecial((unsigned char) *p))) {
*q++ = *p;
ascii--;
} else {
*q++ = *p;
ascii--;
} else {
*/
while (*p == ' ' || *p == '\t')
*/
while (*p == ' ' || *p == '\t')
/*
* If we had a zero-length prefix, then just encode the whole field
/*
* If we had a zero-length prefix, then just encode the whole field
*/
while (prefixlen && ((base64len(strlen(p)) + 7 + charsetlen +
*/
while (prefixlen && ((base64len(strlen(p)) + 7 + charsetlen +
- prefixlen) > ENCODELINELIMIT)) {
+ prefixlen) > ENCODELINELIMIT)) {
/*
* Our very first time, don't pad the line in the front
/*
* Our very first time, don't pad the line in the front
if (numencode <= 0) {
inform("Internal error: tried to encode %d characters "
if (numencode <= 0) {
inform("Internal error: tried to encode %d characters "
- "in base64", numencode);
+ "in base64", numencode);
*/
while (numencode > 0 && ((*(p + numencode) & 0xc0) == 0x80))
*/
while (numencode > 0 && ((*(p + numencode) & 0xc0) == 0x80))
- 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;
}
"UTF-8 character when base64 encoding header");
return 1;
}
q = output + curlen;
q += snprintf(q, outlen - (q - output), "%s=?%s?B?",
q = output + curlen;
q += snprintf(q, outlen - (q - output), "%s=?%s?B?",
- prefixlen ? " " : "", charset);
+ prefixlen ? " " : "", charset);
if (writeBase64raw((unsigned char *) p, strlen(p),
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;
}
inform("Internal error: base64 encoding of header failed");
return 1;
}
strcat(q, "?=");
if (prefixlen)
strcat(q, "?=");
if (prefixlen)
int len = 1;
if (*p == '\0')
int len = 1;
if (*p == '\0')
if (isascii((unsigned char) *p) || (((unsigned char) *p) & 0xc0) == 0x80)
if (isascii((unsigned char) *p) || (((unsigned char) *p) & 0xc0) == 0x80)
p++;
while ((((unsigned char) *p++) & 0xc0) == 0x80)
p++;
while ((((unsigned char) *p++) & 0xc0) == 0x80)
char *p = str, *q = *value;
while (*q != '\0') {
char *p = str, *q = *value;
while (*q != '\0') {
/*
* When we get a newline, skip to the next non-whitespace
* character and add a space to replace all of the whitespace
/*
* When we get a newline, skip to the next non-whitespace
* character and add a space to replace all of the whitespace
* for the header; we put it back in the encoding routine.
*/
while (is_fws(*q))
* for the header; we put it back in the encoding routine.
*/
while (is_fws(*q))
output = add(" ", output);
for (groupflag = 0; (mp = getname(*value)); ) {
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;
inform("%s: %s", errbuf, mp);
errflag = true;
continue;
*/
if (encoding == CE_UNKNOWN)
*/
if (encoding == CE_UNKNOWN)
- encoding = pref_encoding(asciichars, specialchars,
+ encoding = pref_encoding(asciichars, specialchars,
switch (encoding) {
case CE_BASE64:
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:
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;
eightbitchars + specialchars, 1)) {
errflag = true;
goto out;
if (mn->m_note[0] != '(' || mn->m_note[len - 1] != ')') {
inform("Internal error: Invalid note field \"%s\"",
if (mn->m_note[0] != '(' || mn->m_note[len - 1] != ')') {
inform("Internal error: Invalid note field \"%s\"",
errflag = true;
goto out;
}
errflag = true;
goto out;
}
*/
if (encoding == CE_UNKNOWN)
*/
if (encoding == CE_UNKNOWN)
- encoding = pref_encoding(asciichars, specialchars,
+ encoding = pref_encoding(asciichars, specialchars,
eightbitchars);
switch (encoding) {
case CE_BASE64:
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:
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;
eightbitchars + specialchars, 1)) {
errflag = true;
goto out;
if (column != prefixlen) {
if (len + column + 2 > OUTPUTLINELEN) {
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 {
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);
*specialchars = 0;
for (; *string != '\0'; string++) {
*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
(*asciilen)++;
/*
* So, a space is not a valid phrase character, but we're counting
* encoded as an underscore.
*/
if (!qphrasevalid((unsigned char) *string) && *string != ' ')
* encoded as an underscore.
*/
if (!qphrasevalid((unsigned char) *string) && *string != ' ')
} else {
(*eightbitchars)++;
}
} else {
(*eightbitchars)++;
}
*/
return base64len(ascii + eightbits) < (ascii - specials +
*/
return base64len(ascii + eightbits) < (ascii - specials +
- (specials + eightbits) * 3) ? CE_BASE64 : CE_QUOTED;
+ (specials + eightbits) * 3) ? CE_BASE64 : CE_QUOTED;
int status; /* exit or other child process status */
char **vec; /* argument vector for child process */
int vecp; /* Vector index */
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 */
static bool did_message; /* set if we've already output a message */
extern struct mailname fmt_mnull;
/* ftable->type (argument type) */
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 */
#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 */
struct ftable {
char *name; /* function name */
char type; /* argument type */
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;
};
char extra; /* arg. type dependent extra info */
char flags;
};
{ "getmymbox", TF_COMP, FT_STR, FT_GETMYMBOX, 0 },
{ "getmyaddr", TF_COMP, FT_LS_ADDR, FT_GETMYADDR, TFL_PUTS },
{ "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 },
{ "bold", TF_BOLD, FT_LS_LIT, 0, TFL_PUTS },
{ "underline", TF_UNDERLN,FT_LS_LIT, 0, TFL_PUTS },
usr_fstring = fstring;
if (reset_comptable || !comptable_initialized) {
usr_fstring = fstring;
if (reset_comptable || !comptable_initialized) {
comptable_initialized = true;
}
comptable_initialized = true;
}
- LS(t->f_type, getfullname());
+ LS(t->f_type, getfullname());
- LS(t->f_type, LocalName(0));
+ LS(t->f_type, LocalName(0));
- LS(t->f_type, getlocalmbox());
+ LS(t->f_type, getlocalmbox());
- LS(t->f_type, get_term_stringcap("bold"));
+ LS(t->f_type, get_term_stringcap("bold"));
- LS(t->f_type, get_term_stringcap("smul"));
+ LS(t->f_type, get_term_stringcap("smul"));
- LS(t->f_type, get_term_stringcap("smso"));
+ LS(t->f_type, get_term_stringcap("smso"));
- LS(t->f_type, get_term_stringcap("sgr0"));
+ LS(t->f_type, get_term_stringcap("sgr0"));
- 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;
break;
case TF_FGCOLR:
case TF_BGCOLR: {
struct colormap *cmap = colortable;
sp = cp - 1;
while (c && c != ')')
sp = cp - 1;
while (c && c != ')')
while (cmap->colorname != NULL) {
if (strcasecmp(sp, cmap->colorname) == 0)
while (cmap->colorname != NULL) {
if (strcasecmp(sp, cmap->colorname) == 0)
if (! code)
code = get_term_stringparm(t->type == TF_FGCOLR ? "setf" : "setb",
if (! code)
code = get_term_stringparm(t->type == TF_FGCOLR ? "setf" : "setb",
LS(t->f_type, code);
break;
LS(t->f_type, code);
break;
struct format *fp = fmt;
if (fp) {
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)
if (fp->f_flags & FF_STRALLOC)
if (fp->f_flags & FF_COMPREF)
if (fp->f_flags & FF_COMPREF)
- free_component(fp->f_comp);
+ free_component(fp->f_comp);
fp++;
}
free(fmt);
}
if (reset_comptable)
fp++;
}
free(fmt);
}
if (reset_comptable)
FINDCOMP(cm, component);
if (cm)
FINDCOMP(cm, component);
if (cm)
struct comp *cptr;
if (bucket != -1) {
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)
if (strcasecmp(component, FENDNULL(cptr->c_name)) == 0)
- cptr->c_text = add(text, cptr->c_text);
+ cptr->c_text = add(text, cptr->c_text);
struct comp *cm, *cm2;
for (i = 0; i < DIM(wantcomp); i++) {
struct comp *cm, *cm2;
for (i = 0; i < DIM(wantcomp); i++) {
while (cm != NULL) {
cm2 = cm->c_next;
free_component(cm);
while (cm != NULL) {
cm2 = cm->c_next;
free_component(cm);
free_component(struct comp *cm)
{
if (--cm->c_refcount <= 0) {
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->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);
*/
for (endofcharset = startofmime;
*/
for (endofcharset = startofmime;
- *endofcharset != '*' && endofcharset < pp;
+ *endofcharset != '*' && endofcharset < pp;
char_len = mbtowc(&wide_char, altstr, 1);
}
if (char_len <= 0) {
char_len = mbtowc(&wide_char, altstr, 1);
}
if (char_len <= 0) {
}
w = wcwidth(wide_char);
}
w = wcwidth(wide_char);
buffer[sizeof(buffer)-1] = '\0';
str = buffer;
if (*str == '(')
buffer[sizeof(buffer)-1] = '\0';
str = buffer;
if (*str == '(')
sp = str + strlen(str) - 1;
if (*sp == ')') {
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,
}
str = memmove(buffer, str, strlen(str) + 1);
} else if (!(str = get_x400_friendly (mn->m_mbox,
/* UNQUOTEs RFC-2822 quoted-string and quoted-pair */
case FT_LS_UNQUOTE:
/* UNQUOTEs RFC-2822 quoted-string and quoted-pair */
case FT_LS_UNQUOTE:
if (str != buffer)
strncpy(buffer, str, sizeof(buffer));
/* strncpy doesn't NUL-terminate if it fills the buffer */
if (str != buffer)
strncpy(buffer, str, sizeof(buffer));
/* strncpy doesn't NUL-terminate if it fills the buffer */
indent = strlen (sp);
wid -= indent;
if (wid <= 0) {
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) {
"than label width (%d)", value, indent);
}
while ((c = *sp++) && charstring_chars (scanlp) < max) {
/* Close/free the sequence file if it is open */
if (mp->seqhandle)
/* Close/free the sequence file if it is open */
if (mp->seqhandle)
- lkfclosedata (mp->seqhandle, mp->seqname);
+ lkfclosedata (mp->seqhandle, mp->seqname);
char *str;
if (default_editor)
char *str;
if (default_editor)
if (!(str = context_find("editor")) && !(str = getenv("VISUAL")) &&
if (!(str = context_find("editor")) && !(str = getenv("VISUAL")) &&
- !(str = getenv("EDITOR"))) {
+ !(str = getenv("EDITOR"))) {
int fd;
if (oflags == -1) {
int fd;
if (oflags == -1) {
int fd;
if (oflags == -1) {
int fd;
if (oflags == -1) {
int rc = close(fd);
if (datalocktype == DOT_LOCKING)
int rc = close(fd);
if (datalocktype == DOT_LOCKING)
int fd, rc;
if (f == NULL)
int fd, rc;
if (f == NULL)
fd = fileno(f);
rc = fclose(f);
if (datalocktype == DOT_LOCKING)
fd = fileno(f);
rc = fclose(f);
if (datalocktype == DOT_LOCKING)
int rc = close(fd);
if (spoollocktype == DOT_LOCKING)
int rc = close(fd);
if (spoollocktype == DOT_LOCKING)
int fd, rc;
if (f == NULL)
int fd, rc;
if (f == NULL)
fd = fileno(f);
rc = fclose(f);
if (spoollocktype == DOT_LOCKING)
fd = fileno(f);
rc = fclose(f);
if (spoollocktype == DOT_LOCKING)
switch (ltype) {
case FCNTL_LOCKING:
switch (ltype) {
case FCNTL_LOCKING:
- return lkopen_fcntl(file, access, mode, failed_to_lock);
+ return lkopen_fcntl(file, access, mode, failed_to_lock);
- return lkopen_dot(file, access, mode, failed_to_lock);
+ return lkopen_dot(file, access, mode, failed_to_lock);
#ifdef HAVE_FLOCK
case FLOCK_LOCKING:
#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:
#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:
#endif /* HAVE_FLOCK */
default:
- die("Internal locking error: unsupported lock type used!");
+ die("Internal locking error: unsupported lock type used!");
*/
for (i = 0; i < LOCK_RETRIES; i++) {
*/
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;
return -1;
flk.l_start = 0;
*/
locktype = (((access & O_ACCMODE) == O_RDONLY) ? LOCK_SH : LOCK_EX) |
*/
locktype = (((access & O_ACCMODE) == O_RDONLY) ? LOCK_SH : LOCK_EX) |
for (i = 0; i < LOCK_RETRIES; i++) {
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)
return -1;
if (flock(fd, locktype) != -1)
access &= ~O_APPEND;
if ((access & O_ACCMODE) == O_RDONLY) {
access &= ~O_APPEND;
if ((access & O_ACCMODE) == O_RDONLY) {
access |= O_RDWR;
}
for (i = 0; i < LOCK_RETRIES; i++) {
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) {
return -1;
if (lockf(fd, F_TLOCK, 0) != -1) {
* Seek to end if requested
*/
if (saved_access & O_APPEND) {
* Seek to end if requested
*/
if (saved_access & O_APPEND) {
- lseek(fd, 0, SEEK_END);
+ lseek(fd, 0, SEEK_END);
init_locktype(const char *lockname)
{
if (strcasecmp(lockname, "fcntl") == 0) {
init_locktype(const char *lockname)
{
if (strcasecmp(lockname, "fcntl") == 0) {
}
if (strcasecmp(lockname, "lockf") == 0) {
#ifdef HAVE_LOCKF
}
if (strcasecmp(lockname, "lockf") == 0) {
#ifdef HAVE_LOCKF
#endif /* HAVE_FLOCK */
}
if (strcasecmp(lockname, "dot") == 0) {
#endif /* HAVE_FLOCK */
}
if (strcasecmp(lockname, "dot") == 0) {
}
die("Unknown lock type: \"%s\"", lockname);
/* NOTREACHED */
}
die("Unknown lock type: \"%s\"", lockname);
/* NOTREACHED */
case LX_END:
return DONE;
case LX_END:
return DONE;
- case LX_LBRK: /* sigh (2) */
+ case LX_LBRK: /* sigh (2) */
goto get_addr;
case LX_AT: /* sigh (3) */
goto get_addr;
case LX_AT: /* sigh (3) */
- case LX_DOT: /* sigh (1) */
+ case LX_DOT: /* sigh (1) */
pers = add (".", pers);
goto more_phrase;
pers = add (".", pers);
goto more_phrase;
- case LX_SEMI: /* no host */
+ case LX_SEMI: /* no host */
case LX_COMA:
case LX_END:
ingrp = glevel;
case LX_COMA:
case LX_END:
ingrp = glevel;
return domain (buffer);
case LX_SEMI: /* if in group */
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;
case LX_COMA:
case LX_END:
return OK;
host = add (buffer, host);
continue;
host = add (buffer, host);
continue;
- case LX_AT: /* sigh (0) */
+ case LX_AT: /* sigh (0) */
mbox = add (host, add ("%", mbox));
free (host);
host = NULL;
mbox = add (host, add ("%", mbox));
free (host);
host = NULL;
struct addrinfo hints, *res;
if (flag < 0 || flag > 1)
struct addrinfo hints, *res;
if (flag < 0 || flag > 1)
getlocalmbox (void)
{
if (username[0] == '\0')
getlocalmbox (void)
{
if (username[0] == '\0')
if ((cp = getenv ("SIGNATURE")) && *cp)
strncpy (fullname, cp, sizeof(fullname));
else if ((cp = context_find("Signature")))
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';
fullname[sizeof(fullname) - 1] = '\0';
* At that point, just give up.
*/
netsec_err(errstr, "Internal error: wanted to printf() a total of "
* 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;
}
rc, nsc->ns_outbufsize);
return NOTOK;
}
if (nsc->ns_snoop_savebuf) {
cb_len += strlen(nsc->ns_snoop_savebuf);
nsc->ns_snoop_savebuf = mh_xrealloc(nsc->ns_snoop_savebuf,
if (nsc->ns_snoop_savebuf) {
cb_len += strlen(nsc->ns_snoop_savebuf);
nsc->ns_snoop_savebuf = mh_xrealloc(nsc->ns_snoop_savebuf,
ptr = nsc->ns_snoop_savebuf;
} else {
ptr = snoopoutbuf;
ptr = nsc->ns_snoop_savebuf;
} else {
ptr = snoopoutbuf;
&xoauth_client_res, &xoauth_client_res_len,
nsc->ns_snoop ? stderr : NULL) != OK) {
netsec_err(errstr, "Internal error: Unable to get OAuth2 "
&xoauth_client_res, &xoauth_client_res_len,
nsc->ns_snoop ? stderr : NULL) != OK) {
netsec_err(errstr, "Internal error: Unable to get OAuth2 "
*/
rc = sasl_client_start(nsc->sasl_conn,
*/
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);
(const char **) &saslbuf, &saslbuflen,
&chosen_mech);
*/
while (rc == SASL_CONTINUE) {
*/
while (rc == SASL_CONTINUE) {
* Call our SASL callback, which will handle the details of
* reading data from the network.
*/
* Call our SASL callback, which will handle the details of
* reading data from the network.
*/
if (! ssl_bio) {
netsec_err(errstr, "Unable to create a SSL BIO: %s",
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;
}
SSL_free(ssl);
return NOTOK;
}
int rc = 127;
if (! errstr)
int rc = 127;
if (! errstr)
do {
errbufsize = rc + 1;
do {
errbufsize = rc + 1;
#define update(name) \
update_svc_field(&svc->name, #name, svc_name); \
if (svc->name == NULL) { \
#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; \
}
errbuf[errbuflen - 1] = '\0'; \
return false; \
}
cp = ansbuf;
while ((i = getchar ()) != '\n') {
if (i == EOF) {
cp = ansbuf;
while ((i = getchar ()) != '\n') {
if (i == EOF) {
* If we get an EOF, return
*/
if (feof(stdin))
* If we get an EOF, return
*/
if (feof(stdin))
if (ferror(stdin)) {
if (errno == EINTR) {
if (ferror(stdin)) {
if (errno == EINTR) {
continue;
}
fprintf(stderr, "\nError %s during read\n",
continue;
}
fprintf(stderr, "\nError %s during read\n",
siglongjmp (sigenv, 1);
}
siglongjmp (sigenv, 1);
}
rl_cmds = ansp;
for (;;) {
rl_cmds = ansp;
for (;;) {
- ans = readline(prompt);
+ ans = readline(prompt);
/*
* If we get an EOF, return
*/
/*
* If we get an EOF, return
*/
cpp = brkstring(ansbuf, " ", NULL);
switch (smatch(*cpp, ansp)) {
case AMBIGSW:
cpp = brkstring(ansbuf, " ", NULL);
switch (smatch(*cpp, ansp)) {
case AMBIGSW:
- printf(" -%s unknown. Hit <CR> for help.\n", *cpp);
+ printf(" -%s unknown. Hit <CR> for help.\n", *cpp);
continue;
default:
return cpp;
continue;
default:
return cpp;
NMH_UNUSED (end);
if (start == 0)
NMH_UNUSED (end);
if (start == 0)
- return rl_completion_matches(text, nmh_command_generator);
+ return rl_completion_matches(text, nmh_command_generator);
char buf[256];
if (!state) {
char buf[256];
if (!state) {
len = strlen(text);
}
while ((name = rl_cmds[list_index].sw)) {
len = strlen(text);
}
while ((name = rl_cmds[list_index].sw)) {
strncpy(buf, name, sizeof(buf));
buf[sizeof(buf) - 1] = '\0';
p = *brkstring(buf, " ", NULL);
strncpy(buf, name, sizeof(buf));
buf[sizeof(buf) - 1] = '\0';
p = *brkstring(buf, " ", NULL);
- lkfclosedata (fp, seqfile);
+ lkfclosedata (fp, seqfile);
die("no blank lines are permitted in %s", seqfile);
break;
die("no blank lines are permitted in %s", seqfile);
break;
- lkfclosedata (fp, seqfile);
+ lkfclosedata (fp, seqfile);
die("%s is poorly formatted", seqfile);
}
break; /* break from for loop */
die("%s is poorly formatted", seqfile);
}
break; /* break from for loop */
/* check if sequence information has changed */
if (!(mp->msgflags & SEQMOD)) {
/* check if sequence information has changed */
if (!(mp->msgflags & SEQMOD)) {
lkfclosedata (mp->seqhandle, mp->seqname);
mp->seqhandle = NULL;
free(mp->seqname);
lkfclosedata (mp->seqhandle, mp->seqname);
mp->seqhandle = NULL;
free(mp->seqname);
int errret, rc;
if (termstatus)
int errret, rc;
if (termstatus)
rc = setupterm(NULL, fileno(stdout), &errret);
if (rc != 0 || errret != 1) {
rc = setupterm(NULL, fileno(stdout), &errret);
if (rc != 0 || errret != 1) {
return;
}
termstatus = 1;
return;
}
termstatus = 1;
initialize_terminfo();
if (termstatus == -1)
initialize_terminfo();
if (termstatus == -1)
termcbufp = termcbuf;
parm = tigetstr(capability);
if (parm == (char *) -1 || parm == NULL) {
termcbufp = termcbuf;
parm = tigetstr(capability);
if (parm == (char *) -1 || parm == NULL) {
}
tputs(parm, 1, termbytes);
}
tputs(parm, 1, termbytes);
initialize_terminfo();
if (termstatus == -1)
initialize_terminfo();
if (termstatus == -1)
termcbufp = termcbuf;
parm = tigetstr(capability);
if (parm == (char *) -1 || parm == NULL) {
termcbufp = termcbuf;
parm = tigetstr(capability);
if (parm == (char *) -1 || parm == NULL) {
}
parm = tparm(parm, arg1, arg2, 0, 0, 0, 0, 0, 0, 0);
}
parm = tparm(parm, arg1, arg2, 0, 0, 0, 0, 0, 0, 0);
initialize_terminfo();
if (termstatus == -1)
initialize_terminfo();
if (termstatus == -1)
return tigetnum(capability);
}
return tigetnum(capability);
}
if ((offset = termcbufp - termcbuf) - 1 >= termcbufsz) {
termcbufsz += 64;
if ((offset = termcbufp - termcbuf) - 1 >= termcbufsz) {
termcbufsz += 64;
- termcbuf = mh_xrealloc(termcbuf, termcbufsz);
+ termcbuf = mh_xrealloc(termcbuf, termcbufsz);
termcbufp = termcbuf + offset;
}
termcbufp = termcbuf + offset;
}
addlist (char *list, const char *item)
{
if (list)
addlist (char *list, const char *item)
{
if (list)
- list = add (", ", list);
+ list = add (", ", list);
return add (item, list);
}
return add (item, list);
}
starttime = time(NULL);
for (;;) {
starttime = time(NULL);
for (;;) {
struct timeval tv;
FD_ZERO(&readfds);
struct timeval tv;
FD_ZERO(&readfds);
if (stat(file, &s) == -1) {
inform("can't get access and modification times for %s", file);
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;
case FROMSW:
if (!(cp = *argp++) || *cp == '-')
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 == '-')
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 == '-')
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 == '-')
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 == '-')
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)
if ((outputlinelen = atoi(cp)) < 10)
- die("impossible width %d", outputlinelen);
+ die("impossible width %d", outputlinelen);
in = build_form(form, NULL, dat, from, to, cc, fcc, NULL, msgnam);
in = build_form(form, NULL, dat, from, to, cc, fcc, NULL, msgnam);
*/
if ((tmp = fopen(inputfile, "r")) == NULL)
*/
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);
/* Get new format string */
nfs = new_fs (form, NULL, NULL);
switch (state) {
case FLD:
case FLDPLUS:
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.
* 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.
case FMTERR:
case BODY:
case FILEEOF:
case FMTERR:
case BODY:
case FILEEOF:
- die("m_getfld2() returned %d", state);
+ die("m_getfld2() returned %d", state);
cptr = fmt_findcomp ("digest");
if (cptr) {
cptr = fmt_findcomp ("digest");
if (cptr) {
cptr->c_text = getcpy(digest);
}
cptr = fmt_findcomp ("nmh-date");
if (cptr) {
cptr->c_text = getcpy(digest);
}
cptr = fmt_findcomp ("nmh-date");
if (cptr) {
cptr->c_text = getcpy(dtimenow (0));
}
cptr = fmt_findcomp ("nmh-from");
if (cptr) {
cptr->c_text = getcpy(dtimenow (0));
}
cptr = fmt_findcomp ("nmh-from");
if (cptr) {
cptr->c_text = getcpy(from);
}
cptr = fmt_findcomp ("nmh-to");
if (cptr) {
cptr->c_text = getcpy(from);
}
cptr = fmt_findcomp ("nmh-to");
if (cptr) {
cptr->c_text = getcpy(to);
}
cptr = fmt_findcomp ("nmh-cc");
if (cptr) {
cptr->c_text = getcpy(to);
}
cptr = fmt_findcomp ("nmh-cc");
if (cptr) {
cptr->c_text = getcpy(cc);
}
cptr = fmt_findcomp ("nmh-subject");
if (cptr) {
cptr->c_text = getcpy(cc);
}
cptr = fmt_findcomp ("nmh-subject");
if (cptr) {
cptr->c_text = getcpy(subject);
}
cptr = fmt_findcomp ("fcc");
if (cptr) {
cptr->c_text = getcpy(subject);
}
cptr = fmt_findcomp ("fcc");
if (cptr) {
cptr->c_text = getcpy(fcc);
}
cptr->c_text = getcpy(fcc);
}
- printf (LSTFMT2a, atoi (r1bindex (FENDNULL(ct->c_file), '/')));
+ printf (LSTFMT2a, atoi (r1bindex (FENDNULL(ct->c_file), '/')));
- printf(toplevel < 0 ? "part " : " ");
+ printf(toplevel < 0 ? "part " : " ");
snprintf (buffer, sizeof(buffer), "%s/%s", FENDNULL(ci->ci_type),
FENDNULL(ci->ci_subtype));
snprintf (buffer, sizeof(buffer), "%s/%s", FENDNULL(ci->ci_type),
FENDNULL(ci->ci_subtype));
for (pm = ci->ci_first_pm; pm; pm = pm->pm_next) {
printf ("\t %s=\"%s\"\n", pm->pm_name,
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, '?'));
case CHECKSW:
case NCHECKSW:
case CHECKSW:
case NCHECKSW:
fprintf (stderr, "%s: %s\n", TYPE_FIELD, cp);
if (*cp == '(' && get_comment (ct->c_file, TYPE_FIELD, &cp,
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++)
return NOTOK;
for (dp = cp; istoken (*dp); dp++)
cp++;
if (*cp == '(' && get_comment (ct->c_file, TYPE_FIELD, &cp,
cp++;
if (*cp == '(' && get_comment (ct->c_file, TYPE_FIELD, &cp,
- &ci->ci_comment) == NOTOK)
+ &ci->ci_comment) == NOTOK)
return NOTOK;
if (*cp != '/') {
return NOTOK;
if (*cp != '/') {
cp++;
if (*cp == '(' && get_comment (ct->c_file, TYPE_FIELD, &cp,
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++)
return NOTOK;
for (dp = cp; istoken (*dp); dp++)
cp++;
if (*cp == '(' && get_comment (ct->c_file, TYPE_FIELD, &cp,
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,
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;
}
&ci->ci_comment)) != OK) {
return status == NOTOK ? NOTOK : OK;
}
*/
if (magic && *cp == '*') {
*/
if (magic && *cp == '*') {
* See if it's a CTE we match on
*/
struct k2v *kv;
* See if it's a CTE we match on
*/
struct k2v *kv;
fprintf (stderr, "%s: %s\n", DISPO_FIELD, cp);
if (*cp == '(' && get_comment (ct->c_file, DISPO_FIELD, &cp, NULL) ==
fprintf (stderr, "%s: %s\n", DISPO_FIELD, cp);
if (*cp == '(' && get_comment (ct->c_file, DISPO_FIELD, &cp, NULL) ==
free(dispoheader);
return NOTOK;
}
free(dispoheader);
return NOTOK;
}
return NOTOK;
if ((status = parse_header_attrs (ct->c_file, DISPO_FIELD, &cp,
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);
NULL)) != OK) {
if (status == NOTOK) {
free(dispoheader);
else
ct->c_dispo = dispoheader;
else
ct->c_dispo = dispoheader;
e->eb_url = u = mh_xmalloc(strlen(pm->pm_value) + 1);
for (; *p != '\0'; p++) {
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))
vec[vecp++] = e->eb_name;
vec[vecp++] = ce->ce_file,
vec[vecp++] = e->eb_mode && !strcasecmp (e->eb_mode, "ascii")
vec[vecp++] = e->eb_name;
vec[vecp++] = ce->ce_file,
vec[vecp++] = e->eb_mode && !strcasecmp (e->eb_mode, "ascii")
vec[vecp] = NULL;
fflush (stdout);
vec[vecp] = NULL;
fflush (stdout);
pid_t child_id;
if ((urlprog = context_find(nmhaccessurl)) && *urlprog == '\0')
pid_t child_id;
if ((urlprog = context_find(nmhaccessurl)) && *urlprog == '\0')
- 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)) {
}
switch (openExternal(e->eb_parent, ce, file, &fd)) {
- content_error(NULL, ct, "missing url parameter");
+ content_error(NULL, ct, "missing url parameter");
}
if ((ce->ce_fp = fopen(ce->ce_file, "w+")) == NULL) {
}
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:
return NOTOK;
}
switch (child_id = fork()) {
case NOTOK:
- adios ("fork", "unable to");
+ adios ("fork", "unable to");
/* NOTREACHED */
case OK:
/* 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);
app_msgarg(&args, e->eb_url);
app_msgarg(&args, NULL);
dup2(fileno(ce->ce_fp), 1);
/* NOTREACHED */
default:
/* NOTREACHED */
default:
- if (pidXwait(child_id, NULL)) {
+ if (pidXwait(child_id, NULL)) {
ce->ce_unlink = 1;
return NOTOK;
}
ce->ce_unlink = 1;
return NOTOK;
}
continue;
}
if (*vp == '*' && vp == up - 1) {
continue;
}
if (*vp == '*' && vp == up - 1) {
} else if (partial) {
if (isdigit((unsigned char) *vp))
index = *vp - '0' + index * 10;
} else if (partial) {
if (isdigit((unsigned char) *vp))
index = *vp - '0' + index * 10;
* parameter).
*/
if (index == 0) {
* parameter).
*/
if (index == 0) {
while (*vp != '\'' && !isspace((unsigned char) *vp) &&
*vp != '\0')
vp++;
while (*vp != '\'' && !isspace((unsigned char) *vp) &&
*vp != '\0')
vp++;
valptr = mh_xmalloc(len + 1);
if (*dp == '"') {
valptr = mh_xmalloc(len + 1);
if (*dp == '"') {
for (cp = dp + 1, vp = valptr, i = 0; i < len; i++) {
if (*cp == '\\') {
cp++;
for (cp = dp + 1, vp = valptr, i = 0; i < len; i++) {
if (*cp == '\\') {
cp++;
- strncpy(valptr, cp = dp, len);
+ strncpy(valptr, cp = dp, len);
if (index == 0 && encoded) {
free(pp->charset);
if (index == 0 && encoded) {
free(pp->charset);
free(pp->lang);
pp->lang = lang;
}
free(pp->lang);
pp->lang = lang;
}
*/
for (pp = phead; pp != NULL; ) {
*/
for (pp = phead; pp != NULL; ) {
size_t tlen = 0;
int pindex = 0;
for (sp = pp->sechead; sp != NULL; sp = sp->next) {
size_t tlen = 0;
int pindex = 0;
for (sp = pp->sechead; sp != NULL; sp = sp->next) {
if (index > 0) {
q += snprintf(q, sizeof(line) - (q - line), "%s*%d",
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);
} else {
strncpy(q, params->pm_name, sizeof(line) - (q - line));
q += strlen(q);
if (encode)
i = encode_param(params, q, sizeof(line) - (q - line),
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),
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);
if (i == 0) {
free(paramout);
len += 3;
maxfit -= 3;
} else {
len += 3;
maxfit -= 3;
} else {
* Calculate the string length, but add room for quoting \
* and " if necessary. Also account for quotes at beginning
* and end.
* Calculate the string length, but add room for quoting \
* and " if necessary. Also account for quotes at beginning
* and end.
switch (*p) {
case '"':
case '\\':
switch (*p) {
case '"':
case '\\':
maxfit--;
/* FALLTHRU */
default:
maxfit--;
/* FALLTHRU */
default:
(*last)->pm_next = pm;
*last = pm;
} else {
(*last)->pm_next = pm;
*last = pm;
} else {
while (first != NULL) {
if (strcasecmp(name, first->pm_name) == 0) {
if (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;
return getcpy(get_param_value(first, replace));
}
first = first->pm_next;
*/
if (!pm->pm_charset || check_charset(pm->pm_charset,
*/
if (!pm->pm_charset || check_charset(pm->pm_charset,
- strlen(pm->pm_charset))) {
+ strlen(pm->pm_charset))) {
*/
default:
return show_content (ct, alternate, textonly,
*/
default:
return show_content (ct, alternate, textonly,
}
if (parse_display_string (ct, cp, &xstdin, &xlist, file, buffer,
}
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;
}
inform("Buffer overflow constructing show command, continuing...");
return NOTOK;
}
seqfile = concat(m_maildir(folder), "/", mh_seq, NULL);
if (seqfile == NULL)
seqfile = concat(m_maildir(folder), "/", mh_seq, NULL);
if (seqfile == NULL)
if ((fp = lkfopendata (seqfile, "r", & failed_to_lock)) == NULL) {
if (failed_to_lock)
if ((fp = lkfopendata (seqfile, "r", & failed_to_lock)) == NULL) {
if (failed_to_lock)
/*
* Under sendmail, users should add the line
*
/*
* Under sendmail, users should add the line
*
- * "| /usr/local/nmh/lib/slocal"
+ * "| /usr/local/nmh/lib/slocal"
*
* to their $HOME/.forward file.
*
*
* to their $HOME/.forward file.
*
* If previous condition failed, don't
* do this - else fall through
*/
* If previous condition failed, don't
* do this - else fall through
*/