/* US-ASCII is a subset of the ISO-8859-X and UTF-8 character sets */
if (!strncasecmp("ISO-8859-", mm_charset, 9) ||
- !mh_strcasecmp("UTF-8", mm_charset)) {
+ !strcasecmp("UTF-8", mm_charset)) {
alt_charset = "US-ASCII";
alt_len = strlen (alt_charset);
}
register struct node *np, *pp;
for (np = m_defs, pp = NULL; np; pp = np, np = np->n_next) {
- if (!mh_strcasecmp (np->n_name, key)) {
+ if (!strcasecmp (np->n_name ? np->n_name : "", key ? key : "")) {
if (!np->n_context)
admonish (NULL, "bug: context_del(key=\"%s\")", np->n_name);
if (pp)
struct node *np;
for (np = m_defs; np; np = np->n_next)
- if (!mh_strcasecmp (np->n_name, str))
+ if (!strcasecmp (np->n_name ? np->n_name : "", str ? str : ""))
return (np->n_field);
return NULL;
* this key, and replace its value if found.
*/
for (np = m_defs;; np = np->n_next) {
- if (!mh_strcasecmp (np->n_name, key)) {
+ if (!strcasecmp (np->n_name ? np->n_name : "", key ? key : "")) {
if (strcmp (value, np->n_field)) {
if (!np->n_context)
admonish (NULL, "bug: context_replace(key=\"%s\",value=\"%s\")", key, value);
cm->c_text = NULL;
}
}
-
+
/*
* Find a component in our hash table. This is just a public interface to
* the FINDCOMP macro, so we don't have to expose our hash table.
struct comp *cm;
for (cm = wantcomp[CHASH(component)]; cm; cm = cm->c_next)
- if (mh_strcasecmp(component, cm->c_name) == 0)
+ if (strcasecmp(component, cm->c_name ? cm->c_name : "") == 0)
break;
return cm;
char *cp;
while (cptr) {
- if (mh_strcasecmp(component, cptr->c_name) == 0) {
+ if (strcasecmp(component, cptr->c_name ? cptr->c_name : "") == 0) {
found++;
if (! cptr->c_text) {
- cptr->c_text = getcpy(text);
+ cptr->c_text = getcpy(text);
} else {
- i = strlen(cp = cptr->c_text) - 1;
+ i = strlen(cp = cptr->c_text) - 1;
if (cp[i] == '\n') {
if (cptr->c_type & CT_ADDR) {
- cp[i] = '\0';
+ cp[i] = '\0';
cp = add(",\n\t", cp);
} else {
- cp = add("\t", cp);
+ cp = add("\t", cp);
}
}
cptr->c_text = add(text, cp);
if (bucket != -1) {
for (cptr = wantcomp[bucket]; cptr; cptr = cptr->c_next)
- if (mh_strcasecmp(component, cptr->c_name) == 0)
+ if (strcasecmp(component, cptr->c_name ? cptr->c_name : "") == 0)
cptr->c_text = add(text, cptr->c_text);
}
}
/* .. it can't. We'll use iconv then. */
*endofcharset = '\0';
cd = iconv_open(get_charset(), startofmime);
- fromutf8 = !mh_strcasecmp(startofmime, "UTF-8");
+ fromutf8 = !strcasecmp(startofmime, "UTF-8");
*pp = '?';
if (cd == (iconv_t)-1) continue;
use_iconv = 1;
static enum locktype
init_locktype(const char *lockname)
{
- if (mh_strcasecmp(lockname, "fcntl") == 0) {
+ if (strcasecmp(lockname, "fcntl") == 0) {
return FCNTL_LOCKING;
- } else if (mh_strcasecmp(lockname, "lockf") == 0) {
+ } else if (strcasecmp(lockname, "lockf") == 0) {
#ifdef HAVE_LOCKF
return LOCKF_LOCKING;
#else /* ! HAVE_LOCKF */
adios(NULL, "lockf not supported on this system");
#endif /* HAVE_LOCKF */
- } else if (mh_strcasecmp(lockname, "flock") == 0) {
+ } else if (strcasecmp(lockname, "flock") == 0) {
#ifdef HAVE_FLOCK
return FLOCK_LOCKING;
#else /* ! HAVE_FLOCK */
adios(NULL, "flock not supported on this system");
#endif /* HAVE_FLOCK */
- } else if (mh_strcasecmp(lockname, "dot") == 0) {
+ } else if (strcasecmp(lockname, "dot") == 0) {
return DOT_LOCKING;
} else {
adios(NULL, "Unknown lock type: \"%s\"", lockname);
/*
* Allow match either for user's host name.
*/
- if (mh_strcasecmp(host, tokval) == 0)
+ if (strcasecmp(host, tokval) == 0)
goto match;
continue;
}