if (a1->type != a2->type)
return 0;
- if (ascii_strcasecmp(a1->host, a2->host) != 0)
+ if (mutt_strcasecmp(a1->host, a2->host) != 0)
return 0;
if (a1->port != a2->port)
return 0;
else if (pb->personal)
r = -1;
else
- r = ascii_strcasecmp(pa->mailbox, pb->mailbox);
+ r = mutt_strcasecmp(pa->mailbox, pb->mailbox);
return (RSORT(r));
}
char buf[LONG_STRING];
snprintf(buf, sizeof(buf), "%s@%s", NONULL(u), NONULL(d));
- if (ascii_strcasecmp(str, buf) == 0)
+ if (mutt_strcasecmp(str, buf) == 0)
return true;
return false;
return false;
}
- if (ascii_strcasecmp(addr->mailbox, Username) == 0)
+ if (mutt_strcasecmp(addr->mailbox, Username) == 0)
{
mutt_debug(5, "mutt_addr_is_user: yes, %s = %s\n", addr->mailbox, Username);
return true;
return true;
}
- if (From && (ascii_strcasecmp(From->mailbox, addr->mailbox) == 0))
+ if (From && (mutt_strcasecmp(From->mailbox, addr->mailbox) == 0))
{
mutt_debug(5, "mutt_addr_is_user: yes, %s = %s\n", addr->mailbox, From->mailbox);
return true;
{
i = mutt_strlen(t->data) - 1;
if ((i > 0 && t->data[i - 1] == '/' && t->data[i] == '*' &&
- (ascii_strncasecmp(type, t->data, i) == 0)) ||
- (ascii_strcasecmp(type, t->data) == 0))
+ (mutt_strncasecmp(type, t->data, i) == 0)) ||
+ (mutt_strcasecmp(type, t->data) == 0))
{
struct Body tmp = { 0 };
int n;
return 1;
}
- if ((ascii_strcasecmp("text/plain", type) == 0) ||
- (ascii_strcasecmp("application/postscript", type) == 0))
+ if ((mutt_strcasecmp("text/plain", type) == 0) ||
+ (mutt_strcasecmp("application/postscript", type) == 0))
{
return (mutt_pipe_attachment(fp, a, NONULL(PrintCmd), NULL));
}
if ((ext = strchr(in, '/')))
*ext++ = 0;
- if ((ascii_strcasecmp(in, "utf-8") == 0) || (ascii_strcasecmp(in, "utf8") == 0))
+ if ((mutt_strcasecmp(in, "utf-8") == 0) || (mutt_strcasecmp(in, "utf8") == 0))
{
strfcpy(dest, "utf-8", dlen);
goto out;
}
/* catch some common iso-8859-something misspellings */
- if ((ascii_strncasecmp(in, "8859", 4) == 0) && in[4] != '-')
+ if ((mutt_strncasecmp(in, "8859", 4) == 0) && in[4] != '-')
snprintf(scratch, sizeof(scratch), "iso-8859-%s", in + 4);
- else if (ascii_strncasecmp(in, "8859-", 5) == 0)
+ else if (mutt_strncasecmp(in, "8859-", 5) == 0)
snprintf(scratch, sizeof(scratch), "iso-8859-%s", in + 5);
- else if ((ascii_strncasecmp(in, "iso8859", 7) == 0) && in[7] != '-')
+ else if ((mutt_strncasecmp(in, "iso8859", 7) == 0) && in[7] != '-')
snprintf(scratch, sizeof(scratch), "iso_8859-%s", in + 7);
- else if (ascii_strncasecmp(in, "iso8859-", 8) == 0)
+ else if (mutt_strncasecmp(in, "iso8859-", 8) == 0)
snprintf(scratch, sizeof(scratch), "iso_8859-%s", in + 8);
else
strfcpy(scratch, in, sizeof(scratch));
for (size_t i = 0; PreferredMIMENames[i].key; i++)
- if ((ascii_strcasecmp(scratch, PreferredMIMENames[i].key) == 0) ||
+ if ((mutt_strcasecmp(scratch, PreferredMIMENames[i].key) == 0) ||
(mutt_strcasecmp(scratch, PreferredMIMENames[i].key) == 0))
{
strfcpy(dest, PreferredMIMENames[i].pref, dlen);
mutt_canonical_charset(buffer, sizeof(buffer), s);
a = mutt_strlen(buffer);
b = mutt_strlen(chs);
- return (ascii_strncasecmp(a > b ? buffer : chs, a > b ? chs : buffer, MIN(a, b)) == 0);
+ return (mutt_strncasecmp(a > b ? buffer : chs, a > b ? chs : buffer, MIN(a, b)) == 0);
}
char *mutt_get_default_charset(void)
if (!strict)
for (i = 0; PreferredMIMENames[i].key; i++)
{
- if ((ascii_strcasecmp(PreferredMIMENames[i].key, s) == 0) ||
- (ascii_strcasecmp(PreferredMIMENames[i].pref, s) == 0))
+ if ((mutt_strcasecmp(PreferredMIMENames[i].key, s) == 0) ||
+ (mutt_strcasecmp(PreferredMIMENames[i].pref, s) == 0))
return true;
}
char *eptr = NULL;
int is_bright = 0;
- if (ascii_strncasecmp(s, "bright", 6) == 0)
+ if (mutt_strncasecmp(s, "bright", 6) == 0)
{
is_bright = 1;
s += 6;
}
/* allow aliases for xterm color resources */
- if (ascii_strncasecmp(s, "color", 5) == 0)
+ if (mutt_strncasecmp(s, "color", 5) == 0)
{
s += 5;
*col = strtol(s, &eptr, 10);
*o = MT_COLOR_QUOTED;
}
- else if (!ascii_strcasecmp(buf->data, "compose"))
+ else if (!mutt_strcasecmp(buf->data, "compose"))
{
if (!MoreArgs(s))
{
mutt_extract_token(buf, s, 0);
- if (ascii_strcasecmp("bold", buf->data) == 0)
+ if (mutt_strcasecmp("bold", buf->data) == 0)
*attr |= A_BOLD;
- else if (ascii_strcasecmp("underline", buf->data) == 0)
+ else if (mutt_strcasecmp("underline", buf->data) == 0)
*attr |= A_UNDERLINE;
- else if (ascii_strcasecmp("none", buf->data) == 0)
+ else if (mutt_strcasecmp("none", buf->data) == 0)
*attr = A_NORMAL;
- else if (ascii_strcasecmp("reverse", buf->data) == 0)
+ else if (mutt_strcasecmp("reverse", buf->data) == 0)
*attr |= A_REVERSE;
- else if (ascii_strcasecmp("standout", buf->data) == 0)
+ else if (mutt_strcasecmp("standout", buf->data) == 0)
*attr |= A_STANDOUT;
- else if (ascii_strcasecmp("normal", buf->data) == 0)
+ else if (mutt_strcasecmp("normal", buf->data) == 0)
*attr = A_NORMAL; /* needs use = instead of |= to clear other bits */
else
{
mutt_parse_content_type(buf, b);
snprintf(tmp, sizeof(tmp), "%s/%s", TYPE(b), NONULL(b->subtype));
- type_changed = ascii_strcasecmp(tmp, obuf);
+ type_changed = mutt_strcasecmp(tmp, obuf);
charset_changed =
- ascii_strcasecmp(charset, mutt_get_parameter("charset", b->parameter));
+ mutt_strcasecmp(charset, mutt_get_parameter("charset", b->parameter));
/* if in send mode, check for conversion - current setting is default. */
continue;
from = true;
}
- else if (flags & (CH_NOQFROM) && (ascii_strncasecmp(">From ", buf, 6) == 0))
+ else if (flags & (CH_NOQFROM) && (mutt_strncasecmp(">From ", buf, 6) == 0))
continue;
else if (buf[0] == '\n' || (buf[0] == '\r' && buf[1] == '\n'))
break; /* end of header */
if ((flags & (CH_UPDATE | CH_XMIT | CH_NOSTATUS)) &&
- ((ascii_strncasecmp("Status:", buf, 7) == 0) ||
- (ascii_strncasecmp("X-Status:", buf, 9) == 0)))
+ ((mutt_strncasecmp("Status:", buf, 7) == 0) ||
+ (mutt_strncasecmp("X-Status:", buf, 9) == 0)))
continue;
if ((flags & (CH_UPDATE_LEN | CH_XMIT | CH_NOLEN)) &&
- ((ascii_strncasecmp("Content-Length:", buf, 15) == 0) ||
- (ascii_strncasecmp("Lines:", buf, 6) == 0)))
+ ((mutt_strncasecmp("Content-Length:", buf, 15) == 0) ||
+ (mutt_strncasecmp("Lines:", buf, 6) == 0)))
continue;
- if ((flags & CH_UPDATE_REFS) && (ascii_strncasecmp("References:", buf, 11) == 0))
+ if ((flags & CH_UPDATE_REFS) && (mutt_strncasecmp("References:", buf, 11) == 0))
continue;
- if ((flags & CH_UPDATE_IRT) && (ascii_strncasecmp("In-Reply-To:", buf, 12) == 0))
+ if ((flags & CH_UPDATE_IRT) && (mutt_strncasecmp("In-Reply-To:", buf, 12) == 0))
continue;
- if (flags & CH_UPDATE_LABEL && (ascii_strncasecmp("X-Label:", buf, 8) == 0))
+ if (flags & CH_UPDATE_LABEL && (mutt_strncasecmp("X-Label:", buf, 8) == 0))
continue;
ignore = false;
if (!((flags & CH_FROM) && (flags & CH_FORCE_FROM) && this_is_from) &&
(flags & CH_WEED) && mutt_matches_ignore(buf))
continue;
- if ((flags & CH_WEED_DELIVERED) && (ascii_strncasecmp("Delivered-To:", buf, 13) == 0))
+ if ((flags & CH_WEED_DELIVERED) && (mutt_strncasecmp("Delivered-To:", buf, 13) == 0))
continue;
if ((flags & (CH_UPDATE | CH_XMIT | CH_NOSTATUS)) &&
- ((ascii_strncasecmp("Status:", buf, 7) == 0) ||
- (ascii_strncasecmp("X-Status:", buf, 9) == 0)))
+ ((mutt_strncasecmp("Status:", buf, 7) == 0) ||
+ (mutt_strncasecmp("X-Status:", buf, 9) == 0)))
continue;
if ((flags & (CH_UPDATE_LEN | CH_XMIT | CH_NOLEN)) &&
- ((ascii_strncasecmp("Content-Length:", buf, 15) == 0) ||
- (ascii_strncasecmp("Lines:", buf, 6) == 0)))
+ ((mutt_strncasecmp("Content-Length:", buf, 15) == 0) ||
+ (mutt_strncasecmp("Lines:", buf, 6) == 0)))
continue;
if ((flags & CH_MIME) &&
- (((ascii_strncasecmp("content-", buf, 8) == 0) &&
- ((ascii_strncasecmp("transfer-encoding:", buf + 8, 18) == 0) ||
- (ascii_strncasecmp("type:", buf + 8, 5) == 0))) ||
- (ascii_strncasecmp("mime-version:", buf, 13) == 0)))
+ (((mutt_strncasecmp("content-", buf, 8) == 0) &&
+ ((mutt_strncasecmp("transfer-encoding:", buf + 8, 18) == 0) ||
+ (mutt_strncasecmp("type:", buf + 8, 5) == 0))) ||
+ (mutt_strncasecmp("mime-version:", buf, 13) == 0)))
continue;
- if ((flags & CH_UPDATE_REFS) && (ascii_strncasecmp("References:", buf, 11) == 0))
+ if ((flags & CH_UPDATE_REFS) && (mutt_strncasecmp("References:", buf, 11) == 0))
continue;
- if ((flags & CH_UPDATE_IRT) && (ascii_strncasecmp("In-Reply-To:", buf, 12) == 0))
+ if ((flags & CH_UPDATE_IRT) && (mutt_strncasecmp("In-Reply-To:", buf, 12) == 0))
continue;
/* Find x -- the array entry where this header is to be saved */
{
for (t = HeaderOrderList, x = 0; (t); t = t->next, x++)
{
- if (ascii_strncasecmp(buf, t->data, mutt_strlen(t->data)) == 0)
+ if (mutt_strncasecmp(buf, t->data, mutt_strlen(t->data)) == 0)
{
mutt_debug(2, "Reorder: %s matches %s\n", t->data, buf);
break;
{
case 'r':
{
- if (ascii_strncasecmp(s, "return-path:", 12) == 0)
+ if (mutt_strncasecmp(s, "return-path:", 12) == 0)
{
l = 12;
rp = true;
break;
}
- else if (ascii_strncasecmp(s, "reply-to:", 9) == 0)
+ else if (mutt_strncasecmp(s, "reply-to:", 9) == 0)
{
l = 9;
break;
}
case 'f':
{
- if (ascii_strncasecmp(s, "from:", 5) != 0)
+ if (mutt_strncasecmp(s, "from:", 5) != 0)
return 0;
l = 5;
break;
}
case 'c':
{
- if (ascii_strncasecmp(s, "cc:", 3) != 0)
+ if (mutt_strncasecmp(s, "cc:", 3) != 0)
return 0;
l = 3;
break;
}
case 'b':
{
- if (ascii_strncasecmp(s, "bcc:", 4) != 0)
+ if (mutt_strncasecmp(s, "bcc:", 4) != 0)
return 0;
l = 4;
break;
}
case 's':
{
- if (ascii_strncasecmp(s, "sender:", 7) != 0)
+ if (mutt_strncasecmp(s, "sender:", 7) != 0)
return 0;
l = 7;
break;
}
case 't':
{
- if (ascii_strncasecmp(s, "to:", 3) != 0)
+ if (mutt_strncasecmp(s, "to:", 3) != 0)
return 0;
l = 3;
break;
}
case 'm':
{
- if (ascii_strncasecmp(s, "mail-followup-to:", 17) != 0)
+ if (mutt_strncasecmp(s, "mail-followup-to:", 17) != 0)
return 0;
l = 17;
break;
return 0;
/* pipermail archives have the return_path obscured such as "me at mutt.org" */
- if (ascii_strncasecmp(p, " at ", 4) == 0)
+ if (mutt_strncasecmp(p, " at ", 4) == 0)
{
p = strchr(p + 4, ' ');
if (!p)
{
if (*(q + 1) == '*')
{
- if (ascii_strncasecmp(buf, p, q - p) == 0)
+ if (mutt_strncasecmp(buf, p, q - p) == 0)
return 1;
}
else
{
- if (ascii_strcasecmp(buf, p) == 0)
+ if (mutt_strcasecmp(buf, p) == 0)
return 1;
}
}
{
int i = mutt_strlen(t->data) - 1;
if ((i > 0 && t->data[i - 1] == '/' && t->data[i] == '*' &&
- (ascii_strncasecmp(type, t->data, i) == 0)) ||
- (ascii_strcasecmp(type, t->data) == 0))
+ (mutt_strncasecmp(type, t->data, i) == 0)) ||
+ (mutt_strcasecmp(type, t->data) == 0))
is_av = 1;
}
b->length = (long) st.st_size;
b->parts = mutt_parse_multipart(s->fpin, mutt_get_parameter("boundary", a->parameter),
(long) st.st_size,
- (ascii_strcasecmp("digest", a->subtype) == 0));
+ (mutt_strcasecmp("digest", a->subtype) == 0));
}
else
b = a;
while (b)
{
const char *bt = TYPE(b);
- if ((ascii_strncasecmp(bt, t->data, btlen) == 0) && (bt[btlen] == 0))
+ if ((mutt_strncasecmp(bt, t->data, btlen) == 0) && (bt[btlen] == 0))
{
/* the basetype matches */
- if (wild || (ascii_strcasecmp(t->data + btlen + 1, b->subtype) == 0))
+ if (wild || (mutt_strcasecmp(t->data + btlen + 1, b->subtype) == 0))
{
choice = b;
}
{
if (b->type == TYPETEXT)
{
- if ((ascii_strcasecmp("plain", b->subtype) == 0) && type <= TXTPLAIN)
+ if ((mutt_strcasecmp("plain", b->subtype) == 0) && type <= TXTPLAIN)
{
choice = b;
type = TXTPLAIN;
}
- else if ((ascii_strcasecmp("enriched", b->subtype) == 0) && type <= TXTENRICHED)
+ else if ((mutt_strcasecmp("enriched", b->subtype) == 0) && type <= TXTENRICHED)
{
choice = b;
type = TXTENRICHED;
}
- else if ((ascii_strcasecmp("html", b->subtype) == 0) && type <= TXTHTML)
+ else if ((mutt_strcasecmp("html", b->subtype) == 0) && type <= TXTHTML)
{
choice = b;
type = TXTHTML;
if (WithCrypto)
{
- if ((ascii_strcasecmp(a->subtype, "signed") == 0) ||
- (ascii_strcasecmp(a->subtype, "encrypted") == 0))
+ if ((mutt_strcasecmp(a->subtype, "signed") == 0) ||
+ (mutt_strcasecmp(a->subtype, "encrypted") == 0))
return 1;
}
b->length = (long) st.st_size;
b->parts = mutt_parse_multipart(s->fpin, mutt_get_parameter("boundary", a->parameter),
(long) st.st_size,
- (ascii_strcasecmp("digest", a->subtype) == 0));
+ (mutt_strcasecmp("digest", a->subtype) == 0));
}
else
b = a;
else
expire = -1;
- if (ascii_strcasecmp(access_type, "x-mutt-deleted") == 0)
+ if (mutt_strcasecmp(access_type, "x-mutt-deleted") == 0)
{
if (s->flags & (MUTT_DISPLAY | MUTT_PRINTING))
{
}
else if (b->type == TYPETEXT)
{
- if (ascii_strcasecmp("plain", b->subtype) == 0)
+ if (mutt_strcasecmp("plain", b->subtype) == 0)
{
/* avoid copying this part twice since removing the transfer-encoding is
* the only operation needed.
if ((WithCrypto & APPLICATION_PGP) && mutt_is_application_pgp(b))
handler = crypt_pgp_application_pgp_handler;
else if (option(OPT_REFLOW_TEXT) &&
- (ascii_strcasecmp("flowed", mutt_get_parameter("format", b->parameter)) == 0))
+ (mutt_strcasecmp("flowed", mutt_get_parameter("format", b->parameter)) == 0))
handler = rfc3676_handler;
else
handler = text_plain_handler;
}
- else if (ascii_strcasecmp("enriched", b->subtype) == 0)
+ else if (mutt_strcasecmp("enriched", b->subtype) == 0)
handler = text_enriched_handler;
else /* text body type without a handler */
plaintext = false;
{
if (mutt_is_message_type(b->type, b->subtype))
handler = message_handler;
- else if (ascii_strcasecmp("delivery-status", b->subtype) == 0)
+ else if (mutt_strcasecmp("delivery-status", b->subtype) == 0)
plaintext = true;
- else if (ascii_strcasecmp("external-body", b->subtype) == 0)
+ else if (mutt_strcasecmp("external-body", b->subtype) == 0)
handler = external_body_handler;
}
else if (b->type == TYPEMULTIPART)
char *p = NULL;
if ((mutt_strcmp("inline", ShowMultipartAlternative) != 0) &&
- (ascii_strcasecmp("alternative", b->subtype) == 0))
+ (mutt_strcasecmp("alternative", b->subtype) == 0))
handler = alternative_handler;
- else if (WithCrypto && (ascii_strcasecmp("signed", b->subtype) == 0))
+ else if (WithCrypto && (mutt_strcasecmp("signed", b->subtype) == 0))
{
p = mutt_get_parameter("protocol", b->parameter);
}
else if (WithCrypto && b->type == TYPEAPPLICATION)
{
- if (option(OPT_DONT_HANDLE_PGP_KEYS) && (ascii_strcasecmp("pgp-keys", b->subtype) == 0))
+ if (option(OPT_DONT_HANDLE_PGP_KEYS) && (mutt_strcasecmp("pgp-keys", b->subtype) == 0))
{
/* pass raw part through for key extraction */
plaintext = true;
{
keep = true;
- if (fcc && (ascii_strncasecmp("fcc:", cur->data, 4) == 0))
+ if (fcc && (mutt_strncasecmp("fcc:", cur->data, 4) == 0))
{
p = skip_email_wsp(cur->data + 4);
if (*p)
}
keep = false;
}
- else if (ascii_strncasecmp("attach:", cur->data, 7) == 0)
+ else if (mutt_strncasecmp("attach:", cur->data, 7) == 0)
{
struct Body *body2 = NULL;
struct Body *parts = NULL;
keep = false;
}
else if ((WithCrypto & APPLICATION_PGP) &&
- (ascii_strncasecmp("pgp:", cur->data, 4) == 0))
+ (mutt_strncasecmp("pgp:", cur->data, 4) == 0))
{
msg->security = mutt_parse_crypt_hdr(cur->data + 4, 0, APPLICATION_PGP);
if (msg->security)
while (authenticator->authenticate)
{
- if (!authenticator->method || (ascii_strcasecmp(authenticator->method, method) == 0))
+ if (!authenticator->method || (mutt_strcasecmp(authenticator->method, method) == 0))
if ((r = authenticator->authenticate(idata, method)) != IMAP_AUTH_UNAVAIL)
{
FREE(&methods);
(mutt_strncmp(idata->conn->account.user, "anonymous", 9) == 0)))
rc = sasl_client_start(saslconn, "AUTH=ANONYMOUS", NULL, &pc, &olen, &mech);
}
- else if ((ascii_strcasecmp("login", method) == 0) &&
+ else if ((mutt_strcasecmp("login", method) == 0) &&
!strstr(NONULL(idata->capstr), "AUTH=LOGIN"))
/* do not use SASL login for regular IMAP login (#3556) */
return IMAP_AUTH_UNAVAIL;
{
s = imap_next_word((char *) s);
- if (ascii_strncasecmp("OK", s, 2) == 0)
+ if (mutt_strncasecmp("OK", s, 2) == 0)
return IMAP_CMD_OK;
- if (ascii_strncasecmp("NO", s, 2) == 0)
+ if (mutt_strncasecmp("NO", s, 2) == 0)
return IMAP_CMD_NO;
return IMAP_CMD_BAD;
}
s++;
- if (ascii_strncasecmp("FLAGS", s, 5) != 0)
+ if (mutt_strncasecmp("FLAGS", s, 5) != 0)
{
mutt_debug(2, "Only handle FLAGS updates\n");
return;
s++;
while (*s)
{
- if (ascii_strncasecmp(s, "\\NoSelect", 9) == 0)
+ if (mutt_strncasecmp(s, "\\NoSelect", 9) == 0)
list->noselect = true;
- else if (ascii_strncasecmp(s, "\\NoInferiors", 12) == 0)
+ else if (mutt_strncasecmp(s, "\\NoInferiors", 12) == 0)
list->noinferiors = true;
/* See draft-gahrns-imap-child-mailbox-?? */
- else if (ascii_strncasecmp(s, "\\HasNoChildren", 14) == 0)
+ else if (mutt_strncasecmp(s, "\\HasNoChildren", 14) == 0)
list->noinferiors = true;
s = imap_next_word(s);
}
/* Delimiter */
- if (ascii_strncasecmp(s, "NIL", 3) != 0)
+ if (mutt_strncasecmp(s, "NIL", 3) != 0)
{
delimbuf[0] = '\0';
safe_strcat(delimbuf, 5, s);
while ((s = imap_next_word((char *) s)) && *s != '\0')
{
- if ((ascii_strncasecmp(s, "UTF8=ACCEPT", 11) == 0) ||
- (ascii_strncasecmp(s, "UTF8=ONLY", 9) == 0))
+ if ((mutt_strncasecmp(s, "UTF8=ACCEPT", 11) == 0) ||
+ (mutt_strncasecmp(s, "UTF8=ONLY", 9) == 0))
idata->unicode = 1;
}
}
/* EXISTS and EXPUNGE are always related to the SELECTED mailbox for the
* connection, so update that one.
*/
- if (ascii_strncasecmp("EXISTS", s, 6) == 0)
+ if (mutt_strncasecmp("EXISTS", s, 6) == 0)
{
mutt_debug(2, "Handling EXISTS\n");
}
}
/* pn vs. s: need initial seqno */
- else if (ascii_strncasecmp("EXPUNGE", s, 7) == 0)
+ else if (mutt_strncasecmp("EXPUNGE", s, 7) == 0)
cmd_parse_expunge(idata, pn);
- else if (ascii_strncasecmp("FETCH", s, 5) == 0)
+ else if (mutt_strncasecmp("FETCH", s, 5) == 0)
cmd_parse_fetch(idata, pn);
}
- else if (ascii_strncasecmp("CAPABILITY", s, 10) == 0)
+ else if (mutt_strncasecmp("CAPABILITY", s, 10) == 0)
cmd_parse_capability(idata, s);
- else if (ascii_strncasecmp("OK [CAPABILITY", s, 14) == 0)
+ else if (mutt_strncasecmp("OK [CAPABILITY", s, 14) == 0)
cmd_parse_capability(idata, pn);
- else if (ascii_strncasecmp("OK [CAPABILITY", pn, 14) == 0)
+ else if (mutt_strncasecmp("OK [CAPABILITY", pn, 14) == 0)
cmd_parse_capability(idata, imap_next_word(pn));
- else if (ascii_strncasecmp("LIST", s, 4) == 0)
+ else if (mutt_strncasecmp("LIST", s, 4) == 0)
cmd_parse_list(idata, s);
- else if (ascii_strncasecmp("LSUB", s, 4) == 0)
+ else if (mutt_strncasecmp("LSUB", s, 4) == 0)
cmd_parse_lsub(idata, s);
- else if (ascii_strncasecmp("MYRIGHTS", s, 8) == 0)
+ else if (mutt_strncasecmp("MYRIGHTS", s, 8) == 0)
cmd_parse_myrights(idata, s);
- else if (ascii_strncasecmp("SEARCH", s, 6) == 0)
+ else if (mutt_strncasecmp("SEARCH", s, 6) == 0)
cmd_parse_search(idata, s);
- else if (ascii_strncasecmp("STATUS", s, 6) == 0)
+ else if (mutt_strncasecmp("STATUS", s, 6) == 0)
cmd_parse_status(idata, s);
- else if (ascii_strncasecmp("ENABLED", s, 7) == 0)
+ else if (mutt_strncasecmp("ENABLED", s, 7) == 0)
cmd_parse_enabled(idata, s);
- else if (ascii_strncasecmp("BYE", s, 3) == 0)
+ else if (mutt_strncasecmp("BYE", s, 3) == 0)
{
mutt_debug(2, "Handling BYE\n");
return -1;
}
- else if (option(OPT_IMAP_SERVER_NOISE) && (ascii_strncasecmp("NO", s, 2) == 0))
+ else if (option(OPT_IMAP_SERVER_NOISE) && (mutt_strncasecmp("NO", s, 2) == 0))
{
mutt_debug(2, "Handling untagged NO\n");
}
s = imap_next_word((char *) s);
- if (!s || ((ascii_strncasecmp(s, "OK", 2) != 0) && (ascii_strncasecmp(s, "NO", 2) != 0) &&
- (ascii_strncasecmp(s, "BAD", 3) != 0)))
+ if (!s || ((mutt_strncasecmp(s, "OK", 2) != 0) && (mutt_strncasecmp(s, "NO", 2) != 0) &&
+ (mutt_strncasecmp(s, "BAD", 3) != 0)))
{
mutt_debug(2, "imap_cmd_trailer: not a command completion: %s\n", idata->buf);
return notrailer;
return -1;
}
- if (ascii_strncasecmp("* OK", idata->buf, 4) == 0)
+ if (mutt_strncasecmp("* OK", idata->buf, 4) == 0)
{
- if ((ascii_strncasecmp("* OK [CAPABILITY", idata->buf, 16) != 0) &&
+ if ((mutt_strncasecmp("* OK [CAPABILITY", idata->buf, 16) != 0) &&
imap_check_capabilities(idata))
goto bail;
#ifdef USE_SSL
}
#endif
}
- else if (ascii_strncasecmp("* PREAUTH", idata->buf, 9) == 0)
+ else if (mutt_strncasecmp("* PREAUTH", idata->buf, 9) == 0)
{
idata->state = IMAP_AUTHENTICATED;
if (imap_check_capabilities(idata) != 0)
char ctmp;
/* sanity-check string */
- if (ascii_strncasecmp("FLAGS", s, 5) != 0)
+ if (mutt_strncasecmp("FLAGS", s, 5) != 0)
{
mutt_debug(1, "imap_get_flags: not a FLAGS response: %s\n", s);
return NULL;
/* Obtain list of available flags here, may be overridden by a
* PERMANENTFLAGS tag in the OK response */
- if (ascii_strncasecmp("FLAGS", pc, 5) == 0)
+ if (mutt_strncasecmp("FLAGS", pc, 5) == 0)
{
/* don't override PERMANENTFLAGS */
if (!idata->flags)
}
}
/* PERMANENTFLAGS are massaged to look like FLAGS, then override FLAGS */
- else if (ascii_strncasecmp("OK [PERMANENTFLAGS", pc, 18) == 0)
+ else if (mutt_strncasecmp("OK [PERMANENTFLAGS", pc, 18) == 0)
{
mutt_debug(3, "Getting mailbox PERMANENTFLAGS\n");
/* safe to call on NULL */
goto fail;
}
/* save UIDVALIDITY for the header cache */
- else if (ascii_strncasecmp("OK [UIDVALIDITY", pc, 14) == 0)
+ else if (mutt_strncasecmp("OK [UIDVALIDITY", pc, 14) == 0)
{
mutt_debug(3, "Getting mailbox UIDVALIDITY\n");
pc += 3;
idata->uid_validity = strtol(pc, NULL, 10);
status->uidvalidity = idata->uid_validity;
}
- else if (ascii_strncasecmp("OK [UIDNEXT", pc, 11) == 0)
+ else if (mutt_strncasecmp("OK [UIDNEXT", pc, 11) == 0)
{
mutt_debug(3, "Getting mailbox UIDNEXT\n");
pc += 3;
else
{
pc = imap_next_word(pc);
- if (ascii_strncasecmp("EXISTS", pc, 6) == 0)
+ if (mutt_strncasecmp("EXISTS", pc, 6) == 0)
{
count = idata->new_mail_count;
idata->new_mail_count = 0;
goto fail;
/* check for READ-ONLY notification */
- if ((ascii_strncasecmp(imap_get_qualifier(idata->buf), "[READ-ONLY]", 11) == 0) &&
+ if ((mutt_strncasecmp(imap_get_qualifier(idata->buf), "[READ-ONLY]", 11) == 0) &&
!mutt_bit_isset(idata->capabilities, ACL))
{
mutt_debug(2, "Mailbox is read-only.\n");
flag_list = flag_list->next;
while (flag_list)
{
- if (ascii_strncasecmp(flag_list->data, flag, strlen(flag_list->data)) == 0)
+ if (mutt_strncasecmp(flag_list->data, flag, strlen(flag_list->data)) == 0)
return true;
if (mutt_strncmp(flag_list->data, "\\*", strlen(flag_list->data)) == 0)
break;
}
/* bail out if command failed for reasons other than nonexistent target */
- if (ascii_strncasecmp(imap_get_qualifier(idata->buf), "[TRYCREATE]", 11) != 0)
+ if (mutt_strncasecmp(imap_get_qualifier(idata->buf), "[TRYCREATE]", 11) != 0)
break;
mutt_debug(3, "imap_fast_trash: server suggests TRYCREATE\n");
snprintf(prompt, sizeof(prompt), _("Create %s?"), mbox);
struct ImapHeaderData *hd = h->data;
/* sanity-check string */
- if (ascii_strncasecmp("FLAGS", s, 5) != 0)
+ if (mutt_strncasecmp("FLAGS", s, 5) != 0)
{
mutt_debug(1, "msg_parse_flags: not a FLAGS response: %s\n", s);
return NULL;
/* start parsing */
while (*s && *s != ')')
{
- if (ascii_strncasecmp("\\deleted", s, 8) == 0)
+ if (mutt_strncasecmp("\\deleted", s, 8) == 0)
{
s += 8;
hd->deleted = true;
}
- else if (ascii_strncasecmp("\\flagged", s, 8) == 0)
+ else if (mutt_strncasecmp("\\flagged", s, 8) == 0)
{
s += 8;
hd->flagged = true;
}
- else if (ascii_strncasecmp("\\answered", s, 9) == 0)
+ else if (mutt_strncasecmp("\\answered", s, 9) == 0)
{
s += 9;
hd->replied = true;
}
- else if (ascii_strncasecmp("\\seen", s, 5) == 0)
+ else if (mutt_strncasecmp("\\seen", s, 5) == 0)
{
s += 5;
hd->read = true;
}
- else if (ascii_strncasecmp("\\recent", s, 7) == 0)
+ else if (mutt_strncasecmp("\\recent", s, 7) == 0)
s += 7;
- else if (ascii_strncasecmp("old", s, 3) == 0)
+ else if (mutt_strncasecmp("old", s, 3) == 0)
{
s += 3;
hd->old = option(OPT_MARK_OLD) ? true : false;
{
SKIPWS(s);
- if (ascii_strncasecmp("FLAGS", s, 5) == 0)
+ if (mutt_strncasecmp("FLAGS", s, 5) == 0)
{
if ((s = msg_parse_flags(h, s)) == NULL)
return -1;
}
- else if (ascii_strncasecmp("UID", s, 3) == 0)
+ else if (mutt_strncasecmp("UID", s, 3) == 0)
{
s += 3;
SKIPWS(s);
s = imap_next_word(s);
}
- else if (ascii_strncasecmp("INTERNALDATE", s, 12) == 0)
+ else if (mutt_strncasecmp("INTERNALDATE", s, 12) == 0)
{
s += 12;
SKIPWS(s);
*ptmp = 0;
h->received = imap_parse_date(tmp);
}
- else if (ascii_strncasecmp("RFC822.SIZE", s, 11) == 0)
+ else if (mutt_strncasecmp("RFC822.SIZE", s, 11) == 0)
{
s += 11;
SKIPWS(s);
*ptmp = 0;
h->content_length = atoi(tmp);
}
- else if ((ascii_strncasecmp("BODY", s, 4) == 0) ||
- (ascii_strncasecmp("RFC822.HEADER", s, 13) == 0))
+ else if ((mutt_strncasecmp("BODY", s, 4) == 0) ||
+ (mutt_strncasecmp("RFC822.HEADER", s, 13) == 0))
{
/* handle above, in msg_fetch_header */
return -2;
/* find FETCH tag */
buf = imap_next_word(buf);
- if (ascii_strncasecmp("FETCH", buf, 5) != 0)
+ if (mutt_strncasecmp("FETCH", buf, 5) != 0)
return rc;
rc = -2; /* we've got a FETCH response, for better or worse */
pc = imap_next_word(pc);
pc = imap_next_word(pc);
- if (ascii_strncasecmp("FETCH", pc, 5) == 0)
+ if (mutt_strncasecmp("FETCH", pc, 5) == 0)
{
while (*pc)
{
pc = imap_next_word(pc);
if (pc[0] == '(')
pc++;
- if (ascii_strncasecmp("UID", pc, 3) == 0)
+ if (mutt_strncasecmp("UID", pc, 3) == 0)
{
pc = imap_next_word(pc);
uid = atoi(pc);
mutt_error(_(
"The message index is incorrect. Try reopening the mailbox."));
}
- else if ((ascii_strncasecmp("RFC822", pc, 6) == 0) ||
- (ascii_strncasecmp("BODY[]", pc, 6) == 0))
+ else if ((mutt_strncasecmp("RFC822", pc, 6) == 0) ||
+ (mutt_strncasecmp("BODY[]", pc, 6) == 0))
{
pc = imap_next_word(pc);
if (imap_get_literal_count(pc, &bytes) < 0)
* change (eg from \Unseen to \Seen).
* Uncommitted changes in mutt take precedence. If we decide to
* incrementally update flags later, this won't stop us syncing */
- else if ((ascii_strncasecmp("FLAGS", pc, 5) == 0) && !h->changed)
+ else if ((mutt_strncasecmp("FLAGS", pc, 5) == 0) && !h->changed)
{
if ((pc = imap_set_flags(idata, h, pc)) == NULL)
goto bail;
break;
}
/* bail out if command failed for reasons other than nonexistent target */
- if (ascii_strncasecmp(imap_get_qualifier(idata->buf), "[TRYCREATE]", 11) != 0)
+ if (mutt_strncasecmp(imap_get_qualifier(idata->buf), "[TRYCREATE]", 11) != 0)
break;
mutt_debug(3, "imap_copy_messages: server suggests TRYCREATE\n");
snprintf(prompt, sizeof(prompt), _("Create %s?"), mbox);
mx1 = "INBOX";
if (!mx2 || !*mx2)
mx2 = "INBOX";
- if ((ascii_strcasecmp(mx1, "INBOX") == 0) &&
- (ascii_strcasecmp(mx2, "INBOX") == 0))
+ if ((mutt_strcasecmp(mx1, "INBOX") == 0) &&
+ (mutt_strcasecmp(mx2, "INBOX") == 0))
return 0;
b1 = safe_malloc(strlen(mx1) + 1);
}
tmp[i + 1] = 0;
- return ascii_strcasecmp(a, tmp);
+ return mutt_strcasecmp(a, tmp);
}
/*
/* check to make sure the item is not already on this list */
for (last = *list; last; last = last->next)
{
- if (ascii_strcasecmp(str, last->data) == 0)
+ if (mutt_strcasecmp(str, last->data) == 0)
{
/* already on the list, so just ignore it */
last = NULL;
/* check to make sure the item is not already on this list */
for (last = *list; last; last = last->next)
{
- if (ascii_strcasecmp(rx->pattern, last->rx->pattern) == 0)
+ if (mutt_strcasecmp(rx->pattern, last->rx->pattern) == 0)
{
/* already on the list, so just ignore it */
last = NULL;
/* check to make sure the item is not already on this list */
for (last = *list; last; last = last->next)
{
- if (ascii_strcasecmp(rx->pattern, last->rx->pattern) == 0)
+ if (mutt_strcasecmp(rx->pattern, last->rx->pattern) == 0)
{
/* Already on the list. Formerly we just skipped this case, but
* now we're supporting removals, which means we're supporting
last = NULL;
while (p)
{
- if (ascii_strcasecmp(str, p->data) == 0)
+ if (mutt_strcasecmp(str, p->data) == 0)
{
FREE(&p->data);
if (last)
a = safe_malloc(sizeof(struct AttachMatch));
/* some cheap hacks that I expect to remove */
- if (ascii_strcasecmp(buf->data, "any") == 0)
+ if (mutt_strcasecmp(buf->data, "any") == 0)
a->major = safe_strdup("*/.*");
- else if (ascii_strcasecmp(buf->data, "none") == 0)
+ else if (mutt_strcasecmp(buf->data, "none") == 0)
a->major = safe_strdup("cheap_hack/this_should_never_match");
else
a->major = safe_strdup(buf->data);
mutt_extract_token(buf, s, 0);
FREE(&tmp);
- if (ascii_strcasecmp(buf->data, "any") == 0)
+ if (mutt_strcasecmp(buf->data, "any") == 0)
tmp = safe_strdup("*/.*");
- else if (ascii_strcasecmp(buf->data, "none") == 0)
+ else if (mutt_strcasecmp(buf->data, "none") == 0)
tmp = safe_strdup("cheap_hack/this_should_never_match");
else
tmp = safe_strdup(buf->data);
op = '+';
category--;
}
- if (ascii_strncasecmp(category, "attachment", strlen(category)) == 0)
+ if (mutt_strncasecmp(category, "attachment", strlen(category)) == 0)
{
if (op == '+')
listp = &AttachAllow;
else
listp = &AttachExclude;
}
- else if (ascii_strncasecmp(category, "inline", strlen(category)) == 0)
+ else if (mutt_strncasecmp(category, "inline", strlen(category)) == 0)
{
if (op == '+')
listp = &InlineAllow;
op = '+';
p--;
}
- if (ascii_strncasecmp(p, "attachment", strlen(p)) == 0)
+ if (mutt_strncasecmp(p, "attachment", strlen(p)) == 0)
{
if (op == '+')
listp = &AttachAllow;
else
listp = &AttachExclude;
}
- else if (ascii_strncasecmp(p, "inline", strlen(p)) == 0)
+ else if (mutt_strncasecmp(p, "inline", strlen(p)) == 0)
{
if (op == '+')
listp = &InlineAllow;
while (tmp)
{
- if ((ascii_strncasecmp(buf->data, tmp->data, l) == 0) && tmp->data[l] == ':')
+ if ((mutt_strncasecmp(buf->data, tmp->data, l) == 0) && tmp->data[l] == ':')
{
ptr = tmp;
if (last)
for (tmp = UserHeader;; tmp = tmp->next)
{
/* see if there is already a field by this name */
- if (ascii_strncasecmp(buf->data, tmp->data, keylen) == 0)
+ if (mutt_strncasecmp(buf->data, tmp->data, keylen) == 0)
{
/* replace the old value */
FREE(&tmp->data);
s->dptr++;
mutt_extract_token(tmp, s, 0);
- if (ascii_strcasecmp("yes", tmp->data) == 0)
+ if (mutt_strcasecmp("yes", tmp->data) == 0)
unset = inv = 0;
- else if (ascii_strcasecmp("no", tmp->data) == 0)
+ else if (mutt_strcasecmp("no", tmp->data) == 0)
unset = 1;
else
{
{
s->dptr++;
mutt_extract_token(tmp, s, 0);
- if (ascii_strcasecmp("yes", tmp->data) == 0)
+ if (mutt_strcasecmp("yes", tmp->data) == 0)
set_quadoption(MuttVars[idx].data, MUTT_YES);
- else if (ascii_strcasecmp("no", tmp->data) == 0)
+ else if (mutt_strcasecmp("no", tmp->data) == 0)
set_quadoption(MuttVars[idx].data, MUTT_NO);
- else if (ascii_strcasecmp("ask-yes", tmp->data) == 0)
+ else if (mutt_strcasecmp("ask-yes", tmp->data) == 0)
set_quadoption(MuttVars[idx].data, MUTT_ASKYES);
- else if (ascii_strcasecmp("ask-no", tmp->data) == 0)
+ else if (mutt_strcasecmp("ask-no", tmp->data) == 0)
set_quadoption(MuttVars[idx].data, MUTT_ASKNO);
else
{
int mutt_getvaluebyname(const char *name, const struct Mapping *map)
{
for (int i = 0; map[i].name; i++)
- if (ascii_strcasecmp(map[i].name, name) == 0)
+ if (mutt_strcasecmp(map[i].name, name) == 0)
return map[i].value;
return -1;
}
const struct Command *c = NULL;
for (c = Commands; c->name; c++)
- if (c->func == mutt_parse_hook && (ascii_strcasecmp(c->name, name) == 0))
+ if (c->func == mutt_parse_hook && (mutt_strcasecmp(c->name, name) == 0))
return c->data;
return 0;
}
{
for (int i = 0; bindings[i].name; i++)
{
- if ((ascii_strncasecmp(start, bindings[i].name, len) == 0) &&
+ if ((mutt_strncasecmp(start, bindings[i].name, len) == 0) &&
mutt_strlen(bindings[i].name) == len)
return bindings[i].op;
}
l = p - pp + 1;
for (i = 0; KeyNames[i].name; i++)
{
- if (ascii_strncasecmp(pp, KeyNames[i].name, l) == 0)
+ if (mutt_strncasecmp(pp, KeyNames[i].name, l) == 0)
break;
}
if (KeyNames[i].name)
strfcpy(err->data, _("bind: too many arguments"), err->dsize);
r = -1;
}
- else if (ascii_strcasecmp("noop", buf->data) == 0)
+ else if (mutt_strcasecmp("noop", buf->data) == 0)
{
for (i = 0; i < nummenus; ++i)
{
AUTOMAKE_OPTIONS = 1.6 foreign
-EXTRA_DIST = lib.h ascii.h base64.h buffer.h date.h debug.h exit.h file.h hash.h md5.h memory.h message.h sha1.h string2.h
+EXTRA_DIST = lib.h base64.h buffer.h date.h debug.h exit.h file.h hash.h md5.h memory.h message.h sha1.h string2.h
AM_CPPFLAGS = -I$(top_srcdir)
noinst_LIBRARIES = libmutt.a
-libmutt_a_SOURCES = ascii.c base64.c buffer.c date.c debug.c exit.c file.c hash.c md5.c memory.c message.c sha1.c string.c
+libmutt_a_SOURCES = base64.c buffer.c date.c debug.c exit.c file.c hash.c md5.c memory.c message.c sha1.c string.c
+++ /dev/null
-/**
- * @file
- * ASCII string comparison routines
- *
- * @authors
- * Copyright (C) 2001 Thomas Roessler <roessler@does-not-exist.org>
- *
- * @copyright
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 2 of the License, or (at your option) any later
- * version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
- * @page ascii ASCII string comparison routines
- *
- * Simple ASCII string comparisons.
- *
- * | Function | Description
- * | :------------------ | :---------------------------------
- * | ascii_strcasecmp() | Compare strings, ignoring the case
- * | ascii_strlower() | Lowercase a string
- * | ascii_strncasecmp() | Compare strings, ignoring the case
- */
-
-/*
- * Versions of the string comparison functions which are
- * locale-insensitive.
- */
-
-#include "config.h"
-#include <ctype.h>
-#include <stdio.h>
-#include "ascii.h"
-
-/**
- * ascii_strcasecmp - Compare strings, ignoring the case
- * @param a First string to compare
- * @param b Second string to compare
- * @retval -1 a precedes b
- * @retval 0 a and b are identical
- * @retval 1 b precedes a
- */
-int ascii_strcasecmp(const char *a, const char *b)
-{
- if (a == b)
- return 0;
- if (a == NULL && b)
- return -1;
- if (b == NULL && a)
- return 1;
-
- for (;; a++, b++)
- {
- int i = tolower(*a) - tolower(*b);
- if (i)
- return i;
- /* test for NUL here rather than in the for loop in order to detect unequal
- * length strings */
- if (!*a)
- break;
- }
-
- return 0;
-}
-
-/**
- * ascii_strncasecmp - Compare strings, ignoring the case
- * @param a First string to compare
- * @param b Second string to compare
- * @param n Maximum number of characters to compare
- * @retval -1 a precedes b
- * @retval 0 a and b are identical
- * @retval 1 b precedes a
- */
-int ascii_strncasecmp(const char *a, const char *b, int n)
-{
- if (a == b)
- return 0;
- if (a == NULL && b)
- return -1;
- if (b == NULL && a)
- return 1;
-
- for (int j = 0; (*a || *b) && j < n; a++, b++, j++)
- {
- int i = tolower(*a) - tolower(*b);
- if (i)
- return i;
- }
-
- return 0;
-}
-
-/**
- * ascii_strlower - Lowercase a string
- * @param s String to transform
- * @retval ptr Transformed string
- *
- * The string is transformed in place.
- */
-char *ascii_strlower(char *s)
-{
- char *p = s;
-
- for (; *p; ++p)
- *p = tolower(*p);
-
- return s;
-}
+++ /dev/null
-/**
- * @file
- * ASCII string comparison routines
- *
- * @authors
- * Copyright (C) 2001-2002 Thomas Roessler <roessler@does-not-exist.org>
- *
- * @copyright
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 2 of the License, or (at your option) any later
- * version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*
- * Versions of the string comparison functions which are locale-insensitive.
- */
-
-#ifndef _LIB_ASCII_H
-#define _LIB_ASCII_H
-
-int ascii_strcasecmp(const char *a, const char *b);
-int ascii_strncasecmp(const char *a, const char *b, int n);
-char *ascii_strlower(char *s);
-
-#endif /* _LIB_ASCII_H */
* The library is self-contained -- some files may depend on others in the
* library, but none depends on source from outside.
*
- * -# @subpage ascii
* -# @subpage base64
* -# @subpage buffer
* -# @subpage date
#ifndef _LIB_LIB_H
#define _LIB_LIB_H
-#include "ascii.h"
#include "base64.h"
#include "buffer.h"
#include "date.h"
/* Scan for mutt header to set OPT_RESUME_DRAFT_FILES */
for (last_uhp = &msg->env->userhdrs, uh = *last_uhp; uh; uh = *last_uhp)
{
- if (ascii_strncasecmp("X-Mutt-Resume-Draft:", uh->data, 20) == 0)
+ if (mutt_strncasecmp("X-Mutt-Resume-Draft:", uh->data, 20) == 0)
{
if (option(OPT_RESUME_EDITED_DRAFT_FILES))
set_option(OPT_RESUME_DRAFT_FILES);
if (!domain)
return false;
- if (ascii_strncasecmp(domain, "xn--", 4) == 0)
+ if (mutt_strncasecmp(domain, "xn--", 4) == 0)
return true;
while ((domain = strchr(domain, '.')) != NULL)
{
- if (ascii_strncasecmp(++domain, "xn--", 4) == 0)
+ if (mutt_strncasecmp(++domain, "xn--", 4) == 0)
return true;
}
goto cleanup;
}
- if (ascii_strcasecmp(orig_user, reversed_user) != 0)
+ if (mutt_strcasecmp(orig_user, reversed_user) != 0)
{
mutt_debug(
1, "intl_to_local: Not reversible. orig = '%s', reversed = '%s'.\n",
}
#endif /* HAVE_LIBIDN */
- if (ascii_strcasecmp(orig_domain, reversed_domain) != 0)
+ if (mutt_strcasecmp(orig_domain, reversed_domain) != 0)
{
mutt_debug(
1, "intl_to_local: Not reversible. orig = '%s', reversed = '%s'.\n",
last = NULL;
while (p)
{
- if (ascii_strcasecmp(str, p->rx->pattern) == 0)
+ if (mutt_strcasecmp(str, p->rx->pattern) == 0)
{
mutt_free_regexp(&p->rx);
if (last)
{
for (; t; t = t->next)
{
- if ((ascii_strncasecmp(s, t->data, mutt_strlen(t->data)) == 0) || *t->data == '*')
+ if ((mutt_strncasecmp(s, t->data, mutt_strlen(t->data)) == 0) || *t->data == '*')
return true;
}
return false;
switch (m->type)
{
case TYPETEXT:
- if (ascii_strcasecmp("plain", m->subtype) == 0)
+ if (mutt_strcasecmp("plain", m->subtype) == 0)
return false;
break;
case TYPEAPPLICATION:
if (t == TYPEMESSAGE)
{
- if (ascii_strcasecmp("delivery-status", s) == 0)
+ if (mutt_strcasecmp("delivery-status", s) == 0)
return true;
}
if ((WithCrypto & APPLICATION_PGP) && t == TYPEAPPLICATION)
{
- if (ascii_strcasecmp("pgp-keys", s) == 0)
+ if (mutt_strcasecmp("pgp-keys", s) == 0)
return true;
}
*/
int mx_set_magic(const char *s)
{
- if (ascii_strcasecmp(s, "mbox") == 0)
+ if (mutt_strcasecmp(s, "mbox") == 0)
DefaultMagic = MUTT_MBOX;
- else if (ascii_strcasecmp(s, "mmdf") == 0)
+ else if (mutt_strcasecmp(s, "mmdf") == 0)
DefaultMagic = MUTT_MMDF;
- else if (ascii_strcasecmp(s, "mh") == 0)
+ else if (mutt_strcasecmp(s, "mh") == 0)
DefaultMagic = MUTT_MH;
- else if (ascii_strcasecmp(s, "maildir") == 0)
+ else if (mutt_strcasecmp(s, "maildir") == 0)
DefaultMagic = MUTT_MAILDIR;
else
return -1;
if ((WithCrypto & APPLICATION_PGP) && ((msg->security & PGPINLINE) == PGPINLINE))
{
if ((msg->content->type != TYPETEXT) ||
- (ascii_strcasecmp(msg->content->subtype, "plain") != 0))
+ (mutt_strcasecmp(msg->content->subtype, "plain") != 0))
{
if (query_quadoption(OPT_PGP_MIME_AUTO,
_("Inline PGP can't be used with attachments. "
char *p = NULL;
if (!b || !(b->type == TYPEMULTIPART) || !b->subtype ||
- (ascii_strcasecmp(b->subtype, "signed") != 0))
+ (mutt_strcasecmp(b->subtype, "signed") != 0))
return 0;
if (!(p = mutt_get_parameter("protocol", b->parameter)))
return 0;
- if (!(ascii_strcasecmp(p, "multipart/mixed") != 0))
+ if (!(mutt_strcasecmp(p, "multipart/mixed") != 0))
return SIGN;
if ((WithCrypto & APPLICATION_PGP) &&
- !(ascii_strcasecmp(p, "application/pgp-signature") != 0))
+ !(mutt_strcasecmp(p, "application/pgp-signature") != 0))
return PGPSIGN;
if ((WithCrypto & APPLICATION_SMIME) &&
- !(ascii_strcasecmp(p, "application/x-pkcs7-signature") != 0))
+ !(mutt_strcasecmp(p, "application/x-pkcs7-signature") != 0))
return SMIMESIGN;
if ((WithCrypto & APPLICATION_SMIME) &&
- !(ascii_strcasecmp(p, "application/pkcs7-signature") != 0))
+ !(mutt_strcasecmp(p, "application/pkcs7-signature") != 0))
return SMIMESIGN;
return 0;
char *p = NULL;
if (!b || b->type != TYPEMULTIPART || !b->subtype ||
- (ascii_strcasecmp(b->subtype, "encrypted") != 0) ||
+ (mutt_strcasecmp(b->subtype, "encrypted") != 0) ||
!(p = mutt_get_parameter("protocol", b->parameter)) ||
- (ascii_strcasecmp(p, "application/pgp-encrypted") != 0))
+ (mutt_strcasecmp(p, "application/pgp-encrypted") != 0))
return 0;
return PGPENCRYPT;
b = b->parts;
if (!b || b->type != TYPEAPPLICATION || !b->subtype ||
- (ascii_strcasecmp(b->subtype, "pgp-encrypted") != 0))
+ (mutt_strcasecmp(b->subtype, "pgp-encrypted") != 0))
return 0;
b = b->next;
if (!b || b->type != TYPEAPPLICATION || !b->subtype ||
- (ascii_strcasecmp(b->subtype, "octet-stream") != 0))
+ (mutt_strcasecmp(b->subtype, "octet-stream") != 0))
return 0;
return PGPENCRYPT;
return 0;
if (!b || b->type != TYPEMULTIPART || !b->subtype ||
- (ascii_strcasecmp(b->subtype, "mixed") != 0))
+ (mutt_strcasecmp(b->subtype, "mixed") != 0))
return 0;
b = b->parts;
if (!b || b->type != TYPETEXT || !b->subtype ||
- (ascii_strcasecmp(b->subtype, "plain") != 0) || b->length != 0)
+ (mutt_strcasecmp(b->subtype, "plain") != 0) || b->length != 0)
return 0;
b = b->next;
if (!b || b->type != TYPEAPPLICATION || !b->subtype ||
- (ascii_strcasecmp(b->subtype, "pgp-encrypted") != 0))
+ (mutt_strcasecmp(b->subtype, "pgp-encrypted") != 0))
return 0;
b = b->next;
if (!b || b->type != TYPEAPPLICATION || !b->subtype ||
- (ascii_strcasecmp(b->subtype, "octet-stream") != 0))
+ (mutt_strcasecmp(b->subtype, "octet-stream") != 0))
return 0;
b = b->next;
if (m->type == TYPEAPPLICATION)
{
- if ((ascii_strcasecmp(m->subtype, "pgp") == 0) ||
- (ascii_strcasecmp(m->subtype, "x-pgp-message") == 0))
+ if ((mutt_strcasecmp(m->subtype, "pgp") == 0) ||
+ (mutt_strcasecmp(m->subtype, "x-pgp-message") == 0))
{
if ((p = mutt_get_parameter("x-action", m->parameter)) &&
- ((ascii_strcasecmp(p, "sign") == 0) ||
- (ascii_strcasecmp(p, "signclear") == 0)))
+ ((mutt_strcasecmp(p, "sign") == 0) ||
+ (mutt_strcasecmp(p, "signclear") == 0)))
t |= PGPSIGN;
if ((p = mutt_get_parameter("format", m->parameter)) &&
- (ascii_strcasecmp(p, "keys-only") == 0))
+ (mutt_strcasecmp(p, "keys-only") == 0))
t |= PGPKEY;
if (!t)
t |= PGPENCRYPT; /* not necessarily correct, but... */
}
- if (ascii_strcasecmp(m->subtype, "pgp-signed") == 0)
+ if (mutt_strcasecmp(m->subtype, "pgp-signed") == 0)
t |= PGPSIGN;
- if (ascii_strcasecmp(m->subtype, "pgp-keys") == 0)
+ if (mutt_strcasecmp(m->subtype, "pgp-keys") == 0)
t |= PGPKEY;
}
- else if (m->type == TYPETEXT && (ascii_strcasecmp("plain", m->subtype) == 0))
+ else if (m->type == TYPETEXT && (mutt_strcasecmp("plain", m->subtype) == 0))
{
if (((p = mutt_get_parameter("x-mutt-action", m->parameter)) ||
(p = mutt_get_parameter("x-action", m->parameter)) ||
(p = mutt_get_parameter("action", m->parameter))) &&
- (ascii_strncasecmp("pgp-sign", p, 8) == 0))
+ (mutt_strncasecmp("pgp-sign", p, 8) == 0))
t |= PGPSIGN;
- else if (p && (ascii_strncasecmp("pgp-encrypt", p, 11) == 0))
+ else if (p && (mutt_strncasecmp("pgp-encrypt", p, 11) == 0))
t |= PGPENCRYPT;
- else if (p && (ascii_strncasecmp("pgp-keys", p, 7) == 0))
+ else if (p && (mutt_strncasecmp("pgp-keys", p, 7) == 0))
t |= PGPKEY;
}
if (t)
if ((m->type & TYPEAPPLICATION) && m->subtype)
{
/* S/MIME MIME types don't need x- anymore, see RFC2311 */
- if ((ascii_strcasecmp(m->subtype, "x-pkcs7-mime") == 0) ||
- (ascii_strcasecmp(m->subtype, "pkcs7-mime") == 0))
+ if ((mutt_strcasecmp(m->subtype, "x-pkcs7-mime") == 0) ||
+ (mutt_strcasecmp(m->subtype, "pkcs7-mime") == 0))
{
if ((t = mutt_get_parameter("smime-type", m->parameter)))
{
- if (ascii_strcasecmp(t, "enveloped-data") == 0)
+ if (mutt_strcasecmp(t, "enveloped-data") == 0)
return SMIMEENCRYPT;
- else if (ascii_strcasecmp(t, "signed-data") == 0)
+ else if (mutt_strcasecmp(t, "signed-data") == 0)
return (SMIMESIGN | SMIMEOPAQUE);
else
return 0;
* Content-Description: S/MIME Encrypted Message
* instead of Content-Type parameter
*/
- if (ascii_strcasecmp(m->description, "S/MIME Encrypted Message") == 0)
+ if (mutt_strcasecmp(m->description, "S/MIME Encrypted Message") == 0)
return SMIMEENCRYPT;
complain = true;
}
- else if (ascii_strcasecmp(m->subtype, "octet-stream") != 0)
+ else if (mutt_strcasecmp(m->subtype, "octet-stream") != 0)
return 0;
t = mutt_get_parameter("name", m->parameter);
if (len > 0 && *(t + len) == '.')
{
len++;
- if (ascii_strcasecmp((t + len), "p7m") == 0)
+ if (mutt_strcasecmp((t + len), "p7m") == 0)
/* Not sure if this is the correct thing to do, but
it's required for compatibility with Outlook */
return (SMIMESIGN | SMIMEOPAQUE);
- else if (ascii_strcasecmp((t + len), "p7s") == 0)
+ else if (mutt_strcasecmp((t + len), "p7s") == 0)
return (SMIMESIGN | SMIMEOPAQUE);
}
}
convert_to_7bit(a->parts);
}
else if (a->type == TYPEMESSAGE &&
- (ascii_strcasecmp(a->subtype, "delivery-status") != 0))
+ (mutt_strcasecmp(a->subtype, "delivery-status") != 0))
{
if (a->encoding != ENC7BIT)
mutt_message_to_7bit(a, NULL);
{
case SIGN:
if (a->next->type != TYPEMULTIPART ||
- (ascii_strcasecmp(a->next->subtype, "mixed") != 0))
+ (mutt_strcasecmp(a->next->subtype, "mixed") != 0))
inconsistent = true;
break;
case PGPSIGN:
if (a->next->type != TYPEAPPLICATION ||
- (ascii_strcasecmp(a->next->subtype, "pgp-signature") != 0))
+ (mutt_strcasecmp(a->next->subtype, "pgp-signature") != 0))
inconsistent = true;
break;
case SMIMESIGN:
if (a->next->type != TYPEAPPLICATION ||
- ((ascii_strcasecmp(a->next->subtype, "x-pkcs7-signature") != 0) &&
- (ascii_strcasecmp(a->next->subtype, "pkcs7-signature") != 0)))
+ ((mutt_strcasecmp(a->next->subtype, "x-pkcs7-signature") != 0) &&
+ (mutt_strcasecmp(a->next->subtype, "pkcs7-signature") != 0)))
inconsistent = true;
break;
default:
for (i = 0; i < sigcnt; i++)
{
if ((WithCrypto & APPLICATION_PGP) && signatures[i]->type == TYPEAPPLICATION &&
- (ascii_strcasecmp(signatures[i]->subtype, "pgp-signature") == 0))
+ (mutt_strcasecmp(signatures[i]->subtype, "pgp-signature") == 0))
{
if (crypt_pgp_verify_one(signatures[i], s, tempfile) != 0)
goodsig = false;
}
if ((WithCrypto & APPLICATION_SMIME) && signatures[i]->type == TYPEAPPLICATION &&
- ((ascii_strcasecmp(signatures[i]->subtype, "x-pkcs7-signature") == 0) ||
- (ascii_strcasecmp(signatures[i]->subtype, "pkcs7-signature") == 0)))
+ ((mutt_strcasecmp(signatures[i]->subtype, "x-pkcs7-signature") == 0) ||
+ (mutt_strcasecmp(signatures[i]->subtype, "pkcs7-signature") == 0)))
{
if (crypt_smime_verify_one(signatures[i], s, tempfile) != 0)
goodsig = false;
return outfile;
}
+static void strlower(char *s)
+{
+ for (; *s; ++s)
+ *s = tolower(*s);
+}
+
/**
* get_micalg - Find the "micalg" parameter from the last GPGME operation
*
{
/* convert GPGME raw hash name to RFC2633 format */
snprintf(buf, buflen, "%s", algorithm_name);
- ascii_strlower(buf);
+ strlower(buf);
}
else
{
/* convert GPGME raw hash name to RFC3156 format */
snprintf(buf, buflen, "pgp-%s", algorithm_name);
- ascii_strlower(buf + 4);
+ strlower(buf + 4);
}
}
}
if (a->type != TYPETEXT)
return NULL;
- if (ascii_strcasecmp(a->subtype, "plain") != 0)
+ if (mutt_strcasecmp(a->subtype, "plain") != 0)
return NULL;
if ((fp = fopen(a->filename, "r")) == NULL)
rewind(smimeerr);
line = mutt_read_line(line, &linelen, smimeerr, &lineno, 0);
- if (linelen && (ascii_strcasecmp(line, "verification successful") == 0))
+ if (linelen && (mutt_strcasecmp(line, "verification successful") == 0))
badsig = 0;
FREE(&line);
rewind(smimeerr);
line = mutt_read_line(line, &linelen, smimeerr, &lineno, 0);
- if (linelen && (ascii_strcasecmp(line, "verification successful") == 0))
+ if (linelen && (mutt_strcasecmp(line, "verification successful") == 0))
m->goodsig = true;
FREE(&line);
}
char *mutt_get_parameter(const char *s, struct Parameter *p)
{
for (; p; p = p->next)
- if (ascii_strcasecmp(s, p->attribute) == 0)
+ if (mutt_strcasecmp(s, p->attribute) == 0)
return p->value;
return NULL;
for (q = *p; q; q = q->next)
{
- if (ascii_strcasecmp(attribute, q->attribute) == 0)
+ if (mutt_strcasecmp(attribute, q->attribute) == 0)
{
mutt_str_replace(&q->value, value);
return;
for (q = *p; q; p = &q->next, q = q->next)
{
- if (ascii_strcasecmp(attribute, q->attribute) == 0)
+ if (mutt_strcasecmp(attribute, q->attribute) == 0)
{
*p = q->next;
q->next = NULL;
int mutt_check_encoding(const char *c)
{
- if (ascii_strncasecmp("7bit", c, sizeof("7bit") - 1) == 0)
+ if (mutt_strncasecmp("7bit", c, sizeof("7bit") - 1) == 0)
return ENC7BIT;
- else if (ascii_strncasecmp("8bit", c, sizeof("8bit") - 1) == 0)
+ else if (mutt_strncasecmp("8bit", c, sizeof("8bit") - 1) == 0)
return ENC8BIT;
- else if (ascii_strncasecmp("binary", c, sizeof("binary") - 1) == 0)
+ else if (mutt_strncasecmp("binary", c, sizeof("binary") - 1) == 0)
return ENCBINARY;
- else if (ascii_strncasecmp("quoted-printable", c, sizeof("quoted-printable") - 1) == 0)
+ else if (mutt_strncasecmp("quoted-printable", c, sizeof("quoted-printable") - 1) == 0)
return ENCQUOTEDPRINTABLE;
- else if (ascii_strncasecmp("base64", c, sizeof("base64") - 1) == 0)
+ else if (mutt_strncasecmp("base64", c, sizeof("base64") - 1) == 0)
return ENCBASE64;
- else if (ascii_strncasecmp("x-uuencode", c, sizeof("x-uuencode") - 1) == 0)
+ else if (mutt_strncasecmp("x-uuencode", c, sizeof("x-uuencode") - 1) == 0)
return ENCUUENCODED;
#ifdef SUN_ATTACHMENT
- else if (ascii_strncasecmp("uuencode", c, sizeof("uuencode") - 1) == 0)
+ else if (mutt_strncasecmp("uuencode", c, sizeof("uuencode") - 1) == 0)
return ENCUUENCODED;
#endif
else
int mutt_check_mime_type(const char *s)
{
- if (ascii_strcasecmp("text", s) == 0)
+ if (mutt_strcasecmp("text", s) == 0)
return TYPETEXT;
- else if (ascii_strcasecmp("multipart", s) == 0)
+ else if (mutt_strcasecmp("multipart", s) == 0)
return TYPEMULTIPART;
#ifdef SUN_ATTACHMENT
- else if (ascii_strcasecmp("x-sun-attachment", s) == 0)
+ else if (mutt_strcasecmp("x-sun-attachment", s) == 0)
return TYPEMULTIPART;
#endif
- else if (ascii_strcasecmp("application", s) == 0)
+ else if (mutt_strcasecmp("application", s) == 0)
return TYPEAPPLICATION;
- else if (ascii_strcasecmp("message", s) == 0)
+ else if (mutt_strcasecmp("message", s) == 0)
return TYPEMESSAGE;
- else if (ascii_strcasecmp("image", s) == 0)
+ else if (mutt_strcasecmp("image", s) == 0)
return TYPEIMAGE;
- else if (ascii_strcasecmp("audio", s) == 0)
+ else if (mutt_strcasecmp("audio", s) == 0)
return TYPEAUDIO;
- else if (ascii_strcasecmp("video", s) == 0)
+ else if (mutt_strcasecmp("video", s) == 0)
return TYPEVIDEO;
- else if (ascii_strcasecmp("model", s) == 0)
+ else if (mutt_strcasecmp("model", s) == 0)
return TYPEMODEL;
- else if (ascii_strcasecmp("*", s) == 0)
+ else if (mutt_strcasecmp("*", s) == 0)
return TYPEANY;
- else if (ascii_strcasecmp(".*", s) == 0)
+ else if (mutt_strcasecmp(".*", s) == 0)
return TYPEANY;
else
return TYPEOTHER;
ct->type = mutt_check_mime_type(s);
#ifdef SUN_ATTACHMENT
- if (ascii_strcasecmp("x-sun-attachment", s) == 0)
+ if (mutt_strcasecmp("x-sun-attachment", s) == 0)
ct->subtype = safe_strdup("x-sun-attachment");
#endif
{
struct Parameter *parms = NULL;
- if (ascii_strncasecmp("inline", s, 6) == 0)
+ if (mutt_strncasecmp("inline", s, 6) == 0)
ct->disposition = DISPINLINE;
- else if (ascii_strncasecmp("form-data", s, 9) == 0)
+ else if (mutt_strncasecmp("form-data", s, 9) == 0)
ct->disposition = DISPFORMDATA;
else
ct->disposition = DISPATTACH;
break;
}
- if (ascii_strncasecmp("content-", line, 8) == 0)
+ if (mutt_strncasecmp("content-", line, 8) == 0)
{
- if (ascii_strcasecmp("type", line + 8) == 0)
+ if (mutt_strcasecmp("type", line + 8) == 0)
mutt_parse_content_type(c, p);
- else if (ascii_strcasecmp("transfer-encoding", line + 8) == 0)
+ else if (mutt_strcasecmp("transfer-encoding", line + 8) == 0)
p->encoding = mutt_check_encoding(c);
- else if (ascii_strcasecmp("disposition", line + 8) == 0)
+ else if (mutt_strcasecmp("disposition", line + 8) == 0)
parse_content_disposition(c, p);
- else if (ascii_strcasecmp("description", line + 8) == 0)
+ else if (mutt_strcasecmp("description", line + 8) == 0)
{
mutt_str_replace(&p->description, c);
rfc2047_decode(&p->description);
}
}
#ifdef SUN_ATTACHMENT
- else if (ascii_strncasecmp("x-sun-", line, 6) == 0)
+ else if (mutt_strncasecmp("x-sun-", line, 6) == 0)
{
- if (ascii_strcasecmp("data-type", line + 6) == 0)
+ if (mutt_strcasecmp("data-type", line + 6) == 0)
mutt_parse_content_type(c, p);
- else if (ascii_strcasecmp("encoding-info", line + 6) == 0)
+ else if (mutt_strcasecmp("encoding-info", line + 6) == 0)
p->encoding = mutt_check_encoding(c);
- else if (ascii_strcasecmp("content-lines", line + 6) == 0)
+ else if (mutt_strcasecmp("content-lines", line + 6) == 0)
mutt_set_parameter("content-lines", c, &(p->parameter));
- else if (ascii_strcasecmp("data-description", line + 6) == 0)
+ else if (mutt_strcasecmp("data-description", line + 6) == 0)
{
mutt_str_replace(&p->description, c);
rfc2047_decode(&p->description);
{
case TYPEMULTIPART:
#ifdef SUN_ATTACHMENT
- if (ascii_strcasecmp(b->subtype, "x-sun-attachment") == 0)
+ if (mutt_strcasecmp(b->subtype, "x-sun-attachment") == 0)
bound = "--------";
else
#endif
fseeko(fp, b->offset, SEEK_SET);
b->parts = mutt_parse_multipart(fp, bound, b->offset + b->length,
- (ascii_strcasecmp("digest", b->subtype) == 0));
+ (mutt_strcasecmp("digest", b->subtype) == 0));
break;
case TYPEMESSAGE:
fseeko(fp, b->offset, SEEK_SET);
if (mutt_is_message_type(b->type, b->subtype))
b->parts = mutt_parse_message_rfc822(fp, b);
- else if (ascii_strcasecmp(b->subtype, "external-body") == 0)
+ else if (mutt_strcasecmp(b->subtype, "external-body") == 0)
b->parts = mutt_read_mime_header(fp, 0);
else
return;
struct Tz *tz = NULL;
tz = bsearch(ptz, TimeZones, sizeof(TimeZones) / sizeof(struct Tz),
- sizeof(struct Tz), (int (*)(const void *, const void *)) ascii_strcasecmp
+ sizeof(struct Tz), (int (*)(const void *, const void *)) mutt_strcasecmp
/* This is safe to do: A pointer to a struct equals
* a pointer to its first element */);
}
/* ad hoc support for the European MET (now officially CET) TZ */
- if (ascii_strcasecmp(t, "MET") == 0)
+ if (mutt_strcasecmp(t, "MET") == 0)
{
if ((t = strtok(NULL, " \t")) != NULL)
{
- if (ascii_strcasecmp(t, "DST") == 0)
+ if (mutt_strcasecmp(t, "DST") == 0)
zhours++;
}
}
switch (tolower(line[0]))
{
case 'a':
- if (ascii_strcasecmp(line + 1, "pparently-to") == 0)
+ if (mutt_strcasecmp(line + 1, "pparently-to") == 0)
{
e->to = rfc822_parse_adrlist(e->to, p);
matched = 1;
}
- else if (ascii_strcasecmp(line + 1, "pparently-from") == 0)
+ else if (mutt_strcasecmp(line + 1, "pparently-from") == 0)
{
e->from = rfc822_parse_adrlist(e->from, p);
matched = 1;
break;
case 'b':
- if (ascii_strcasecmp(line + 1, "cc") == 0)
+ if (mutt_strcasecmp(line + 1, "cc") == 0)
{
e->bcc = rfc822_parse_adrlist(e->bcc, p);
matched = 1;
break;
case 'c':
- if (ascii_strcasecmp(line + 1, "c") == 0)
+ if (mutt_strcasecmp(line + 1, "c") == 0)
{
e->cc = rfc822_parse_adrlist(e->cc, p);
matched = 1;
}
- else if (ascii_strncasecmp(line + 1, "ontent-", 7) == 0)
+ else if (mutt_strncasecmp(line + 1, "ontent-", 7) == 0)
{
- if (ascii_strcasecmp(line + 8, "type") == 0)
+ if (mutt_strcasecmp(line + 8, "type") == 0)
{
if (hdr)
mutt_parse_content_type(p, hdr->content);
matched = 1;
}
- else if (ascii_strcasecmp(line + 8, "transfer-encoding") == 0)
+ else if (mutt_strcasecmp(line + 8, "transfer-encoding") == 0)
{
if (hdr)
hdr->content->encoding = mutt_check_encoding(p);
matched = 1;
}
- else if (ascii_strcasecmp(line + 8, "length") == 0)
+ else if (mutt_strcasecmp(line + 8, "length") == 0)
{
if (hdr)
{
}
matched = 1;
}
- else if (ascii_strcasecmp(line + 8, "description") == 0)
+ else if (mutt_strcasecmp(line + 8, "description") == 0)
{
if (hdr)
{
}
matched = 1;
}
- else if (ascii_strcasecmp(line + 8, "disposition") == 0)
+ else if (mutt_strcasecmp(line + 8, "disposition") == 0)
{
if (hdr)
parse_content_disposition(p, hdr->content);
break;
case 'd':
- if (ascii_strcasecmp("ate", line + 1) == 0)
+ if (mutt_strcasecmp("ate", line + 1) == 0)
{
mutt_str_replace(&e->date, p);
if (hdr)
break;
case 'e':
- if ((ascii_strcasecmp("xpires", line + 1) == 0) && hdr &&
+ if ((mutt_strcasecmp("xpires", line + 1) == 0) && hdr &&
mutt_parse_date(p, NULL) < time(NULL))
hdr->expired = true;
break;
case 'f':
- if (ascii_strcasecmp("rom", line + 1) == 0)
+ if (mutt_strcasecmp("rom", line + 1) == 0)
{
e->from = rfc822_parse_adrlist(e->from, p);
matched = 1;
}
#ifdef USE_NNTP
- else if (ascii_strcasecmp(line + 1, "ollowup-to") == 0)
+ else if (mutt_strcasecmp(line + 1, "ollowup-to") == 0)
{
if (!e->followup_to)
{
break;
case 'i':
- if (ascii_strcasecmp(line + 1, "n-reply-to") == 0)
+ if (mutt_strcasecmp(line + 1, "n-reply-to") == 0)
{
mutt_free_list(&e->in_reply_to);
e->in_reply_to = parse_references(p, 1);
break;
case 'l':
- if (ascii_strcasecmp(line + 1, "ines") == 0)
+ if (mutt_strcasecmp(line + 1, "ines") == 0)
{
if (hdr)
{
matched = 1;
}
- else if (ascii_strcasecmp(line + 1, "ist-Post") == 0)
+ else if (mutt_strcasecmp(line + 1, "ist-Post") == 0)
{
/* RFC2369. FIXME: We should ignore whitespace, but don't. */
if (strncmp(p, "NO", 2) != 0)
break;
case 'm':
- if (ascii_strcasecmp(line + 1, "ime-version") == 0)
+ if (mutt_strcasecmp(line + 1, "ime-version") == 0)
{
if (hdr)
hdr->mime = true;
matched = 1;
}
- else if (ascii_strcasecmp(line + 1, "essage-id") == 0)
+ else if (mutt_strcasecmp(line + 1, "essage-id") == 0)
{
/* We add a new "Message-ID:" when building a message */
FREE(&e->message_id);
e->message_id = mutt_extract_message_id(p, NULL);
matched = 1;
}
- else if (ascii_strncasecmp(line + 1, "ail-", 4) == 0)
+ else if (mutt_strncasecmp(line + 1, "ail-", 4) == 0)
{
- if (ascii_strcasecmp(line + 5, "reply-to") == 0)
+ if (mutt_strcasecmp(line + 5, "reply-to") == 0)
{
/* override the Reply-To: field */
rfc822_free_address(&e->reply_to);
e->reply_to = rfc822_parse_adrlist(e->reply_to, p);
matched = 1;
}
- else if (ascii_strcasecmp(line + 5, "followup-to") == 0)
+ else if (mutt_strcasecmp(line + 5, "followup-to") == 0)
{
e->mail_followup_to = rfc822_parse_adrlist(e->mail_followup_to, p);
matched = 1;
#ifdef USE_NNTP
case 'n':
- if (ascii_strcasecmp(line + 1, "ewsgroups") == 0)
+ if (mutt_strcasecmp(line + 1, "ewsgroups") == 0)
{
FREE(&e->newsgroups);
mutt_remove_trailing_ws(p);
case 'o':
/* field `Organization:' saves only for pager! */
- if (ascii_strcasecmp(line + 1, "rganization") == 0)
+ if (mutt_strcasecmp(line + 1, "rganization") == 0)
{
- if (!e->organization && (ascii_strcasecmp(p, "unknown") != 0))
+ if (!e->organization && (mutt_strcasecmp(p, "unknown") != 0))
e->organization = safe_strdup(p);
}
break;
case 'r':
- if (ascii_strcasecmp(line + 1, "eferences") == 0)
+ if (mutt_strcasecmp(line + 1, "eferences") == 0)
{
mutt_free_list(&e->references);
e->references = parse_references(p, 0);
matched = 1;
}
- else if (ascii_strcasecmp(line + 1, "eply-to") == 0)
+ else if (mutt_strcasecmp(line + 1, "eply-to") == 0)
{
e->reply_to = rfc822_parse_adrlist(e->reply_to, p);
matched = 1;
}
- else if (ascii_strcasecmp(line + 1, "eturn-path") == 0)
+ else if (mutt_strcasecmp(line + 1, "eturn-path") == 0)
{
e->return_path = rfc822_parse_adrlist(e->return_path, p);
matched = 1;
}
- else if (ascii_strcasecmp(line + 1, "eceived") == 0)
+ else if (mutt_strcasecmp(line + 1, "eceived") == 0)
{
if (hdr && !hdr->received)
{
break;
case 's':
- if (ascii_strcasecmp(line + 1, "ubject") == 0)
+ if (mutt_strcasecmp(line + 1, "ubject") == 0)
{
if (!e->subject)
e->subject = safe_strdup(p);
matched = 1;
}
- else if (ascii_strcasecmp(line + 1, "ender") == 0)
+ else if (mutt_strcasecmp(line + 1, "ender") == 0)
{
e->sender = rfc822_parse_adrlist(e->sender, p);
matched = 1;
}
- else if (ascii_strcasecmp(line + 1, "tatus") == 0)
+ else if (mutt_strcasecmp(line + 1, "tatus") == 0)
{
if (hdr)
{
}
matched = 1;
}
- else if (((ascii_strcasecmp("upersedes", line + 1) == 0) ||
- (ascii_strcasecmp("upercedes", line + 1) == 0)) &&
+ else if (((mutt_strcasecmp("upersedes", line + 1) == 0) ||
+ (mutt_strcasecmp("upercedes", line + 1) == 0)) &&
hdr)
{
FREE(&e->supersedes);
break;
case 't':
- if (ascii_strcasecmp(line + 1, "o") == 0)
+ if (mutt_strcasecmp(line + 1, "o") == 0)
{
e->to = rfc822_parse_adrlist(e->to, p);
matched = 1;
break;
case 'x':
- if (ascii_strcasecmp(line + 1, "-status") == 0)
+ if (mutt_strcasecmp(line + 1, "-status") == 0)
{
if (hdr)
{
}
matched = 1;
}
- else if (ascii_strcasecmp(line + 1, "-label") == 0)
+ else if (mutt_strcasecmp(line + 1, "-label") == 0)
{
FREE(&e->x_label);
e->x_label = safe_strdup(p);
matched = 1;
}
#ifdef USE_NNTP
- else if (ascii_strcasecmp(line + 1, "-comment-to") == 0)
+ else if (mutt_strcasecmp(line + 1, "-comment-to") == 0)
{
if (!e->x_comment_to)
e->x_comment_to = safe_strdup(p);
matched = 1;
}
- else if (ascii_strcasecmp(line + 1, "ref") == 0)
+ else if (mutt_strcasecmp(line + 1, "ref") == 0)
{
if (!e->xref)
e->xref = safe_strdup(p);
matched = 1;
}
#endif
- else if (ascii_strcasecmp(line + 1, "-original-to") == 0)
+ else if (mutt_strcasecmp(line + 1, "-original-to") == 0)
{
e->x_original_to = rfc822_parse_adrlist(e->x_original_to, p);
matched = 1;
shallrecurse = true;
/* If it's an external body pointer, don't recurse it. */
- if (ascii_strcasecmp(bp->subtype, "external-body") == 0)
+ if (mutt_strcasecmp(bp->subtype, "external-body") == 0)
shallrecurse = false;
/* Don't count containers if they're top-level. */
{
/* Always recurse multiparts, except multipart/alternative. */
shallrecurse = true;
- if (ascii_strcasecmp(bp->subtype, "alternative") == 0)
+ if (mutt_strcasecmp(bp->subtype, "alternative") == 0)
shallrecurse = false;
/* Don't count containers if they're top-level. */
}
}
- /* XXX - is ascii_strcasecmp() right here, or should we use locale's
+ /* XXX - is mutt_strcasecmp() right here, or should we use locale's
* equivalences?
*/
if (do_simple) /* yup, so spoof a real request */
{
/* convert old tokens into the new format */
- if ((ascii_strcasecmp("all", s) == 0) || (mutt_strcmp("^", s) == 0) ||
+ if ((mutt_strcasecmp("all", s) == 0) || (mutt_strcmp("^", s) == 0) ||
(mutt_strcmp(".", s) == 0)) /* ~A is more efficient */
strfcpy(s, "~A", len);
- else if (ascii_strcasecmp("del", s) == 0)
+ else if (mutt_strcasecmp("del", s) == 0)
strfcpy(s, "~D", len);
- else if (ascii_strcasecmp("flag", s) == 0)
+ else if (mutt_strcasecmp("flag", s) == 0)
strfcpy(s, "~F", len);
- else if (ascii_strcasecmp("new", s) == 0)
+ else if (mutt_strcasecmp("new", s) == 0)
strfcpy(s, "~N", len);
- else if (ascii_strcasecmp("old", s) == 0)
+ else if (mutt_strcasecmp("old", s) == 0)
strfcpy(s, "~O", len);
- else if (ascii_strcasecmp("repl", s) == 0)
+ else if (mutt_strcasecmp("repl", s) == 0)
strfcpy(s, "~Q", len);
- else if (ascii_strcasecmp("read", s) == 0)
+ else if (mutt_strcasecmp("read", s) == 0)
strfcpy(s, "~R", len);
- else if (ascii_strcasecmp("tag", s) == 0)
+ else if (mutt_strcasecmp("tag", s) == 0)
strfcpy(s, "~T", len);
- else if (ascii_strcasecmp("unread", s) == 0)
+ else if (mutt_strcasecmp("unread", s) == 0)
strfcpy(s, "~U", len);
else
{
init.c
keymap.c
keymap_alldefs.h
-lib/ascii.c
lib/base64.c
lib/buffer.c
lib/date.c
while (authenticator->authenticate)
{
- if (!authenticator->method || (ascii_strcasecmp(authenticator->method, method) == 0))
+ if (!authenticator->method || (mutt_strcasecmp(authenticator->method, method) == 0))
{
ret = authenticator->authenticate(pop_data, method);
if (ret == POP_A_SOCKET)
struct PopData *pop_data = (struct PopData *) data;
char *c = NULL;
- if (ascii_strncasecmp(line, "SASL", 4) == 0)
+ if (mutt_strncasecmp(line, "SASL", 4) == 0)
{
FREE(&pop_data->auth_list);
c = skip_email_wsp(line + 4);
pop_data->auth_list = safe_strdup(c);
}
- else if (ascii_strncasecmp(line, "STLS", 4) == 0)
+ else if (mutt_strncasecmp(line, "STLS", 4) == 0)
pop_data->cmd_stls = true;
- else if (ascii_strncasecmp(line, "USER", 4) == 0)
+ else if (mutt_strncasecmp(line, "USER", 4) == 0)
pop_data->cmd_user = 1;
- else if (ascii_strncasecmp(line, "UIDL", 4) == 0)
+ else if (mutt_strncasecmp(line, "UIDL", 4) == 0)
pop_data->cmd_uidl = 1;
- else if (ascii_strncasecmp(line, "TOP", 3) == 0)
+ else if (mutt_strncasecmp(line, "TOP", 3) == 0)
pop_data->cmd_top = 1;
return 0;
for (tmp = hdr->env->userhdrs; tmp;)
{
- if (ascii_strncasecmp("X-Mutt-References:", tmp->data, 18) == 0)
+ if (mutt_strncasecmp("X-Mutt-References:", tmp->data, 18) == 0)
{
if (ctx)
{
if (*cur)
code |= SENDREPLY;
}
- else if (ascii_strncasecmp("X-Mutt-Fcc:", tmp->data, 11) == 0)
+ else if (mutt_strncasecmp("X-Mutt-Fcc:", tmp->data, 11) == 0)
{
p = skip_email_wsp(tmp->data + 11);
strfcpy(fcc, p, fcclen);
{
newhdr->security |= SIGN;
if ((WithCrypto & APPLICATION_PGP) &&
- (ascii_strcasecmp(mutt_get_parameter("protocol", newhdr->content->parameter),
+ (mutt_strcasecmp(mutt_get_parameter("protocol", newhdr->content->parameter),
"application/pgp-signature") == 0))
newhdr->security |= APPLICATION_PGP;
else if ((WithCrypto & APPLICATION_SMIME))
if (b->type == TYPETEXT)
{
- if (ascii_strcasecmp("yes", mutt_get_parameter("x-mutt-noconv", b->parameter)) == 0)
+ if (mutt_strcasecmp("yes", mutt_get_parameter("x-mutt-noconv", b->parameter)) == 0)
b->noconv = true;
else
{
}
if (m->type == TYPEMULTIPART && m->parts &&
- (compose || (parent_type == -1 && (ascii_strcasecmp("alternative", m->subtype) != 0))) &&
+ (compose || (parent_type == -1 && (mutt_strcasecmp("alternative", m->subtype) != 0))) &&
(!(WithCrypto & APPLICATION_PGP) || !mutt_is_multipart_encrypted(m)))
{
idx = mutt_gen_attach_list(m->parts, m->type, idx, idxlen, idxmax, level, compose);
return false;
subtype = NONULL(subtype);
- return ((ascii_strcasecmp(subtype, "rfc822") == 0) ||
- (ascii_strcasecmp(subtype, "news") == 0));
+ return ((mutt_strcasecmp(subtype, "rfc822") == 0) ||
+ (mutt_strcasecmp(subtype, "news") == 0));
}
static void prepend_curdir(char *dst, size_t dstlen)
{
if (!rfc1524_mailcap_lookup(top, type, NULL, MUTT_PRINT))
{
- if ((ascii_strcasecmp("text/plain", top->subtype) != 0) &&
- (ascii_strcasecmp("application/postscript", top->subtype) != 0))
+ if ((mutt_strcasecmp("text/plain", top->subtype) != 0) &&
+ (mutt_strcasecmp("application/postscript", top->subtype) != 0))
{
if (!mutt_can_decode(top))
{
snprintf(type, sizeof(type), "%s/%s", TYPE(top), top->subtype);
if (!option(OPT_ATTACH_SPLIT) && !rfc1524_mailcap_lookup(top, type, NULL, MUTT_PRINT))
{
- if ((ascii_strcasecmp("text/plain", top->subtype) == 0) ||
- (ascii_strcasecmp("application/postscript", top->subtype) == 0))
+ if ((mutt_strcasecmp("text/plain", top->subtype) == 0) ||
+ (mutt_strcasecmp("application/postscript", top->subtype) == 0))
pipe_attachment(fp, top, state);
else if (mutt_can_decode(top))
{
{
i = init || b->collapsed;
if (i && option(OPT_DIGEST_COLLAPSE) && b->type == TYPEMULTIPART &&
- (ascii_strcasecmp(b->subtype, "digest") == 0))
+ (mutt_strcasecmp(b->subtype, "digest") == 0))
attach_collapse(b->parts, 1, 1, 0);
else if (b->type == TYPEMULTIPART || mutt_is_message_type(b->type, b->subtype))
attach_collapse(b->parts, collapse, i, 0);
if (chain->cl >= MAXMIXES)
return -1;
- if ((mutt_strcmp(s, "0") == 0) || (ascii_strcasecmp(s, "<random>") == 0))
+ if ((mutt_strcmp(s, "0") == 0) || (mutt_strcasecmp(s, "<random>") == 0))
{
chain->ch[chain->cl++] = 0;
return 0;
for (i = 0; type2_list[i]; i++)
{
- if (ascii_strcasecmp(s, type2_list[i]->shortname) == 0)
+ if (mutt_strcasecmp(s, type2_list[i]->shortname) == 0)
{
chain->ch[chain->cl++] = i;
return 0;
/* check type */
ch = get_field(buf);
- if ((ascii_strcasecmp(buf, type) != 0) &&
- ((ascii_strncasecmp(buf, type, btlen) != 0) ||
+ if ((mutt_strcasecmp(buf, type) != 0) &&
+ ((mutt_strncasecmp(buf, type, btlen) != 0) ||
(buf[btlen] != 0 && /* implicit wild */
(mutt_strcmp(buf + btlen, "/*") != 0)))) /* wildsubtype */
continue;
ch = get_field(ch);
mutt_debug(2, "field: %s\n", field);
- if (ascii_strcasecmp(field, "needsterminal") == 0)
+ if (mutt_strcasecmp(field, "needsterminal") == 0)
{
if (entry)
entry->needsterminal = true;
}
- else if (ascii_strcasecmp(field, "copiousoutput") == 0)
+ else if (mutt_strcasecmp(field, "copiousoutput") == 0)
{
copiousoutput = true;
if (entry)
entry->copiousoutput = true;
}
- else if (ascii_strncasecmp(field, "composetyped", 12) == 0)
+ else if (mutt_strncasecmp(field, "composetyped", 12) == 0)
{
/* this compare most occur before compose to match correctly */
if (get_field_text(field + 12, entry ? &entry->composetypecommand : NULL,
type, filename, line))
composecommand = true;
}
- else if (ascii_strncasecmp(field, "compose", 7) == 0)
+ else if (mutt_strncasecmp(field, "compose", 7) == 0)
{
if (get_field_text(field + 7, entry ? &entry->composecommand : NULL,
type, filename, line))
composecommand = true;
}
- else if (ascii_strncasecmp(field, "print", 5) == 0)
+ else if (mutt_strncasecmp(field, "print", 5) == 0)
{
if (get_field_text(field + 5, entry ? &entry->printcommand : NULL,
type, filename, line))
printcommand = true;
}
- else if (ascii_strncasecmp(field, "edit", 4) == 0)
+ else if (mutt_strncasecmp(field, "edit", 4) == 0)
{
if (get_field_text(field + 4, entry ? &entry->editcommand : NULL, type, filename, line))
editcommand = true;
}
- else if (ascii_strncasecmp(field, "nametemplate", 12) == 0)
+ else if (mutt_strncasecmp(field, "nametemplate", 12) == 0)
{
get_field_text(field + 12, entry ? &entry->nametemplate : NULL, type,
filename, line);
}
- else if (ascii_strncasecmp(field, "x-convert", 9) == 0)
+ else if (mutt_strncasecmp(field, "x-convert", 9) == 0)
{
get_field_text(field + 9, entry ? &entry->convert : NULL, type, filename, line);
}
- else if (ascii_strncasecmp(field, "test", 4) == 0)
+ else if (mutt_strncasecmp(field, "test", 4) == 0)
{
/*
* This routine executes the given test command to determine
len_q = len + (ob - buf1) + 2 * count;
/* Apparently RFC1468 says to use B encoding for iso-2022-jp. */
- if (ascii_strcasecmp(tocode, "ISO-2022-JP") == 0)
+ if (mutt_strcasecmp(tocode, "ISO-2022-JP") == 0)
len_q = ENCWORD_LEN_MAX + 1;
if (len_b < len_q && len_b <= ENCWORD_LEN_MAX)
const char *tocode, encoder_t *encoder, size_t *wlen)
{
size_t n, nn;
- int utf8 = fromcode && (ascii_strcasecmp(fromcode, "utf-8") == 0);
+ int utf8 = fromcode && (mutt_strcasecmp(fromcode, "utf-8") == 0);
n = dlen;
for (;;)
/* respect DelSp of RfC3676 only with f=f parts */
if ((t = (char *) mutt_get_parameter("delsp", a->parameter)))
{
- delsp = mutt_strlen(t) == 3 && (ascii_strncasecmp(t, "yes", 3) == 0);
+ delsp = mutt_strlen(t) == 3 && (mutt_strncasecmp(t, "yes", 3) == 0);
t = NULL;
fst.delsp = 1;
}
last = NULL;
while (p)
{
- if (ascii_strcasecmp(mailbox, p->mailbox) == 0)
+ if (mutt_strcasecmp(mailbox, p->mailbox) == 0)
{
if (last)
last->next = p->next;
{
if (!a->mailbox || !b->mailbox)
return false;
- if (ascii_strcasecmp(a->mailbox, b->mailbox) != 0)
+ if (mutt_strcasecmp(a->mailbox, b->mailbox) != 0)
return false;
return true;
}
buf[0] = 0;
for (; uh; uh = uh->next)
{
- if (ascii_strncasecmp("subject:", uh->data, 8) == 0)
+ if (mutt_strncasecmp("subject:", uh->data, 8) == 0)
{
p = skip_email_wsp(uh->data + 8);
strfcpy(buf, p, sizeof(buf));
for (; uh; uh = uh->next)
{
- if (ascii_strncasecmp("to:", uh->data, 3) == 0)
+ if (mutt_strncasecmp("to:", uh->data, 3) == 0)
env->to = rfc822_parse_adrlist(env->to, uh->data + 3);
- else if (ascii_strncasecmp("cc:", uh->data, 3) == 0)
+ else if (mutt_strncasecmp("cc:", uh->data, 3) == 0)
env->cc = rfc822_parse_adrlist(env->cc, uh->data + 3);
- else if (ascii_strncasecmp("bcc:", uh->data, 4) == 0)
+ else if (mutt_strncasecmp("bcc:", uh->data, 4) == 0)
env->bcc = rfc822_parse_adrlist(env->bcc, uh->data + 4);
#ifdef USE_NNTP
- else if (ascii_strncasecmp("newsgroups:", uh->data, 11) == 0)
+ else if (mutt_strncasecmp("newsgroups:", uh->data, 11) == 0)
env->newsgroups = nntp_get_header(uh->data + 11);
- else if (ascii_strncasecmp("followup-to:", uh->data, 12) == 0)
+ else if (mutt_strncasecmp("followup-to:", uh->data, 12) == 0)
env->followup_to = nntp_get_header(uh->data + 12);
- else if (ascii_strncasecmp("x-comment-to:", uh->data, 13) == 0)
+ else if (mutt_strncasecmp("x-comment-to:", uh->data, 13) == 0)
env->x_comment_to = nntp_get_header(uh->data + 13);
#endif
}
for (; uh; uh = uh->next)
{
- if (ascii_strncasecmp("from:", uh->data, 5) == 0)
+ if (mutt_strncasecmp("from:", uh->data, 5) == 0)
{
/* User has specified a default From: address. Remove default address */
rfc822_free_address(&env->from);
env->from = rfc822_parse_adrlist(env->from, uh->data + 5);
}
- else if (ascii_strncasecmp("reply-to:", uh->data, 9) == 0)
+ else if (mutt_strncasecmp("reply-to:", uh->data, 9) == 0)
{
rfc822_free_address(&env->reply_to);
env->reply_to = rfc822_parse_adrlist(env->reply_to, uh->data + 9);
}
- else if (ascii_strncasecmp("message-id:", uh->data, 11) == 0)
+ else if (mutt_strncasecmp("message-id:", uh->data, 11) == 0)
{
char *tmp = mutt_extract_message_id(uh->data + 11, NULL);
if (rfc822_valid_msgid(tmp))
else
FREE(&tmp);
}
- else if ((ascii_strncasecmp("to:", uh->data, 3) != 0) &&
- (ascii_strncasecmp("cc:", uh->data, 3) != 0) &&
- (ascii_strncasecmp("bcc:", uh->data, 4) != 0) &&
+ else if ((mutt_strncasecmp("to:", uh->data, 3) != 0) &&
+ (mutt_strncasecmp("cc:", uh->data, 3) != 0) &&
+ (mutt_strncasecmp("bcc:", uh->data, 4) != 0) &&
#ifdef USE_NNTP
- (ascii_strncasecmp("newsgroups:", uh->data, 11) != 0) &&
- (ascii_strncasecmp("followup-to:", uh->data, 12) != 0) &&
- (ascii_strncasecmp("x-comment-to:", uh->data, 13) != 0) &&
+ (mutt_strncasecmp("newsgroups:", uh->data, 11) != 0) &&
+ (mutt_strncasecmp("followup-to:", uh->data, 12) != 0) &&
+ (mutt_strncasecmp("x-comment-to:", uh->data, 13) != 0) &&
#endif
- (ascii_strncasecmp("supersedes:", uh->data, 11) != 0) &&
- (ascii_strncasecmp("subject:", uh->data, 8) != 0) &&
- (ascii_strncasecmp("return-path:", uh->data, 12) != 0))
+ (mutt_strncasecmp("supersedes:", uh->data, 11) != 0) &&
+ (mutt_strncasecmp("subject:", uh->data, 8) != 0) &&
+ (mutt_strncasecmp("return-path:", uh->data, 12) != 0))
{
if (last)
{
if (!(flags & SENDKEY))
{
if (option(OPT_TEXT_FLOWED) && msg->content->type == TYPETEXT &&
- (ascii_strcasecmp(msg->content->subtype, "plain") == 0))
+ (mutt_strcasecmp(msg->content->subtype, "plain") == 0))
mutt_set_parameter("format", "flowed", &msg->content->parameter);
}
* parameter will be present.
*/
if (option(OPT_TEXT_FLOWED) && msg->content->type == TYPETEXT &&
- (ascii_strcasecmp("plain", msg->content->subtype) == 0))
+ (mutt_strcasecmp("plain", msg->content->subtype) == 0))
{
char *p = mutt_get_parameter("format", msg->content->parameter);
- if (ascii_strcasecmp("flowed", NONULL(p)) != 0)
+ if (mutt_strcasecmp("flowed", NONULL(p)) != 0)
rfc3676_space_stuff(msg);
}
* even when they aren't needed.
*/
- if ((ascii_strcasecmp(p->attribute, "boundary") == 0) && (strcmp(buffer, tmp) == 0))
+ if ((mutt_strcasecmp(p->attribute, "boundary") == 0) && (strcmp(buffer, tmp) == 0))
snprintf(buffer, sizeof(buffer), "\"%s\"", tmp);
FREE(&tmp);
infos = safe_calloc(ncodes, sizeof(struct Content));
for (i = 0; i < ncodes; i++)
- if (ascii_strcasecmp(tocodes[i], "utf-8") != 0)
+ if (mutt_strcasecmp(tocodes[i], "utf-8") != 0)
cd[i] = mutt_iconv_open(tocodes[i], "utf-8", 0);
else
{
sze = mutt_strlen(p);
if ((sze > cur_sze) && (szf >= sze) &&
((mutt_strcasecmp(path + szf - sze, p) == 0) ||
- (ascii_strcasecmp(path + szf - sze, p) == 0)) &&
+ (mutt_strcasecmp(path + szf - sze, p) == 0)) &&
(szf == sze || path[szf - sze - 1] == '.'))
{
/* get the content-type */
if (b->type == TYPETEXT)
{
char *chsname = mutt_get_body_charset(send_charset, sizeof(send_charset), b);
- if ((info->lobin && (ascii_strncasecmp(chsname, "iso-2022", 8) != 0)) ||
+ if ((info->lobin && (mutt_strncasecmp(chsname, "iso-2022", 8) != 0)) ||
info->linemax > 990 || (info->from && option(OPT_ENCODE_FROM)))
b->encoding = ENCQUOTEDPRINTABLE;
else if (info->hibin)
b->encoding = ENC7BIT;
}
else if (b->type == TYPEAPPLICATION &&
- (ascii_strcasecmp(b->subtype, "pgp-keys") == 0))
+ (mutt_strcasecmp(b->subtype, "pgp-keys") == 0))
b->encoding = ENC7BIT;
else
{
const char *start, const char *end, int flags)
{
char *tagbuf = NULL, *valbuf = NULL, *t = NULL;
- int is_from = ((end - start) > 5 && (ascii_strncasecmp(start, "from ", 5) == 0));
+ int is_from = ((end - start) > 5 && (mutt_strncasecmp(start, "from ", 5) == 0));
/* only pass through folding machinery if necessary for sending,
never wrap From_ headers on sending */
}
/* check to see if the user has overridden the user-agent field */
- if (ascii_strncasecmp("user-agent", tmp->data, 10) == 0)
+ if (mutt_strncasecmp("user-agent", tmp->data, 10) == 0)
{
has_agent = true;
if (privacy)
for (tmp = top, dup = false; tmp && tmp != addr; tmp = tmp->next)
{
if (tmp->mailbox && addr->mailbox &&
- (ascii_strcasecmp(addr->mailbox, tmp->mailbox) == 0))
+ (mutt_strcasecmp(addr->mailbox, tmp->mailbox) == 0))
{
dup = true;
break;
return SMTP_ERR_READ;
}
- if (ascii_strncasecmp("8BITMIME", buf + 4, 8) == 0)
+ if (mutt_strncasecmp("8BITMIME", buf + 4, 8) == 0)
mutt_bit_set(Capabilities, EIGHTBITMIME);
- else if (ascii_strncasecmp("AUTH ", buf + 4, 5) == 0)
+ else if (mutt_strncasecmp("AUTH ", buf + 4, 5) == 0)
{
mutt_bit_set(Capabilities, AUTH);
FREE(&AuthMechs);
AuthMechs = safe_strdup(buf + 9);
}
- else if (ascii_strncasecmp("DSN", buf + 4, 3) == 0)
+ else if (mutt_strncasecmp("DSN", buf + 4, 3) == 0)
mutt_bit_set(Capabilities, DSN);
- else if (ascii_strncasecmp("STARTTLS", buf + 4, 8) == 0)
+ else if (mutt_strncasecmp("STARTTLS", buf + 4, 8) == 0)
mutt_bit_set(Capabilities, STARTTLS);
- else if (ascii_strncasecmp("SMTPUTF8", buf + 4, 8) == 0)
+ else if (mutt_strncasecmp("SMTPUTF8", buf + 4, 8) == 0)
mutt_bit_set(Capabilities, SMTPUTF8);
if (!valid_smtp_code(buf, n, &n))
for (method = delim = SmtpAuthenticators;
*delim && (delim = mutt_strchrnul(method, ':')); method = delim + 1)
{
- if (ascii_strncasecmp(method, "plain", 5) == 0)
+ if (mutt_strncasecmp(method, "plain", 5) == 0)
{
/* Get username and password. Bail out of any cannot be retrieved. */
if (mutt_account_getuser(&conn->account) || mutt_account_getpass(&conn->account))
*/
if (mutt_matches_list(tag, MailToAllow))
{
- if (ascii_strcasecmp(tag, "body") == 0)
+ if (mutt_strcasecmp(tag, "body") == 0)
{
if (body)
mutt_str_replace(body, value);