]> diplodocus.org Git - nmh/blobdiff - uip/mshcmds.c
Finished replacing mh_strcasecmp() with strcasecmp(). Removed
[nmh] / uip / mshcmds.c
index 6ea1126c5039bb0b88edbcf0df6aa2d1df031d63..a6847d51b03d6ce2930ce1c0fc94f8e6b4177b43 100644 (file)
@@ -2105,10 +2105,10 @@ showcmd (char **args)
     char *cp, *proc = showproc, buf[BUFSIZ];
     char *msgs[MAXARGS], *vec[MAXARGS];
 
     char *cp, *proc = showproc, buf[BUFSIZ];
     char *msgs[MAXARGS], *vec[MAXARGS];
 
-    if (!mh_strcasecmp (cmd_name, "next"))
+    if (!strcasecmp (cmd_name, "next"))
        mode = 1;
     else
        mode = 1;
     else
-       if (!mh_strcasecmp (cmd_name, "prev"))
+       if (!strcasecmp (cmd_name, "prev"))
            mode = -1;
     while ((cp = *args++)) {
        if (*cp == '-')
            mode = -1;
     while ((cp = *args++)) {
        if (*cp == '-')
@@ -2332,8 +2332,7 @@ static int
 is_nontext (int msgnum)
 {
     int        result, state;
 is_nontext (int msgnum)
 {
     int        result, state;
-    unsigned char *bp, *dp;
-    char *cp;
+    char *bp, *dp, *cp;
     char buf[BUFSIZ], name[NAMESZ];
     FILE *fp;
 
     char buf[BUFSIZ], name[NAMESZ];
     FILE *fp;
 
@@ -2351,7 +2350,7 @@ is_nontext (int msgnum)
            /*
             * Check Content-Type field
             */
            /*
             * Check Content-Type field
             */
-           if (!mh_strcasecmp (name, TYPE_FIELD)) {
+           if (!strcasecmp (name, TYPE_FIELD)) {
                int passno;
                char c;
 
                int passno;
                char c;
 
@@ -2365,7 +2364,7 @@ is_nontext (int msgnum)
                passno = 1;
 
 again:
                passno = 1;
 
 again:
-               for (; isspace (*bp); bp++)
+               for (; isspace ((unsigned char) *bp); bp++)
                    continue;
                if (*bp == '(') {
                    int i;
                    continue;
                if (*bp == '(') {
                    int i;
@@ -2407,27 +2406,27 @@ invalid:
                if (!*bp)
                    goto invalid;
                if (passno > 1) {
                if (!*bp)
                    goto invalid;
                if (passno > 1) {
-                   if ((result = (mh_strcasecmp (bp, "plain") != 0)))
+                   if ((result = (strcasecmp (bp, "plain") != 0)))
                        goto out;
                    *dp = c;
                        goto out;
                    *dp = c;
-                   for (dp++; isspace (*dp); dp++)
+                   for (dp++; isspace ((unsigned char) *dp); dp++)
                        continue;
                    if (*dp) {
                        if ((result = !uprf (dp, "charset")))
                            goto out;
                        dp += sizeof "charset" - 1;
                        continue;
                    if (*dp) {
                        if ((result = !uprf (dp, "charset")))
                            goto out;
                        dp += sizeof "charset" - 1;
-                       while (isspace (*dp))
+                       while (isspace ((unsigned char) *dp))
                            dp++;
                        if (*dp++ != '=')
                            goto invalid;
                            dp++;
                        if (*dp++ != '=')
                            goto invalid;
-                       while (isspace (*dp))
+                       while (isspace ((unsigned char) *dp))
                            dp++;
                        if (*dp == '"') {
                            if ((bp = strchr(++dp, '"')))
                                *bp = '\0';
                        } else {
                            for (bp = dp; *bp; bp++)
                            dp++;
                        if (*dp == '"') {
                            if ((bp = strchr(++dp, '"')))
                                *bp = '\0';
                        } else {
                            for (bp = dp; *bp; bp++)
-                               if (isspace (*bp)) {
+                               if (isspace ((unsigned char) *bp)) {
                                    *bp = '\0';
                                    break;
                                }
                                    *bp = '\0';
                                    break;
                                }
@@ -2439,7 +2438,7 @@ invalid:
                    /* Check the character set */
                    result = !check_charset (dp, strlen (dp));
                } else {
                    /* Check the character set */
                    result = !check_charset (dp, strlen (dp));
                } else {
-                   if (!(result = (mh_strcasecmp (bp, "text") != 0))) {
+                   if (!(result = (strcasecmp (bp, "text") != 0))) {
                        *dp = c;
                        bp = dp;
                        passno = 2;
                        *dp = c;
                        bp = dp;
                        passno = 2;
@@ -2458,21 +2457,21 @@ out:
            /*
             * Check Content-Transfer-Encoding field
             */
            /*
             * Check Content-Transfer-Encoding field
             */
-           if (!mh_strcasecmp (name, ENCODING_FIELD)) {
+           if (!strcasecmp (name, ENCODING_FIELD)) {
                cp = add (buf, NULL);
                while (state == FLDPLUS) {
                    bufsz = sizeof buf;
                    state = m_getfld (&gstate, name, buf, &bufsz, fp);
                    cp = add (buf, cp);
                }
                cp = add (buf, NULL);
                while (state == FLDPLUS) {
                    bufsz = sizeof buf;
                    state = m_getfld (&gstate, name, buf, &bufsz, fp);
                    cp = add (buf, cp);
                }
-               for (bp = cp; isspace (*bp); bp++)
+               for (bp = cp; isspace ((unsigned char) *bp); bp++)
                    continue;
                for (dp = bp; istoken (*dp); dp++)
                    continue;
                *dp = '\0';
                    continue;
                for (dp = bp; istoken (*dp); dp++)
                    continue;
                *dp = '\0';
-               result = (mh_strcasecmp (bp, "7bit")
-                      && mh_strcasecmp (bp, "8bit")
-                      && mh_strcasecmp (bp, "binary"));
+               result = (strcasecmp (bp, "7bit")
+                      && strcasecmp (bp, "8bit")
+                      && strcasecmp (bp, "binary"));
 
                free (cp);
                if (result) {
 
                free (cp);
                if (result) {
@@ -2658,7 +2657,7 @@ get_fields (char *datesw, char *subjsw, int msgnum, struct Msg *msgp)
        switch (state = m_getfld (&gstate, name, buf, &bufsz, zp)) {
            case FLD: 
            case FLDPLUS: 
        switch (state = m_getfld (&gstate, name, buf, &bufsz, zp)) {
            case FLD: 
            case FLDPLUS: 
-               if (!mh_strcasecmp (name, datesw)) {
+               if (!strcasecmp (name, datesw)) {
                    bp = getcpy (buf);
                    while (state == FLDPLUS) {
                        bufsz = sizeof buf;
                    bp = getcpy (buf);
                    while (state == FLDPLUS) {
                        bufsz = sizeof buf;
@@ -2676,7 +2675,7 @@ get_fields (char *datesw, char *subjsw, int msgnum, struct Msg *msgp)
                        break;          /* all done! */
                    gotdate++;
                }
                        break;          /* all done! */
                    gotdate++;
                }
-               else if (subjsw && !mh_strcasecmp(name, subjsw)) {
+               else if (subjsw && !strcasecmp(name, subjsw)) {
                    bp = getcpy (buf);
                    while (state == FLDPLUS) {
                        bufsz = sizeof buf;
                    bp = getcpy (buf);
                    while (state == FLDPLUS) {
                        bufsz = sizeof buf;
@@ -2759,7 +2758,7 @@ sosmash (char *subj, char *s)
     if (s) {
        cp = s;
        dp = s; /* dst pointer */
     if (s) {
        cp = s;
        dp = s; /* dst pointer */
-       if (!mh_strcasecmp (subj, "subject"))
+       if (!strcasecmp (subj, "subject"))
            while ((c = *cp)) {
                if (! isspace(c)) {
                    if(uprf(cp, "re:"))
            while ((c = *cp)) {
                if (! isspace(c)) {
                    if(uprf(cp, "re:"))