summaryrefslogtreecommitdiffstats
path: root/charset.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1998-11-10 22:14:00 +0000
committerThomas Roessler <roessler@does-not-exist.org>1998-11-10 22:14:00 +0000
commita3f726e35f1e7d918061074a85ebe7a2c7c300a5 (patch)
treed9ab2a281be2a13fbb1ec8682d4e5c7ff0502cde /charset.c
parent912c6b0df82fe3a2745d68131db9300222226a73 (diff)
Introduce or rewrite mutt_{str*cmp,strlen} and use them all over the
place. If there are still segmentation faults due to missing NONULLs over, they are gone now.
Diffstat (limited to 'charset.c')
-rw-r--r--charset.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/charset.c b/charset.c
index ed094bc8..013b4d71 100644
--- a/charset.c
+++ b/charset.c
@@ -54,7 +54,7 @@ static void canonical_charset(char *dest, size_t dlen, const char *name)
{
int i;
- if(!strncasecmp(name, "x-", 2))
+ if(!mutt_strncasecmp(name, "x-", 2))
name = name + 2;
for(i = 0; name[i] && i < dlen - 1; i++)
@@ -85,7 +85,7 @@ static CHARSET *load_charset(const char *name)
if(fgets(buffer, sizeof(buffer), fp) == NULL)
goto bail;
- if(strcmp(buffer, CHARSET_MAGIC) != 0)
+ if(mutt_strcmp(buffer, CHARSET_MAGIC) != 0)
goto bail;
chs->map = safe_malloc(sizeof(CHARSET_MAP));
@@ -212,7 +212,7 @@ CHARSET_MAP *mutt_get_translation(const char *_from, const char *_to)
to = to_canon;
/* quick check for the identity mapping */
- if((from == to) || ((*from == *to) && !strcmp(from, to)))
+ if((from == to) || ((*from == *to) && !mutt_strcmp(from, to)))
return NULL;
snprintf(key, sizeof(key), "%s %s", from, to);
@@ -260,7 +260,7 @@ int mutt_is_utf8(const char *s)
return 0;
canonical_charset(buffer, sizeof(buffer), s);
- return !strcmp(buffer, "utf-8");
+ return !mutt_strcmp(buffer, "utf-8");
}
/* macros for the various bit maps we need */