diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 2001-04-26 13:36:33 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 2001-04-26 13:36:33 +0000 |
commit | c73ebd9aa108d55a09c7eebbf9a81e3453fa0c3b (patch) | |
tree | a35487e7f469b6510dab2172a21c8c7d36265033 /attach.c | |
parent | 3f16589816ab217ec425ecbf026a9a5ade18333f (diff) |
Add ascii_strcasecmp() and ascii_strncasecmp() functions which do
locale-independent and case-insensitive string comparisons. Needed
for mutt to work in iso-8859-9 environments, where tolower('I') !=
'i'.
Diffstat (limited to 'attach.c')
-rw-r--r-- | attach.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -302,12 +302,12 @@ static int is_mmnoask (const char *buf) { 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); } } @@ -350,8 +350,8 @@ int mutt_is_autoview (BODY *b, const char *type) { 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; } @@ -940,8 +940,8 @@ int mutt_print_attachment (FILE *fp, BODY *a) 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)); } |