score.c send.c sendlib.c signal.c sort.c \
status.c system.c thread.c charset.c history.c lib.c \
muttlib.c editmsg.c utf8.c mbyte.c wcwidth.c gettext.c \
- url.c
+ url.c ascii.c
mutt_LDADD = @MUTT_LIB_OBJECTS@ @LIBOBJS@ $(LIBIMAP) $(MUTTLIBS) \
$(INTLLIBS) $(LIBICONV)
EXTRA_mutt_SOURCES = account.c md5c.c mutt_sasl.c mutt_socket.c mutt_ssl.c \
pop.c pop_auth.c pop_lib.c pgp.c pgpinvoke.c pgpkey.c pgplib.c \
sha1.c pgpmicalg.c gnupgparse.c resize.c dotlock.c remailer.c browser.h mbyte.h \
- remailer.h url.h mutt_ssl_nss.c pgppacket.c
+ remailer.h url.h mutt_ssl_nss.c pgppacket.c ascii.c
EXTRA_DIST = COPYRIGHT GPL OPS OPS.PGP TODO configure acconfig.h account.h \
attach.h buffy.h charset.h copy.h dotlock.h functions.h gen_defs \
_regex.h OPS.MIX README.SECURITY remailer.c remailer.h browser.h \
mbyte.h lib.h extlib.c pgpewrap pgplib.h Muttrc.head Muttrc \
makedoc.c stamp-doc-rc README.SSL README.UPGRADE checktypes.c \
- muttbug pgppacket.h depcomp
+ muttbug pgppacket.h depcomp ascii.h
mutt_dotlock_SOURCES = mutt_dotlock.c
mutt_dotlock_LDADD = @LIBOBJS@
mutt_dotlock_DEPENDENCIES = @LIBOBJS@
-pgpring_SOURCES = pgppubring.c pgplib.c lib.c extlib.c sha1.c pgppacket.c
+pgpring_SOURCES = pgppubring.c pgplib.c lib.c extlib.c sha1.c pgppacket.c ascii.c
pgpring_LDADD = @LIBOBJS@ $(INTLLIBS)
pgpring_DEPENDENCIES = @LIBOBJS@ $(INTLDEPS)
if (a1->type != a2->type)
return 0;
- if (mutt_strcasecmp (a1->host, a2->host))
+ if (ascii_strcasecmp (a1->host, a2->host))
return 0;
if (a1->port != a2->port)
return 0;
else if (pb->personal)
r = -1;
else
- r = mutt_strcasecmp (pa->mailbox, pb->mailbox);
+ r = ascii_strcasecmp (pa->mailbox, pb->mailbox);
return (RSORT (r));
}
for (ap = t->addr; ap; ap = ap->next)
{
if (!ap->group && ap->mailbox &&
- mutt_strcasecmp (ap->mailbox, a->mailbox) == 0)
+ ascii_strcasecmp (ap->mailbox, a->mailbox) == 0)
return ap;
}
}
char buf[LONG_STRING];
snprintf(buf, sizeof(buf), "%s@%s", NONULL(u), NONULL(d));
- if (mutt_strcasecmp(str, buf) == 0)
+ if (ascii_strcasecmp(str, buf) == 0)
return 1;
return 0;
if (!addr->mailbox)
return 0;
- if (mutt_strcasecmp (addr->mailbox, Username) == 0)
+ if (ascii_strcasecmp (addr->mailbox, Username) == 0)
return 1;
if (string_is_address(addr->mailbox, Username, Hostname))
return 1;
if (string_is_address(addr->mailbox, Username, mutt_fqdn(1)))
return 1;
- if (From && !mutt_strcasecmp (From->mailbox, addr->mailbox))
+ if (From && !ascii_strcasecmp (From->mailbox, addr->mailbox))
return 1;
if (Alternates.pattern &&
--- /dev/null
+/*
+ * Copyright (C) 2001 Thomas Roessler <roessler@does-not-exist.org>
+ *
+ * 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, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111, USA.
+ *
+ */
+
+
+/*
+ * Versions of the string comparison functions which are
+ * locale-insensitive.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "ascii.h"
+
+int ascii_isupper (int c)
+{
+ return (c >= 'A') && (c <= 'Z');
+}
+
+int ascii_islower (int c)
+{
+ return (c >= 'a') && (c <= 'z');
+}
+
+int ascii_toupper (int c)
+{
+ if (ascii_islower (c))
+ return c & ~32;
+
+ return c;
+}
+
+int ascii_tolower (int c)
+{
+ if (ascii_isupper (c))
+ return c | 32;
+
+ return c;
+}
+
+int ascii_strcasecmp (const char *a, const char *b)
+{
+ int i;
+
+ if (a == b)
+ return 0;
+ if (a == NULL && b)
+ return -1;
+ if (b == NULL && a)
+ return 1;
+
+ for (; *a || *b; a++, b++)
+ {
+ if ((i = ascii_tolower (*a) - ascii_tolower (*b)))
+ return i;
+ }
+
+ return 0;
+}
+
+int ascii_strncasecmp (const char *a, const char *b, int n)
+{
+ int i, j;
+
+ if (a == b)
+ return 0;
+ if (a == NULL && b)
+ return -1;
+ if (b == NULL && a)
+ return 1;
+
+ for (j = 0; (*a || *b) && j < n; a++, b++, j++)
+ {
+ if ((i = ascii_tolower (*a) - ascii_tolower (*b)))
+ return i;
+ }
+
+ return 0;
+}
--- /dev/null
+/*
+ * Copyright (C) 2001 Thomas Roessler <roessler@does-not-exist.org>
+ *
+ * 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, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111, USA.
+ *
+ */
+
+
+/*
+ * Versions of the string comparison functions which are
+ * locale-insensitive.
+ */
+
+#ifndef _ASCII_H
+# define _ASCII_H
+
+int ascii_isupper (int c);
+int ascii_islower (int c);
+int ascii_toupper (int c);
+int ascii_tolower (int c);
+int ascii_strcasecmp (const char *a, const char *b);
+int ascii_strncasecmp (const char *a, const char *b, int n);
+
+#define ascii_strcmp(a,b) mutt_strcmp(a,b)
+#define ascii_strncmp(a,b) mutt_strncmp(a,b)
+
+#endif
{
if (*(q+1) == '*')
{
- if (mutt_strncasecmp (buf, p, q-p) == 0)
+ if (ascii_strncasecmp (buf, p, q-p) == 0)
return (1);
}
else
{
- if (mutt_strcasecmp (buf, p) == 0)
+ if (ascii_strcasecmp (buf, p) == 0)
return (1);
}
}
{
i = mutt_strlen (t->data) - 1;
if ((i > 0 && t->data[i-1] == '/' && t->data[i] == '*' &&
- mutt_strncasecmp (type, t->data, i) == 0) ||
- mutt_strcasecmp (type, t->data) == 0)
+ ascii_strncasecmp (type, t->data, i) == 0) ||
+ ascii_strcasecmp (type, t->data) == 0)
return 1;
}
return (1);
}
- if (!mutt_strcasecmp ("text/plain", a->subtype) ||
- !mutt_strcasecmp ("application/postscript", a->subtype))
+ if (!ascii_strcasecmp ("text/plain", a->subtype) ||
+ !ascii_strcasecmp ("application/postscript", a->subtype))
{
return (mutt_pipe_attachment (fp, a, NONULL(PrintCmd), NULL));
}
{ "iso_8859-15", "iso-8859-15" },
{ "latin9", "iso-8859-15" }, /* this is not a bug */
- { "ýso-8859-9", "iso-8859-9" }, /* work around a problem:
- * In iso-8859-9, the lower-
- * case version of I is ý,
- * not i.
- */
-
/*
* If you happen to encounter system-specific brain-damage with
char scratch[LONG_STRING];
/* catch some common iso-8859-something misspellings */
- if (!mutt_strncasecmp (name, "8859", 4) && name[4] != '-')
+ if (!ascii_strncasecmp (name, "8859", 4) && name[4] != '-')
snprintf (scratch, sizeof (scratch), "iso-8859-%s", name +4);
- else if (!mutt_strncasecmp (name, "8859-", 5))
+ else if (!ascii_strncasecmp (name, "8859-", 5))
snprintf (scratch, sizeof (scratch), "iso-8859-%s", name + 5);
- else if (!mutt_strncasecmp (name, "iso8859", 7) && name[7] != '-')
+ else if (!ascii_strncasecmp (name, "iso8859", 7) && name[7] != '-')
snprintf (scratch, sizeof (scratch), "iso_8859-%s", name + 7);
- else if (!mutt_strncasecmp (name, "iso8859-", 8))
+ else if (!ascii_strncasecmp (name, "iso8859-", 8))
snprintf (scratch, sizeof (scratch), "iso_8859-%s", name + 8);
else
strfcpy (scratch, NONULL(name), sizeof (scratch));
for (i = 0; PreferredMIMENames[i].key; i++)
- if (!mutt_strcasecmp (scratch, PreferredMIMENames[i].key))
+ if (!ascii_strcasecmp (scratch, PreferredMIMENames[i].key) ||
+ !mutt_strcasecmp (scratch, PreferredMIMENames[i].key))
{
strfcpy (dest, PreferredMIMENames[i].pref, dlen);
return;
/* for cosmetics' sake, transform to lowercase. */
for (p = dest; *p; p++)
- if (isupper (*p))
- *p = tolower (*p);
+ *p = ascii_tolower (*p);
}
int mutt_chscmp (const char *s, const char *chs)
if (!s) return 0;
mutt_canonical_charset (buffer, sizeof (buffer), s);
- return !mutt_strcasecmp (buffer, chs);
+ return !ascii_strcasecmp (buffer, chs);
}
mutt_extract_token (buf, s, 0);
- if (mutt_strcasecmp ("bold", buf->data) == 0)
+ if (ascii_strcasecmp ("bold", buf->data) == 0)
*attr |= A_BOLD;
- else if (mutt_strcasecmp ("underline", buf->data) == 0)
+ else if (ascii_strcasecmp ("underline", buf->data) == 0)
*attr |= A_UNDERLINE;
- else if (mutt_strcasecmp ("none", buf->data) == 0)
+ else if (ascii_strcasecmp ("none", buf->data) == 0)
*attr = A_NORMAL;
- else if (mutt_strcasecmp ("reverse", buf->data) == 0)
+ else if (ascii_strcasecmp ("reverse", buf->data) == 0)
*attr |= A_REVERSE;
- else if (mutt_strcasecmp ("standout", buf->data) == 0)
+ else if (ascii_strcasecmp ("standout", buf->data) == 0)
*attr |= A_STANDOUT;
- else if (mutt_strcasecmp ("normal", buf->data) == 0)
+ else if (ascii_strcasecmp ("normal", buf->data) == 0)
*attr = A_NORMAL; /* needs use = instead of |= to clear other bits */
else
{
snprintf (tmp, sizeof (tmp), "%s/%s", TYPE (b), NONULL (b->subtype));
- type_changed = mutt_strcasecmp (tmp, obuf);
- charset_changed = mutt_strcasecmp (charset, mutt_get_parameter ("charset", b->parameter));
+ type_changed = ascii_strcasecmp (tmp, obuf);
+ charset_changed = ascii_strcasecmp (charset, mutt_get_parameter ("charset", b->parameter));
/* if in send mode, check for conversion - current setting is default. */
break; /* end of header */
if ((flags & (CH_UPDATE | CH_XMIT | CH_NOSTATUS)) &&
- (mutt_strncasecmp ("Status:", buf, 7) == 0 ||
- mutt_strncasecmp ("X-Status:", buf, 9) == 0))
+ (ascii_strncasecmp ("Status:", buf, 7) == 0 ||
+ ascii_strncasecmp ("X-Status:", buf, 9) == 0))
continue;
if ((flags & (CH_UPDATE_LEN | CH_XMIT | CH_NOLEN)) &&
- (mutt_strncasecmp ("Content-Length:", buf, 15) == 0 ||
- mutt_strncasecmp ("Lines:", buf, 6) == 0))
+ (ascii_strncasecmp ("Content-Length:", buf, 15) == 0 ||
+ ascii_strncasecmp ("Lines:", buf, 6) == 0))
continue;
ignore = 0;
}
!mutt_matches_ignore (buf, UnIgnore))
continue;
if ((flags & CH_WEED_DELIVERED) &&
- mutt_strncasecmp ("Delivered-To:", buf, 13) == 0)
+ ascii_strncasecmp ("Delivered-To:", buf, 13) == 0)
continue;
if ((flags & (CH_UPDATE | CH_XMIT | CH_NOSTATUS)) &&
- (mutt_strncasecmp ("Status:", buf, 7) == 0 ||
- mutt_strncasecmp ("X-Status:", buf, 9) == 0))
+ (ascii_strncasecmp ("Status:", buf, 7) == 0 ||
+ ascii_strncasecmp ("X-Status:", buf, 9) == 0))
continue;
if ((flags & (CH_UPDATE_LEN | CH_XMIT | CH_NOLEN)) &&
- (mutt_strncasecmp ("Content-Length:", buf, 15) == 0 ||
- mutt_strncasecmp ("Lines:", buf, 6) == 0))
+ (ascii_strncasecmp ("Content-Length:", buf, 15) == 0 ||
+ ascii_strncasecmp ("Lines:", buf, 6) == 0))
continue;
if ((flags & CH_MIME) &&
- ((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))
+ ((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))
continue;
/* Find x -- the array entry where this header is to be saved */
{
for (t = HeaderOrderList, x = 0 ; (t) ; t = t->next, x++)
{
- if (!mutt_strncasecmp (buf, t->data, mutt_strlen (t->data)))
+ if (!ascii_strncasecmp (buf, t->data, mutt_strlen (t->data)))
{
dprint(2, (debugfile, "Reorder: %s matches %s\n", t->data, buf));
break;
cur->msgno + 1);
}
buf = be_include_messages (p, buf, &bufmax, &buflen,
- (tolower (tmp[1]) == 'm'),
- (isupper ((unsigned char) tmp[1])));
+ (ascii_tolower (tmp[1]) == 'm'),
+ (ascii_isupper ((unsigned char) tmp[1])));
}
else
addstr (_("No mailbox.\n"));
tagptr++;
for (i = 0, j = -1; EnrichedTags[i].tag_name; i++)
- if (mutt_strcasecmp (EnrichedTags[i].tag_name,tagptr) == 0)
+ if (ascii_strcasecmp (EnrichedTags[i].tag_name,tagptr) == 0)
{
j = EnrichedTags[i].index;
break;
if ((stte->s->flags & M_DISPLAY) && j == RICH_PARAM && stte->tag_level[RICH_COLOR])
{
stte->param[stte->param_used] = '\0';
- if (!mutt_strcasecmp(stte->param, "black"))
+ if (!ascii_strcasecmp(stte->param, "black"))
{
enriched_puts("\033[30m", stte);
}
- else if (!mutt_strcasecmp(stte->param, "red"))
+ else if (!ascii_strcasecmp(stte->param, "red"))
{
enriched_puts("\033[31m", stte);
}
- else if (!mutt_strcasecmp(stte->param, "green"))
+ else if (!ascii_strcasecmp(stte->param, "green"))
{
enriched_puts("\033[32m", stte);
}
- else if (!mutt_strcasecmp(stte->param, "yellow"))
+ else if (!ascii_strcasecmp(stte->param, "yellow"))
{
enriched_puts("\033[33m", stte);
}
- else if (!mutt_strcasecmp(stte->param, "blue"))
+ else if (!ascii_strcasecmp(stte->param, "blue"))
{
enriched_puts("\033[34m", stte);
}
- else if (!mutt_strcasecmp(stte->param, "magenta"))
+ else if (!ascii_strcasecmp(stte->param, "magenta"))
{
enriched_puts("\033[35m", stte);
}
- else if (!mutt_strcasecmp(stte->param, "cyan"))
+ else if (!ascii_strcasecmp(stte->param, "cyan"))
{
enriched_puts("\033[36m", stte);
}
- else if (!mutt_strcasecmp(stte->param, "white"))
+ else if (!ascii_strcasecmp(stte->param, "white"))
{
enriched_puts("\033[37m", stte);
}
while (b)
{
const char *bt = TYPE(b);
- if (!mutt_strncasecmp (bt, t->data, btlen) && bt[btlen] == 0)
+ if (!ascii_strncasecmp (bt, t->data, btlen) && bt[btlen] == 0)
{
/* the basetype matches */
- if (wild || !mutt_strcasecmp (t->data + btlen + 1, b->subtype))
+ if (wild || !ascii_strcasecmp (t->data + btlen + 1, b->subtype))
{
choice = b;
}
{
if (b->type == TYPETEXT)
{
- if (! mutt_strcasecmp ("plain", b->subtype) && type <= TXTPLAIN)
+ if (! ascii_strcasecmp ("plain", b->subtype) && type <= TXTPLAIN)
{
choice = b;
type = TXTPLAIN;
}
- else if (! mutt_strcasecmp ("enriched", b->subtype) && type <= TXTENRICHED)
+ else if (! ascii_strcasecmp ("enriched", b->subtype) && type <= TXTENRICHED)
{
choice = b;
type = TXTENRICHED;
}
- else if (! mutt_strcasecmp ("html", b->subtype) && type <= TXTHTML)
+ else if (! ascii_strcasecmp ("html", b->subtype) && type <= TXTHTML)
{
choice = b;
type = TXTHTML;
#ifdef HAVE_PGP
- if (mutt_strcasecmp (a->subtype, "signed") == 0 ||
- mutt_strcasecmp (a->subtype, "encrypted") == 0)
+ if (ascii_strcasecmp (a->subtype, "signed") == 0 ||
+ ascii_strcasecmp (a->subtype, "encrypted") == 0)
return (1);
else
#endif
b->length = (long) st.st_size;
b->parts = mutt_parse_multipart (s->fpin,
mutt_get_parameter ("boundary", a->parameter),
- (long) st.st_size, mutt_strcasecmp ("digest", a->subtype) == 0);
+ (long) st.st_size, ascii_strcasecmp ("digest", a->subtype) == 0);
}
else
b = a;
else
expire = -1;
- if (!mutt_strcasecmp (access_type, "x-mutt-deleted"))
+ if (!ascii_strcasecmp (access_type, "x-mutt-deleted"))
{
if (s->flags & M_DISPLAY)
{
}
else if (b->type == TYPETEXT)
{
- if (mutt_strcasecmp ("plain", b->subtype) == 0)
+ if (ascii_strcasecmp ("plain", b->subtype) == 0)
{
/* avoid copying this part twice since removing the transfer-encoding is
* the only operation needed.
*/
plaintext = 1;
}
- else if (mutt_strcasecmp ("enriched", b->subtype) == 0)
+ else if (ascii_strcasecmp ("enriched", b->subtype) == 0)
handler = text_enriched_handler;
- else if (mutt_strcasecmp ("rfc822-headers", b->subtype) == 0)
+ else if (ascii_strcasecmp ("rfc822-headers", b->subtype) == 0)
plaintext = 1;
}
else if (b->type == TYPEMESSAGE)
{
if(mutt_is_message_type(b->type, b->subtype))
handler = message_handler;
- else if (!mutt_strcasecmp ("delivery-status", b->subtype))
+ else if (!ascii_strcasecmp ("delivery-status", b->subtype))
plaintext = 1;
- else if (!mutt_strcasecmp ("external-body", b->subtype))
+ else if (!ascii_strcasecmp ("external-body", b->subtype))
handler = external_body_handler;
}
else if (b->type == TYPEMULTIPART)
- if (mutt_strcasecmp ("alternative", b->subtype) == 0)
+ if (ascii_strcasecmp ("alternative", b->subtype) == 0)
handler = alternative_handler;
#ifdef HAVE_PGP
- else if (mutt_strcasecmp ("signed", b->subtype) == 0)
+ else if (ascii_strcasecmp ("signed", b->subtype) == 0)
{
p = mutt_get_parameter ("protocol", b->parameter);
if (!p)
mutt_error _("Error: multipart/signed has no protocol.");
- else if (mutt_strcasecmp ("application/pgp-signature", p) == 0 ||
- mutt_strcasecmp ("multipart/mixed", p) == 0)
+ else if (ascii_strcasecmp ("application/pgp-signature", p) == 0 ||
+ ascii_strcasecmp ("multipart/mixed", p) == 0)
{
if (s->flags & M_VERIFY)
handler = pgp_signed_handler;
}
}
- else if (mutt_strcasecmp ("encrypted", b->subtype) == 0)
+ else if (ascii_strcasecmp ("encrypted", b->subtype) == 0)
{
p = mutt_get_parameter ("protocol", b->parameter);
if (!p)
mutt_error _("Error: multipart/encrypted has no protocol parameter!");
- else if (mutt_strcasecmp ("application/pgp-encrypted", p) == 0)
+ else if (ascii_strcasecmp ("application/pgp-encrypted", p) == 0)
handler = pgp_encrypted_handler;
}
#endif /* HAVE_PGP */
* not, remove the references: field later so that we can generate a new
* message based upon this one.
*/
- if (mutt_strncasecmp ("in-reply-to:", cur->data, 12) == 0)
+ if (ascii_strncasecmp ("in-reply-to:", cur->data, 12) == 0)
in_reply_to = 1;
- else if (fcc && mutt_strncasecmp ("fcc:", cur->data, 4) == 0)
+ else if (fcc && ascii_strncasecmp ("fcc:", cur->data, 4) == 0)
{
p = cur->data + 4;
SKIPWS (p);
}
keep = 0;
}
- else if (mutt_strncasecmp ("attach:", cur->data, 7) == 0)
+ else if (ascii_strncasecmp ("attach:", cur->data, 7) == 0)
{
BODY *body;
BODY *parts;
#ifdef HAVE_PGP
- else if (mutt_strncasecmp ("pgp:", cur->data, 4) == 0)
+ else if (ascii_strncasecmp ("pgp:", cur->data, 4) == 0)
{
msg->pgp = mutt_parse_pgp_hdr (cur->data + 4, 0);
keep = 0;
break;
s = imap_next_word (idata->cmd.buf);
- if (mutt_strncasecmp ("NAMESPACE", s, 9) == 0)
+ if (ascii_strncasecmp ("NAMESPACE", s, 9) == 0)
{
/* There are three sections to the response, User, Other, Shared,
* and maybe more by extension */
{
s += SEQLEN;
SKIPWS (s);
- return (mutt_strncasecmp ("OK", s, 2) == 0);
+ return (ascii_strncasecmp ("OK", s, 2) == 0);
}
/* imap_exec: execute a command, and wait for the response from the server.
/* EXISTS and EXPUNGE are always related to the SELECTED mailbox for the
* connection, so update that one.
*/
- if (mutt_strncasecmp ("EXISTS", s, 6) == 0)
+ if (ascii_strncasecmp ("EXISTS", s, 6) == 0)
{
dprint (2, (debugfile, "Handling EXISTS\n"));
idata->newMailCount = count;
}
}
- else if (mutt_strncasecmp ("EXPUNGE", s, 7) == 0)
+ else if (ascii_strncasecmp ("EXPUNGE", s, 7) == 0)
/* pn vs. s: need initial seqno */
cmd_parse_expunge (idata, pn);
}
- else if (mutt_strncasecmp ("CAPABILITY", s, 10) == 0)
+ else if (ascii_strncasecmp ("CAPABILITY", s, 10) == 0)
cmd_parse_capabilities (idata, s);
- else if (mutt_strncasecmp ("MYRIGHTS", s, 8) == 0)
+ else if (ascii_strncasecmp ("MYRIGHTS", s, 8) == 0)
cmd_parse_myrights (idata, s);
- else if (mutt_strncasecmp ("BYE", s, 3) == 0)
+ else if (ascii_strncasecmp ("BYE", s, 3) == 0)
{
dprint (2, (debugfile, "Handling BYE\n"));
return -1;
}
- else if (option (OPTIMAPSERVERNOISE) && (mutt_strncasecmp ("NO", s, 2) == 0))
+ else if (option (OPTIMAPSERVERNOISE) && (ascii_strncasecmp ("NO", s, 2) == 0))
{
dprint (2, (debugfile, "Handling untagged NO\n"));
break;
s = imap_next_word (idata->cmd.buf);
- if (mutt_strncasecmp ("LIST", s, 4) == 0)
+ if (ascii_strncasecmp ("LIST", s, 4) == 0)
{
s = imap_next_word (s);
s = imap_next_word (s);
char ctmp;
/* sanity-check string */
- if (mutt_strncasecmp ("FLAGS", s, 5) != 0)
+ if (ascii_strncasecmp ("FLAGS", s, 5) != 0)
{
dprint (1, (debugfile, "imap_get_flags: not a FLAGS response: %s\n",
s));
pc = idata->cmd.buf + 2;
pc = imap_next_word (pc);
- if (!mutt_strncasecmp ("EXISTS", pc, 6))
+ if (!ascii_strncasecmp ("EXISTS", pc, 6))
{
/* imap_handle_untagged will have picked up the EXISTS message and
* set the NEW_MAIL flag. We clear it here. */
/* Obtain list of available flags here, may be overridden by a
* PERMANENTFLAGS tag in the OK response */
- if (mutt_strncasecmp ("FLAGS", pc, 5) == 0)
+ if (ascii_strncasecmp ("FLAGS", pc, 5) == 0)
{
/* don't override PERMANENTFLAGS */
if (!idata->flags)
}
}
/* PERMANENTFLAGS are massaged to look like FLAGS, then override FLAGS */
- else if (mutt_strncasecmp ("OK [PERMANENTFLAGS", pc, 18) == 0)
+ else if (ascii_strncasecmp ("OK [PERMANENTFLAGS", pc, 18) == 0)
{
dprint (2, (debugfile, "Getting mailbox PERMANENTFLAGS\n"));
/* safe to call on NULL */
break;
s = imap_next_word (idata->cmd.buf);
- if (mutt_strncasecmp ("STATUS", s, 6) == 0)
+ if (ascii_strncasecmp ("STATUS", s, 6) == 0)
{
s = imap_next_word (s);
/* The mailbox name may or may not be quoted here. We could try to
return -1;
s = imap_next_word (idata->cmd.buf);
- if ((mutt_strncasecmp ("LIST", s, 4) == 0) ||
- (mutt_strncasecmp ("LSUB", s, 4) == 0))
+ if ((ascii_strncasecmp ("LIST", s, 4) == 0) ||
+ (ascii_strncasecmp ("LSUB", s, 4) == 0))
{
*noselect = 0;
*noinferiors = 0;
while (*ep && *ep != ')') ep++;
do
{
- if (!strncasecmp (s, "\\NoSelect", 9))
+ if (!ascii_strncasecmp (s, "\\NoSelect", 9))
*noselect = 1;
- if (!strncasecmp (s, "\\NoInferiors", 12))
+ if (!ascii_strncasecmp (s, "\\NoInferiors", 12))
*noinferiors = 1;
/* See draft-gahrns-imap-child-mailbox-?? */
- if (!strncasecmp (s, "\\HasNoChildren", 14))
+ if (!ascii_strncasecmp (s, "\\HasNoChildren", 14))
*noinferiors = 1;
if (*s != ')')
s++;
pc = imap_next_word (pc);
pc = imap_next_word (pc);
- if (!mutt_strncasecmp ("FETCH", pc, 5))
+ if (!ascii_strncasecmp ("FETCH", pc, 5))
{
while (*pc)
{
pc = imap_next_word (pc);
if (pc[0] == '(')
pc++;
- if (strncasecmp ("UID", pc, 3) == 0)
+ if (ascii_strncasecmp ("UID", pc, 3) == 0)
{
pc = imap_next_word (pc);
uid = atoi (pc);
if (uid != HEADER_DATA(ctx->hdrs[msgno])->uid)
mutt_error (_("The message index is incorrect. Try reopening the mailbox."));
}
- else if ((strncasecmp ("RFC822", pc, 6) == 0) ||
- (strncasecmp ("BODY[]", pc, 6) == 0))
+ else if ((ascii_strncasecmp ("RFC822", pc, 6) == 0) ||
+ (ascii_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 ((strncasecmp ("FLAGS", pc, 5) == 0) &&
+ else if ((ascii_strncasecmp ("FLAGS", pc, 5) == 0) &&
!ctx->hdrs[msgno]->changed)
{
IMAP_HEADER newh;
/* find FETCH tag */
buf = imap_next_word (buf);
- if (mutt_strncasecmp ("FETCH", buf, 5))
+ if (ascii_strncasecmp ("FETCH", buf, 5))
return rc;
rc = -2; /* we've got a FETCH response, for better or worse */
flag_list = flag_list->next;
while (flag_list)
{
- if (!mutt_strncasecmp (flag_list->data, flag, strlen (flag_list->data)))
+ if (!ascii_strncasecmp (flag_list->data, flag, strlen (flag_list->data)))
return 1;
flag_list = flag_list->next;
{
SKIPWS (s);
- if (mutt_strncasecmp ("FLAGS", s, 5) == 0)
+ if (ascii_strncasecmp ("FLAGS", s, 5) == 0)
{
if ((s = msg_parse_flags (h, s)) == NULL)
return -1;
}
- else if (mutt_strncasecmp ("UID", s, 3) == 0)
+ else if (ascii_strncasecmp ("UID", s, 3) == 0)
{
s += 3;
SKIPWS (s);
s = imap_next_word (s);
}
- else if (mutt_strncasecmp ("INTERNALDATE", s, 12) == 0)
+ else if (ascii_strncasecmp ("INTERNALDATE", s, 12) == 0)
{
s += 12;
SKIPWS (s);
*ptmp = 0;
h->received = imap_parse_date (tmp);
}
- else if (mutt_strncasecmp ("RFC822.SIZE", s, 11) == 0)
+ else if (ascii_strncasecmp ("RFC822.SIZE", s, 11) == 0)
{
s += 11;
SKIPWS (s);
*ptmp = 0;
h->content_length = atoi (tmp);
}
- else if (!mutt_strncasecmp ("BODY", s, 4) ||
- !mutt_strncasecmp ("RFC822.HEADER", s, 13))
+ else if (!ascii_strncasecmp ("BODY", s, 4) ||
+ !ascii_strncasecmp ("RFC822.HEADER", s, 13))
{
/* handle above, in msg_fetch_header */
return -2;
int recent = 0;
/* sanity-check string */
- if (mutt_strncasecmp ("FLAGS", s, 5) != 0)
+ if (ascii_strncasecmp ("FLAGS", s, 5) != 0)
{
dprint (1, (debugfile, "msg_parse_flags: not a FLAGS response: %s\n",
s));
/* start parsing */
while (*s && *s != ')')
{
- if (mutt_strncasecmp ("\\deleted", s, 8) == 0)
+ if (ascii_strncasecmp ("\\deleted", s, 8) == 0)
{
s += 8;
h->deleted = 1;
}
- else if (mutt_strncasecmp ("\\flagged", s, 8) == 0)
+ else if (ascii_strncasecmp ("\\flagged", s, 8) == 0)
{
s += 8;
h->flagged = 1;
}
- else if (mutt_strncasecmp ("\\answered", s, 9) == 0)
+ else if (ascii_strncasecmp ("\\answered", s, 9) == 0)
{
s += 9;
h->replied = 1;
}
- else if (mutt_strncasecmp ("\\seen", s, 5) == 0)
+ else if (ascii_strncasecmp ("\\seen", s, 5) == 0)
{
s += 5;
h->read = 1;
}
- else if (mutt_strncasecmp ("\\recent", s, 5) == 0)
+ else if (ascii_strncasecmp ("\\recent", s, 5) == 0)
{
s += 7;
recent = 1;
}
tmp[i+1] = 0;
- return mutt_strcasecmp(a, tmp);
+ return ascii_strcasecmp(a, tmp);
}
/*
/* check to make sure the item is not already on this list */
for (last = *list; last; last = last->next)
{
- if (mutt_strcasecmp (str, last->data) == 0)
+ if (ascii_strcasecmp (str, last->data) == 0)
{
/* already on the list, so just ignore it */
last = NULL;
last = NULL;
while (p)
{
- if (mutt_strcasecmp (str, p->data) == 0)
+ if (ascii_strcasecmp (str, p->data) == 0)
{
safe_free ((void **) &p->data);
if (last)
while (tmp)
{
- if (mutt_strncasecmp (buf->data, tmp->data, l) == 0 && tmp->data[l] == ':')
+ if (ascii_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 (mutt_strncasecmp (buf->data, tmp->data, keylen) == 0)
+ if (ascii_strncasecmp (buf->data, tmp->data, keylen) == 0)
{
/* replace the old value */
safe_free ((void **) &tmp->data);
s->dptr++;
mutt_extract_token (tmp, s, 0);
- if (mutt_strcasecmp ("yes", tmp->data) == 0)
+ if (ascii_strcasecmp ("yes", tmp->data) == 0)
unset = inv = 0;
- else if (mutt_strcasecmp ("no", tmp->data) == 0)
+ else if (ascii_strcasecmp ("no", tmp->data) == 0)
unset = 1;
else
{
{
s->dptr++;
mutt_extract_token (tmp, s, 0);
- if (mutt_strcasecmp ("yes", tmp->data) == 0)
+ if (ascii_strcasecmp ("yes", tmp->data) == 0)
set_quadoption (MuttVars[idx].data, M_YES);
- else if (mutt_strcasecmp ("no", tmp->data) == 0)
+ else if (ascii_strcasecmp ("no", tmp->data) == 0)
set_quadoption (MuttVars[idx].data, M_NO);
- else if (mutt_strcasecmp ("ask-yes", tmp->data) == 0)
+ else if (ascii_strcasecmp ("ask-yes", tmp->data) == 0)
set_quadoption (MuttVars[idx].data, M_ASKYES);
- else if (mutt_strcasecmp ("ask-no", tmp->data) == 0)
+ else if (ascii_strcasecmp ("ask-no", tmp->data) == 0)
set_quadoption (MuttVars[idx].data, M_ASKNO);
else
{
int i;
for (i = 0; map[i].name; i++)
- if (mutt_strcasecmp (map[i].name, name) == 0)
+ if (ascii_strcasecmp (map[i].name, name) == 0)
return (map[i].value);
return (-1);
}
struct command_t *c;
for (c = Commands ; c->name ; c++)
- if (c->func == mutt_parse_hook && mutt_strcasecmp (c->name, name) == 0)
+ if (c->func == mutt_parse_hook && ascii_strcasecmp (c->name, name) == 0)
return c->data;
return 0;
}
char *t;
int n = 0;
- if(s[0] != '<' || tolower(s[1]) != 'f')
+ if(s[0] != '<' || ascii_tolower(s[1]) != 'f')
return -1;
for(t = s + 2; *t && isdigit((unsigned char) *t); t++)
for (i = 0; bindings[i].name; i++)
{
- if (!mutt_strncasecmp (start, bindings[i].name, len) &&
+ if (!ascii_strncasecmp (start, bindings[i].name, len) &&
mutt_strlen (bindings[i].name) == len)
return bindings[i].op;
}
l = p - pp + 1;
for (i = 0; KeyNames[i].name; i++)
{
- if (!mutt_strncasecmp (pp, KeyNames[i].name, l))
+ if (!ascii_strncasecmp (pp, KeyNames[i].name, l))
break;
}
if (KeyNames[i].name)
strfcpy (err->data, _("bind: too many arguments"), err->dsize);
r = -1;
}
- else if (mutt_strcasecmp ("noop", buf->data) == 0)
+ else if (ascii_strcasecmp ("noop", buf->data) == 0)
km_bindkey (key, menu, OP_NULL); /* the `unbind' command */
else
{
void state_prefix_putc(char, STATE *);
int state_printf(STATE *, const char *, ...);
+#include "ascii.h"
#include "protos.h"
#include "lib.h"
#include "globals.h"
i = SECFailure;
break;
}
- else if (tolower (ch.ch) == 'r')
+ else if (ascii_tolower (ch.ch) == 'r')
{
i = SECFailure;
break;
}
- else if (tolower (ch.ch) == 'o')
+ else if (ascii_tolower (ch.ch) == 'o')
{
i = SECSuccess;
break;
}
- else if (tolower (ch.ch) == 'a')
+ else if (ascii_tolower (ch.ch) == 'a')
{
/* push this certificate onto the user's certificate store so it
* automatically becomes valid next time we see it
{
for (; t; t = t->next)
{
- if (!mutt_strncasecmp (s, t->data, mutt_strlen (t->data)) || *t->data == '*')
+ if (!ascii_strncasecmp (s, t->data, mutt_strlen (t->data)) || *t->data == '*')
return 1;
}
return 0;
char *mutt_get_parameter (const char *s, PARAMETER *p)
{
for (; p; p = p->next)
- if (mutt_strcasecmp (s, p->attribute) == 0)
+ if (ascii_strcasecmp (s, p->attribute) == 0)
return (p->value);
return NULL;
for(q = *p; q; q = q->next)
{
- if (mutt_strcasecmp (attribute, q->attribute) == 0)
+ if (ascii_strcasecmp (attribute, q->attribute) == 0)
{
mutt_str_replace (&q->value, value);
return;
for (q = *p; q; p = &q->next, q = q->next)
{
- if (mutt_strcasecmp (attribute, q->attribute) == 0)
+ if (ascii_strcasecmp (attribute, q->attribute) == 0)
{
*p = q->next;
q->next = NULL;
{
case TYPETEXT:
- if (!mutt_strcasecmp ("plain", m->subtype) ||
- !mutt_strcasecmp ("rfc822-headers", m->subtype) ||
- !mutt_strcasecmp ("enriched", m->subtype))
+ if (!ascii_strcasecmp ("plain", m->subtype) ||
+ !ascii_strcasecmp ("rfc822-headers", m->subtype) ||
+ !ascii_strcasecmp ("enriched", m->subtype))
return 0;
break;
if (t == TYPEMESSAGE)
{
- if (!mutt_strcasecmp ("delivery-status", s))
+ if (!ascii_strcasecmp ("delivery-status", s))
return 1;
}
#ifdef HAVE_PGP
if (t == TYPEAPPLICATION)
{
- if (!mutt_strcasecmp ("pgp-keys", s))
+ if (!ascii_strcasecmp ("pgp-keys", s))
return 1;
}
#endif /* HAVE_PGP */
*/
int mx_set_magic (const char *s)
{
- if (mutt_strcasecmp (s, "mbox") == 0)
+ if (ascii_strcasecmp (s, "mbox") == 0)
DefaultMagic = M_MBOX;
- else if (mutt_strcasecmp (s, "mmdf") == 0)
+ else if (ascii_strcasecmp (s, "mmdf") == 0)
DefaultMagic = M_MMDF;
- else if (mutt_strcasecmp (s, "mh") == 0)
+ else if (ascii_strcasecmp (s, "mh") == 0)
DefaultMagic = M_MH;
- else if (mutt_strcasecmp (s, "maildir") == 0)
+ else if (ascii_strcasecmp (s, "maildir") == 0)
DefaultMagic = M_MAILDIR;
- else if (mutt_strcasecmp (s, "kendra") == 0)
+ else if (ascii_strcasecmp (s, "kendra") == 0)
DefaultMagic = M_KENDRA;
else
return (-1);
int mutt_check_encoding (const char *c)
{
- if (mutt_strncasecmp ("7bit", c, sizeof ("7bit")-1) == 0)
+ if (ascii_strncasecmp ("7bit", c, sizeof ("7bit")-1) == 0)
return (ENC7BIT);
- else if (mutt_strncasecmp ("8bit", c, sizeof ("8bit")-1) == 0)
+ else if (ascii_strncasecmp ("8bit", c, sizeof ("8bit")-1) == 0)
return (ENC8BIT);
- else if (mutt_strncasecmp ("binary", c, sizeof ("binary")-1) == 0)
+ else if (ascii_strncasecmp ("binary", c, sizeof ("binary")-1) == 0)
return (ENCBINARY);
- else if (mutt_strncasecmp ("quoted-printable", c, sizeof ("quoted-printable")-1) == 0)
+ else if (ascii_strncasecmp ("quoted-printable", c, sizeof ("quoted-printable")-1) == 0)
return (ENCQUOTEDPRINTABLE);
- else if (mutt_strncasecmp ("base64", c, sizeof("base64")-1) == 0)
+ else if (ascii_strncasecmp ("base64", c, sizeof("base64")-1) == 0)
return (ENCBASE64);
- else if (mutt_strncasecmp ("x-uuencode", c, sizeof("x-uuencode")-1) == 0)
+ else if (ascii_strncasecmp ("x-uuencode", c, sizeof("x-uuencode")-1) == 0)
return (ENCUUENCODED);
#ifdef SUN_ATTACHMENT
- else if (mutt_strncasecmp ("uuencode", c, sizeof("uuencode")-1) == 0)
+ else if (ascii_strncasecmp ("uuencode", c, sizeof("uuencode")-1) == 0)
return (ENCUUENCODED);
#endif
else
int mutt_check_mime_type (const char *s)
{
- if (mutt_strcasecmp ("text", s) == 0)
+ if (ascii_strcasecmp ("text", s) == 0)
return TYPETEXT;
- else if (mutt_strcasecmp ("multipart", s) == 0)
+ else if (ascii_strcasecmp ("multipart", s) == 0)
return TYPEMULTIPART;
#ifdef SUN_ATTACHMENT
- else if (mutt_strcasecmp ("x-sun-attachment", s) == 0)
+ else if (ascii_strcasecmp ("x-sun-attachment", s) == 0)
return TYPEMULTIPART;
#endif
- else if (mutt_strcasecmp ("application", s) == 0)
+ else if (ascii_strcasecmp ("application", s) == 0)
return TYPEAPPLICATION;
- else if (mutt_strcasecmp ("message", s) == 0)
+ else if (ascii_strcasecmp ("message", s) == 0)
return TYPEMESSAGE;
- else if (mutt_strcasecmp ("image", s) == 0)
+ else if (ascii_strcasecmp ("image", s) == 0)
return TYPEIMAGE;
- else if (mutt_strcasecmp ("audio", s) == 0)
+ else if (ascii_strcasecmp ("audio", s) == 0)
return TYPEAUDIO;
- else if (mutt_strcasecmp ("video", s) == 0)
+ else if (ascii_strcasecmp ("video", s) == 0)
return TYPEVIDEO;
- else if (mutt_strcasecmp ("model", s) == 0)
+ else if (ascii_strcasecmp ("model", s) == 0)
return TYPEMODEL;
else
return TYPEOTHER;
ct->type = mutt_check_mime_type (s);
#ifdef SUN_ATTACHMENT
- if (mutt_strcasecmp ("x-sun-attachment", s) == 0)
+ if (ascii_strcasecmp ("x-sun-attachment", s) == 0)
ct->subtype = safe_strdup ("x-sun-attachment");
#endif
{
PARAMETER *parms;
- if (!mutt_strncasecmp ("inline", s, 6))
+ if (!ascii_strncasecmp ("inline", s, 6))
ct->disposition = DISPINLINE;
- else if (!mutt_strncasecmp ("form-data", s, 9))
+ else if (!ascii_strncasecmp ("form-data", s, 9))
ct->disposition = DISPFORMDATA;
else
ct->disposition = DISPATTACH;
break;
}
- if (!mutt_strncasecmp ("content-", line, 8))
+ if (!ascii_strncasecmp ("content-", line, 8))
{
- if (!mutt_strcasecmp ("type", line + 8))
+ if (!ascii_strcasecmp ("type", line + 8))
mutt_parse_content_type (c, p);
- else if (!mutt_strcasecmp ("transfer-encoding", line + 8))
+ else if (!ascii_strcasecmp ("transfer-encoding", line + 8))
p->encoding = mutt_check_encoding (c);
- else if (!mutt_strcasecmp ("disposition", line + 8))
+ else if (!ascii_strcasecmp ("disposition", line + 8))
parse_content_disposition (c, p);
- else if (!mutt_strcasecmp ("description", line + 8))
+ else if (!ascii_strcasecmp ("description", line + 8))
{
mutt_str_replace (&p->description, c);
rfc2047_decode (&p->description);
}
}
#ifdef SUN_ATTACHMENT
- else if (!mutt_strncasecmp ("x-sun-", line, 6))
+ else if (!ascii_strncasecmp ("x-sun-", line, 6))
{
- if (!mutt_strcasecmp ("data-type", line + 6))
+ if (!ascii_strcasecmp ("data-type", line + 6))
mutt_parse_content_type (c, p);
- else if (!mutt_strcasecmp ("encoding-info", line + 6))
+ else if (!ascii_strcasecmp ("encoding-info", line + 6))
p->encoding = mutt_check_encoding (c);
- else if (!mutt_strcasecmp ("content-lines", line + 6))
+ else if (!ascii_strcasecmp ("content-lines", line + 6))
mutt_set_parameter ("content-lines", safe_strdup (c), &(p->parameter));
- else if (!mutt_strcasecmp ("data-description", line + 6))
+ else if (!ascii_strcasecmp ("data-description", line + 6))
{
mutt_str_replace (&p->description, c);
rfc2047_decode (&p->description);
{
case TYPEMULTIPART:
#ifdef SUN_ATTACHMENT
- if ( !mutt_strcasecmp (b->subtype, "x-sun-attachment") )
+ if ( !ascii_strcasecmp (b->subtype, "x-sun-attachment") )
bound = "--------";
else
#endif
fseek (fp, b->offset, SEEK_SET);
b->parts = mutt_parse_multipart (fp, bound,
b->offset + b->length,
- mutt_strcasecmp ("digest", b->subtype) == 0);
+ ascii_strcasecmp ("digest", b->subtype) == 0);
break;
case TYPEMESSAGE:
fseek (fp, b->offset, SEEK_SET);
if (mutt_is_message_type(b->type, b->subtype))
b->parts = mutt_parse_messageRFC822 (fp, b);
- else if (mutt_strcasecmp (b->subtype, "external-body") == 0)
+ else if (ascii_strcasecmp (b->subtype, "external-body") == 0)
b->parts = mutt_read_mime_header (fp, 0);
else
return;
tz = bsearch (ptz, TimeZones, sizeof TimeZones/sizeof (struct tz_t),
sizeof (struct tz_t),
- (int (*)(const void *, const void *)) strcasecmp
+ (int (*)(const void *, const void *)) ascii_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 (mutt_strcasecmp (t, "MET") == 0)
+ if (ascii_strcasecmp (t, "MET") == 0)
{
if ((t = strtok (NULL, " \t")) != NULL)
{
- if (!mutt_strcasecmp (t, "DST"))
+ if (!ascii_strcasecmp (t, "DST"))
zhours++;
}
}
if (lastp)
last = *lastp;
- switch (tolower (line[0]))
+ switch (ascii_tolower (line[0]))
{
case 'a':
- if (mutt_strcasecmp (line+1, "pparently-to") == 0)
+ if (ascii_strcasecmp (line+1, "pparently-to") == 0)
{
e->to = rfc822_parse_adrlist (e->to, p);
matched = 1;
}
- else if (mutt_strcasecmp (line+1, "pparently-from") == 0)
+ else if (ascii_strcasecmp (line+1, "pparently-from") == 0)
{
e->from = rfc822_parse_adrlist (e->from, p);
matched = 1;
break;
case 'b':
- if (mutt_strcasecmp (line+1, "cc") == 0)
+ if (ascii_strcasecmp (line+1, "cc") == 0)
{
e->bcc = rfc822_parse_adrlist (e->bcc, p);
matched = 1;
break;
case 'c':
- if (mutt_strcasecmp (line+1, "c") == 0)
+ if (ascii_strcasecmp (line+1, "c") == 0)
{
e->cc = rfc822_parse_adrlist (e->cc, p);
matched = 1;
}
- else if (mutt_strncasecmp (line + 1, "ontent-", 7) == 0)
+ else if (ascii_strncasecmp (line + 1, "ontent-", 7) == 0)
{
- if (mutt_strcasecmp (line+8, "type") == 0)
+ if (ascii_strcasecmp (line+8, "type") == 0)
{
if (hdr)
mutt_parse_content_type (p, hdr->content);
matched = 1;
}
- else if (mutt_strcasecmp (line+8, "transfer-encoding") == 0)
+ else if (ascii_strcasecmp (line+8, "transfer-encoding") == 0)
{
if (hdr)
hdr->content->encoding = mutt_check_encoding (p);
matched = 1;
}
- else if (mutt_strcasecmp (line+8, "length") == 0)
+ else if (ascii_strcasecmp (line+8, "length") == 0)
{
if (hdr)
{
}
matched = 1;
}
- else if (mutt_strcasecmp (line+8, "description") == 0)
+ else if (ascii_strcasecmp (line+8, "description") == 0)
{
if (hdr)
{
}
matched = 1;
}
- else if (mutt_strcasecmp (line+8, "disposition") == 0)
+ else if (ascii_strcasecmp (line+8, "disposition") == 0)
{
if (hdr)
parse_content_disposition (p, hdr->content);
break;
case 'd':
- if (!mutt_strcasecmp ("ate", line + 1))
+ if (!ascii_strcasecmp ("ate", line + 1))
{
mutt_str_replace (&e->date, p);
if (hdr)
break;
case 'e':
- if (!mutt_strcasecmp ("xpires", line + 1) &&
+ if (!ascii_strcasecmp ("xpires", line + 1) &&
hdr && mutt_parse_date (p, NULL) < time (NULL))
hdr->expired = 1;
break;
case 'f':
- if (!mutt_strcasecmp ("rom", line + 1))
+ if (!ascii_strcasecmp ("rom", line + 1))
{
e->from = rfc822_parse_adrlist (e->from, p);
matched = 1;
break;
case 'i':
- if (!mutt_strcasecmp (line+1, "n-reply-to"))
+ if (!ascii_strcasecmp (line+1, "n-reply-to"))
{
mutt_free_list (&e->in_reply_to);
e->in_reply_to = mutt_parse_references (p);
break;
case 'l':
- if (!mutt_strcasecmp (line + 1, "ines"))
+ if (!ascii_strcasecmp (line + 1, "ines"))
{
if (hdr)
hdr->lines = atoi (p);
break;
case 'm':
- if (!mutt_strcasecmp (line + 1, "ime-version"))
+ if (!ascii_strcasecmp (line + 1, "ime-version"))
{
if (hdr)
hdr->mime = 1;
matched = 1;
}
- else if (!mutt_strcasecmp (line + 1, "essage-id"))
+ else if (!ascii_strcasecmp (line + 1, "essage-id"))
{
/* We add a new "Message-Id:" when building a message */
safe_free ((void **) &e->message_id);
e->message_id = extract_message_id (p);
matched = 1;
}
- else if (!mutt_strncasecmp (line + 1, "ail-", 4))
+ else if (!ascii_strncasecmp (line + 1, "ail-", 4))
{
- if (!mutt_strcasecmp (line + 5, "reply-to"))
+ if (!ascii_strcasecmp (line + 5, "reply-to"))
{
/* 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 (!mutt_strcasecmp (line + 5, "followup-to"))
+ else if (!ascii_strcasecmp (line + 5, "followup-to"))
{
e->mail_followup_to = rfc822_parse_adrlist (e->mail_followup_to, p);
matched = 1;
break;
case 'r':
- if (!mutt_strcasecmp (line + 1, "eferences"))
+ if (!ascii_strcasecmp (line + 1, "eferences"))
{
mutt_free_list (&e->references);
e->references = mutt_parse_references (p);
matched = 1;
}
- else if (!mutt_strcasecmp (line + 1, "eply-to"))
+ else if (!ascii_strcasecmp (line + 1, "eply-to"))
{
e->reply_to = rfc822_parse_adrlist (e->reply_to, p);
matched = 1;
}
- else if (!mutt_strcasecmp (line + 1, "eturn-path"))
+ else if (!ascii_strcasecmp (line + 1, "eturn-path"))
{
e->return_path = rfc822_parse_adrlist (e->return_path, p);
matched = 1;
}
- else if (!mutt_strcasecmp (line + 1, "eceived"))
+ else if (!ascii_strcasecmp (line + 1, "eceived"))
{
if (hdr && !hdr->received)
{
break;
case 's':
- if (!mutt_strcasecmp (line + 1, "ubject"))
+ if (!ascii_strcasecmp (line + 1, "ubject"))
{
if (!e->subject)
e->subject = safe_strdup (p);
matched = 1;
}
- else if (!mutt_strcasecmp (line + 1, "ender"))
+ else if (!ascii_strcasecmp (line + 1, "ender"))
{
e->sender = rfc822_parse_adrlist (e->sender, p);
matched = 1;
}
- else if (!mutt_strcasecmp (line + 1, "tatus"))
+ else if (!ascii_strcasecmp (line + 1, "tatus"))
{
if (hdr)
{
}
matched = 1;
}
- else if ((!mutt_strcasecmp ("upersedes", line + 1) ||
- !mutt_strcasecmp ("upercedes", line + 1)) && hdr)
+ else if ((!ascii_strcasecmp ("upersedes", line + 1) ||
+ !ascii_strcasecmp ("upercedes", line + 1)) && hdr)
e->supersedes = safe_strdup (p);
break;
case 't':
- if (mutt_strcasecmp (line+1, "o") == 0)
+ if (ascii_strcasecmp (line+1, "o") == 0)
{
e->to = rfc822_parse_adrlist (e->to, p);
matched = 1;
break;
case 'x':
- if (mutt_strcasecmp (line+1, "-status") == 0)
+ if (ascii_strcasecmp (line+1, "-status") == 0)
{
if (hdr)
{
}
matched = 1;
}
- else if (mutt_strcasecmp (line+1, "-label") == 0)
+ else if (ascii_strcasecmp (line+1, "-label") == 0)
{
e->x_label = safe_strdup(p);
matched = 1;
{
char tmp[LONG_STRING];
+ /* XXX - is ascii_strcasecmp() right here, or should we use locale's
+ * equivalences?
+ */
+
if (!strchr (s, '~')) /* yup, so spoof a real request */
{
/* convert old tokens into the new format */
- if (mutt_strcasecmp ("all", s) == 0 ||
+ if (ascii_strcasecmp ("all", s) == 0 ||
!mutt_strcmp ("^", s) || !mutt_strcmp (".", s)) /* ~A is more efficient */
strfcpy (s, "~A", len);
- else if (mutt_strcasecmp ("del", s) == 0)
+ else if (ascii_strcasecmp ("del", s) == 0)
strfcpy (s, "~D", len);
- else if (mutt_strcasecmp ("flag", s) == 0)
+ else if (ascii_strcasecmp ("flag", s) == 0)
strfcpy (s, "~F", len);
- else if (mutt_strcasecmp ("new", s) == 0)
+ else if (ascii_strcasecmp ("new", s) == 0)
strfcpy (s, "~N", len);
- else if (mutt_strcasecmp ("old", s) == 0)
+ else if (ascii_strcasecmp ("old", s) == 0)
strfcpy (s, "~O", len);
- else if (mutt_strcasecmp ("repl", s) == 0)
+ else if (ascii_strcasecmp ("repl", s) == 0)
strfcpy (s, "~Q", len);
- else if (mutt_strcasecmp ("read", s) == 0)
+ else if (ascii_strcasecmp ("read", s) == 0)
strfcpy (s, "~R", len);
- else if (mutt_strcasecmp ("tag", s) == 0)
+ else if (ascii_strcasecmp ("tag", s) == 0)
strfcpy (s, "~T", len);
- else if (mutt_strcasecmp ("unread", s) == 0)
+ else if (ascii_strcasecmp ("unread", s) == 0)
strfcpy (s, "~U", len);
else
{
char *p;
if (!b || b->type != TYPEMULTIPART ||
- !b->subtype || mutt_strcasecmp (b->subtype, "signed") ||
+ !b->subtype || ascii_strcasecmp (b->subtype, "signed") ||
!(p = mutt_get_parameter ("protocol", b->parameter)) ||
- (mutt_strcasecmp (p, "application/pgp-signature")
- && mutt_strcasecmp (p, "multipart/mixed")))
+ (ascii_strcasecmp (p, "application/pgp-signature")
+ && ascii_strcasecmp (p, "multipart/mixed")))
return 0;
return PGPSIGN;
char *p;
if (!b || b->type != TYPEMULTIPART ||
- !b->subtype || mutt_strcasecmp (b->subtype, "encrypted") ||
+ !b->subtype || ascii_strcasecmp (b->subtype, "encrypted") ||
!(p = mutt_get_parameter ("protocol", b->parameter)) ||
- mutt_strcasecmp (p, "application/pgp-encrypted"))
+ ascii_strcasecmp (p, "application/pgp-encrypted"))
return 0;
return PGPENCRYPT;
if (m->type == TYPEAPPLICATION)
{
- if (!mutt_strcasecmp (m->subtype, "pgp") || !mutt_strcasecmp (m->subtype, "x-pgp-message"))
+ if (!ascii_strcasecmp (m->subtype, "pgp") || !ascii_strcasecmp (m->subtype, "x-pgp-message"))
{
if ((p = mutt_get_parameter ("x-action", m->parameter))
- && (!mutt_strcasecmp (p, "sign") || !mutt_strcasecmp (p, "signclear")))
+ && (!ascii_strcasecmp (p, "sign") || !ascii_strcasecmp (p, "signclear")))
t |= PGPSIGN;
if ((p = mutt_get_parameter ("format", m->parameter)) &&
- !mutt_strcasecmp (p, "keys-only"))
+ !ascii_strcasecmp (p, "keys-only"))
t |= PGPKEY;
if(!t) t |= PGPENCRYPT; /* not necessarily correct, but... */
}
- if (!mutt_strcasecmp (m->subtype, "pgp-signed"))
+ if (!ascii_strcasecmp (m->subtype, "pgp-signed"))
t |= PGPSIGN;
- if (!mutt_strcasecmp (m->subtype, "pgp-keys"))
+ if (!ascii_strcasecmp (m->subtype, "pgp-keys"))
t |= PGPKEY;
}
return t;
/* consistency check */
if (!(a && a->next && a->next->type == protocol_major &&
- !mutt_strcasecmp(a->next->subtype, protocol_minor)))
+ !ascii_strcasecmp(a->next->subtype, protocol_minor)))
{
state_puts(_("[-- Error: Inconsistent multipart/signed structure! --]\n\n"), s);
mutt_body_handler (a, s);
return;
}
- if(!(protocol_major == TYPEAPPLICATION && !mutt_strcasecmp(protocol_minor, "pgp-signature"))
- && !(protocol_major == TYPEMULTIPART && !mutt_strcasecmp(protocol_minor, "mixed")))
+ if(!(protocol_major == TYPEAPPLICATION && !ascii_strcasecmp(protocol_minor, "pgp-signature"))
+ && !(protocol_major == TYPEMULTIPART && !ascii_strcasecmp(protocol_minor, "mixed")))
{
state_printf(s, _("[-- Error: Unknown multipart/signed protocol %s! --]\n\n"), protocol);
mutt_body_handler (a, s);
for (i = 0; i < sigcnt; i++)
{
if (signatures[i]->type == TYPEAPPLICATION
- && !mutt_strcasecmp(signatures[i]->subtype, "pgp-signature"))
+ && !ascii_strcasecmp(signatures[i]->subtype, "pgp-signature"))
{
if (pgp_verify_one (signatures[i], s, tempfile) != 0)
goodsig = 0;
a = a->parts;
if (!a || a->type != TYPEAPPLICATION || !a->subtype ||
- mutt_strcasecmp ("pgp-encrypted", a->subtype) != 0 ||
+ ascii_strcasecmp ("pgp-encrypted", a->subtype) != 0 ||
!a->next || a->next->type != TYPEAPPLICATION || !a->next->subtype ||
- mutt_strcasecmp ("octet-stream", a->next->subtype) != 0)
+ ascii_strcasecmp ("octet-stream", a->next->subtype) != 0)
{
if (s->flags & M_DISPLAY)
state_puts (_("[-- Error: malformed PGP/MIME message! --]\n\n"), s);
convert_to_7bit (a->parts);
}
else if (a->type == TYPEMESSAGE
- && mutt_strcasecmp(a->subtype, "delivery-status"))
+ && ascii_strcasecmp(a->subtype, "delivery-status"))
{
if(a->encoding != ENC7BIT)
mutt_message_to_7bit(a, NULL);
return (-1);
if ((msg->content->type == TYPETEXT) &&
- !mutt_strcasecmp (msg->content->subtype, "plain") &&
+ !ascii_strcasecmp (msg->content->subtype, "plain") &&
((flags & PGPENCRYPT) || (msg->content->content && msg->content->content->hibin == 0)))
{
if ((i = query_quadoption (OPT_PGPTRADITIONAL, _("Create an application/pgp message?"))) == -1)
kflags = key->flags | (pkey->flags & KEYFLAG_RESTRICTIONS)
| uid->flags;
- switch (tolower (op))
+ switch (ascii_tolower (op))
{
case '[':
for (tmp = hdr->env->userhdrs; tmp; )
{
- if (mutt_strncasecmp ("X-Mutt-References:", tmp->data, 18) == 0)
+ if (ascii_strncasecmp ("X-Mutt-References:", tmp->data, 18) == 0)
{
if (ctx)
{
if (*cur)
code |= SENDREPLY;
}
- else if (mutt_strncasecmp ("X-Mutt-Fcc:", tmp->data, 11) == 0)
+ else if (ascii_strncasecmp ("X-Mutt-Fcc:", tmp->data, 11) == 0)
{
p = tmp->data + 11;
SKIPWS (p);
while (p)
{
- if (!strncasecmp (p->data, "x-mailer:", 9) || !strncasecmp (p->data, "user-agent:", 11))
+ if (!ascii_strncasecmp (p->data, "x-mailer:", 9) || !ascii_strncasecmp (p->data, "user-agent:", 11))
{
*q = p->next;
p->next = NULL;
if (b->type == TYPETEXT)
{
- if (!mutt_strcasecmp ("yes", mutt_get_parameter ("x-mutt-noconv", b->parameter)))
+ if (!ascii_strcasecmp ("yes", mutt_get_parameter ("x-mutt-noconv", b->parameter)))
b->noconv = 1;
else
{
}
if (m->type == TYPEMULTIPART && m->parts
- && (compose || (parent_type == -1 && mutt_strcasecmp ("alternative", m->subtype)))
+ && (compose || (parent_type == -1 && ascii_strcasecmp ("alternative", m->subtype)))
#ifdef HAVE_PGP
&& !mutt_is_multipart_encrypted(m)
#endif
return 0;
subtype = NONULL(subtype);
- return (mutt_strcasecmp (subtype, "rfc822") == 0 || mutt_strcasecmp (subtype, "news") == 0);
+ return (ascii_strcasecmp (subtype, "rfc822") == 0 || ascii_strcasecmp (subtype, "news") == 0);
}
static int mutt_query_save_attachment (FILE *fp, BODY *body, HEADER *hdr)
{
if (!rfc1524_mailcap_lookup (top, type, NULL, M_PRINT))
{
- if (mutt_strcasecmp ("text/plain", top->subtype) &&
- mutt_strcasecmp ("application/postscript", top->subtype))
+ if (ascii_strcasecmp ("text/plain", top->subtype) &&
+ ascii_strcasecmp ("application/postscript", top->subtype))
{
if (!mutt_can_decode (top))
{
snprintf (type, sizeof (type), "%s/%s", TYPE (top), top->subtype);
if (!option (OPTATTACHSPLIT) && !rfc1524_mailcap_lookup (top, type, NULL, M_PRINT))
{
- if (!mutt_strcasecmp ("text/plain", top->subtype) ||
- !mutt_strcasecmp ("application/postscript", top->subtype))
+ if (!ascii_strcasecmp ("text/plain", top->subtype) ||
+ !ascii_strcasecmp ("application/postscript", top->subtype))
pipe_attachment (fp, top, state);
else if (mutt_can_decode (top))
{
{
i = init || b->collapsed;
if (i && option (OPTDIGESTCOLLAPSE) && b->type == TYPEMULTIPART
- && !mutt_strcasecmp (b->subtype, "digest"))
+ && !ascii_strcasecmp (b->subtype, "digest"))
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") || !mutt_strcasecmp (s, "<random>"))
+ if (!mutt_strcmp (s, "0") || !ascii_strcasecmp (s, "<random>"))
{
chain->ch[chain->cl++] = 0;
return 0;
for (i = 0; type2_list[i]; i++)
{
- if (!mutt_strcasecmp (s, type2_list[i]->shortname))
+ if (!ascii_strcasecmp (s, type2_list[i]->shortname))
{
chain->ch[chain->cl++] = i;
return 0;
/* check type */
ch = get_field (buf);
- if (mutt_strcasecmp (buf, type) &&
- (mutt_strncasecmp (buf, type, btlen) ||
+ if (ascii_strcasecmp (buf, type) &&
+ (ascii_strncasecmp (buf, type, btlen) ||
(buf[btlen] != 0 && /* implicit wild */
mutt_strcmp (buf + btlen, "/*")))) /* wildsubtype */
continue;
ch = get_field (ch);
dprint (2, (debugfile, "field: %s\n", field));
- if (!mutt_strcasecmp (field, "needsterminal"))
+ if (!ascii_strcasecmp (field, "needsterminal"))
{
if (entry)
entry->needsterminal = TRUE;
}
- else if (!mutt_strcasecmp (field, "copiousoutput"))
+ else if (!ascii_strcasecmp (field, "copiousoutput"))
{
copiousoutput = TRUE;
if (entry)
entry->copiousoutput = TRUE;
}
- else if (!mutt_strncasecmp (field, "composetyped", 12))
+ else if (!ascii_strncasecmp (field, "composetyped", 12))
{
/* 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 (!mutt_strncasecmp (field, "compose", 7))
+ else if (!ascii_strncasecmp (field, "compose", 7))
{
if (get_field_text (field + 7, entry ? &entry->composecommand : NULL,
type, filename, line))
composecommand = TRUE;
}
- else if (!mutt_strncasecmp (field, "print", 5))
+ else if (!ascii_strncasecmp (field, "print", 5))
{
if (get_field_text (field + 5, entry ? &entry->printcommand : NULL,
type, filename, line))
printcommand = TRUE;
}
- else if (!mutt_strncasecmp (field, "edit", 4))
+ else if (!ascii_strncasecmp (field, "edit", 4))
{
if (get_field_text (field + 4, entry ? &entry->editcommand : NULL,
type, filename, line))
editcommand = TRUE;
}
- else if (!mutt_strncasecmp (field, "nametemplate", 12))
+ else if (!ascii_strncasecmp (field, "nametemplate", 12))
{
get_field_text (field + 12, entry ? &entry->nametemplate : NULL,
type, filename, line);
}
- else if (!mutt_strncasecmp (field, "x-convert", 9))
+ else if (!ascii_strncasecmp (field, "x-convert", 9))
{
get_field_text (field + 9, entry ? &entry->convert : NULL,
type, filename, line);
}
- else if (!mutt_strncasecmp (field, "test", 4))
+ else if (!ascii_strncasecmp (field, "test", 4))
{
/*
* This routine executes the given test command to determine
len_q = len + (ob - buf1) + 2 * count;
/* Apparently RFC 1468 says to use B encoding for iso-2022-jp. */
- if (!strcasecmp (tocode, "ISO-2022-JP"))
+ if (!ascii_strcasecmp (tocode, "ISO-2022-JP"))
len_q = ENCWORD_LEN_MAX + 1;
if (len_b < len_q && len_b <= ENCWORD_LEN_MAX)
{
if (!a->mailbox || !b->mailbox)
return 0;
- if (mutt_strcasecmp (a->mailbox, b->mailbox))
+ if (ascii_strcasecmp (a->mailbox, b->mailbox))
return 0;
return 1;
}
buf[0] = 0;
for (; uh; uh = uh->next)
{
- if (mutt_strncasecmp ("subject:", uh->data, 8) == 0)
+ if (ascii_strncasecmp ("subject:", uh->data, 8) == 0)
{
p = uh->data + 8;
SKIPWS (p);
for (; uh; uh = uh->next)
{
- if (mutt_strncasecmp ("to:", uh->data, 3) == 0)
+ if (ascii_strncasecmp ("to:", uh->data, 3) == 0)
env->to = rfc822_parse_adrlist (env->to, uh->data + 3);
- else if (mutt_strncasecmp ("cc:", uh->data, 3) == 0)
+ else if (ascii_strncasecmp ("cc:", uh->data, 3) == 0)
env->cc = rfc822_parse_adrlist (env->cc, uh->data + 3);
- else if (mutt_strncasecmp ("bcc:", uh->data, 4) == 0)
+ else if (ascii_strncasecmp ("bcc:", uh->data, 4) == 0)
env->bcc = rfc822_parse_adrlist (env->bcc, uh->data + 4);
}
}
for (; uh; uh = uh->next)
{
- if (mutt_strncasecmp ("from:", uh->data, 5) == 0)
+ if (ascii_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 (mutt_strncasecmp ("reply-to:", uh->data, 9) == 0)
+ else if (ascii_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 (mutt_strncasecmp ("message-id:", uh->data, 11) == 0)
+ else if (ascii_strncasecmp ("message-id:", uh->data, 11) == 0)
mutt_str_replace (&env->message_id, uh->data + 11);
- else if (mutt_strncasecmp ("to:", uh->data, 3) != 0 &&
- mutt_strncasecmp ("cc:", uh->data, 3) != 0 &&
- mutt_strncasecmp ("bcc:", uh->data, 4) != 0 &&
- mutt_strncasecmp ("subject:", uh->data, 8) != 0)
+ else if (ascii_strncasecmp ("to:", uh->data, 3) != 0 &&
+ ascii_strncasecmp ("cc:", uh->data, 3) != 0 &&
+ ascii_strncasecmp ("bcc:", uh->data, 4) != 0 &&
+ ascii_strncasecmp ("subject:", uh->data, 8) != 0)
{
if (last)
{
* even when they aren't needed.
*/
- if (!strcasecmp (p->attribute, "boundary") && !strcmp (buffer, tmp))
+ if (!ascii_strcasecmp (p->attribute, "boundary") && !strcmp (buffer, tmp))
snprintf (buffer, sizeof (buffer), "\"%s\"", tmp);
safe_free ((void **)&tmp);
infos = safe_calloc (1, ncodes * sizeof (CONTENT));
for (i = 0; i < ncodes; i++)
- if (strcasecmp (tocodes[i], "UTF-8"))
+ if (ascii_strcasecmp (tocodes[i], "UTF-8"))
cd[i] = mutt_iconv_open (tocodes[i], "UTF-8", 0);
else
/* Special case for conversion to UTF-8 */
{
sze = mutt_strlen (p);
if ((sze > cur_sze) && (szf >= sze) &&
- mutt_strcasecmp (path + szf - sze, p) == 0 &&
+ (mutt_strcasecmp (path + szf - sze, p) == 0 || ascii_strcasecmp (path + szf - sze, p) == 0) &&
(szf == sze || path[szf - sze - 1] == '.'))
{
/* get the content-type */
tmp = top;
do {
if (addr->mailbox && tmp->mailbox &&
- !mutt_strcasecmp (addr->mailbox, tmp->mailbox))
+ !ascii_strcasecmp (addr->mailbox, tmp->mailbox))
{
/* duplicate address, just ignore it */
tmp = addr;
strfcpy (sbuf, s, t - s + 1);
for (t = sbuf; *t; t++)
- *t = tolower (*t);
+ *t = ascii_tolower (*t);
if ((i = mutt_getvaluebyname (sbuf, UrlMap)) == -1)
return U_UNKNOWN;
int url_parse_file (char *d, const char *src, size_t dl)
{
- if (strncasecmp (src, "file:", 5))
+ if (ascii_strncasecmp (src, "file:", 5))
return -1;
- else if (!strncasecmp (src, "file://", 7)) /* we don't support remote files */
+ else if (!ascii_strncasecmp (src, "file://", 7)) /* we don't support remote files */
return -1;
else
strfcpy (d, src + 5, dl);
url_pct_decode (tag);
url_pct_decode (value);
- if (!strcasecmp (tag, "body"))
+ if (!ascii_strcasecmp (tag, "body"))
mutt_str_replace (body, value);
else
{