sbr/strcasecmp.c.
sbr/seq_print.c sbr/seq_read.c sbr/seq_save.c \
sbr/seq_setcur.c sbr/seq_setprev.c sbr/seq_setunseen.c \
sbr/showfile.c sbr/signals.c sbr/smatch.c \
- sbr/snprintb.c sbr/ssequal.c sbr/strcasecmp.c \
+ sbr/snprintb.c sbr/ssequal.c \
sbr/strindex.c sbr/trimcpy.c sbr/uprf.c sbr/vfgets.c \
sbr/fmt_def.c sbr/mf.c sbr/utils.c sbr/ctype-checked.c \
sbr/m_mktemp.c sbr/getansreadline.c config/config.c \
int vfgets (FILE *, char **);
char *write_charset_8bit (void);
-int mh_strcasecmp (const char *s1, const char *s2);
-int strncasecmp (const char *s1, const char *s2, size_t n);
-
/*
* some prototypes for address parsing system
/* Convert name of message id style to integer value and store it. */
int
save_message_id_style (const char *value) {
- if (! mh_strcasecmp (value, "localname")) {
+ if (! strcasecmp (value, "localname")) {
message_id_style = NMH_MESSAGE_ID_LOCALNAME;
return 0;
- } else if (! mh_strcasecmp (value, "random")) {
+ } else if (! strcasecmp (value, "random")) {
message_id_style = NMH_MESSAGE_ID_RANDOM;
return 0;
} else {
/* Convert name of mts method to integer value and store it. */
void
save_mts_method (const char *value) {
- if (! mh_strcasecmp (value, "smtp")) {
+ if (! strcasecmp (value, "smtp")) {
mts_method = "smtp";
sm_mts = MTS_SMTP;
- } else if (! mh_strcasecmp (value, "sendmail/smtp") ||
- ! mh_strcasecmp (value, "sendmail")) {
+ } else if (! strcasecmp (value, "sendmail/smtp") ||
+ ! strcasecmp (value, "sendmail")) {
mts_method = "sendmail/smtp";
sm_mts = MTS_SENDMAIL_SMTP;
- } else if (! mh_strcasecmp (value, "sendmail/pipe")) {
+ } else if (! strcasecmp (value, "sendmail/pipe")) {
mts_method = "sendmail/pipe";
sm_mts = MTS_SENDMAIL_PIPE;
} else {
if (strlen (np->n_name) > 0 && strcmp ("#", np->n_name)) {
struct node *np2;
for (np2 = np->n_next; np2; np2 = np2->n_next) {
- if (! mh_strcasecmp (np->n_name, np2->n_name)) {
+ if (! strcasecmp (np->n_name, np2->n_name)) {
admonish (NULL, "multiple \"%s\" profile components "
"in %s, ignoring \"%s\"",
np->n_name, defpath, np2->n_field);
+++ /dev/null
-
-/*
- * strcasecmp.c -- compare strings, ignoring case
- *
- * This code is Copyright (c) 2002, by the authors of nmh. See the
- * COPYRIGHT file in the root directory of the nmh distribution for
- * complete copyright information.
- */
-
-#include <h/mh.h>
-
-/*
- * Our version of strcasecmp has to deal with NULL strings.
- * Once that is fixed in the rest of the code, we can use the
- * native version, instead of this one.
- */
-
-int
-mh_strcasecmp (const char *s1, const char *s2)
-{
- const unsigned char *us1, *us2;
-
- us1 = (const unsigned char *) s1,
- us2 = (const unsigned char *) s2;
-
- if (!us1)
- us1 = (const unsigned char *) "";
- if (!us2)
- us2 = (const unsigned char *) "";
-
- while (tolower(*us1) == tolower(*us2++))
- if (*us1++ == '\0')
- return (0);
- return (tolower(*us1) - tolower(*--us2));
-}
-
-
-int
-mh_strncasecmp (const char *s1, const char *s2, size_t n)
-{
- const unsigned char *us1, *us2;
-
- if (n != 0) {
- us1 = (const unsigned char *) s1,
- us2 = (const unsigned char *) s2;
-
- do {
- if (tolower(*us1) != tolower(*us2++))
- return (tolower(*us1) - tolower(*--us2));
- if (*us1++ == '\0')
- break;
- } while (--n != 0);
- }
- return (0);
-}