]> diplodocus.org Git - nmh/blobdiff - uip/show.c
Added global variable skip_mp_cte_check to turn off that check
[nmh] / uip / show.c
index 766aec947906f1a1dea3adeb7b5ba4add31dfe83..f513ebd5390e34f7f5be8db7bf252a4855b108b7 100644 (file)
@@ -332,8 +332,7 @@ static int
 is_nontext (char *msgnam)
 {
     int        result, state;
 is_nontext (char *msgnam)
 {
     int        result, state;
-    unsigned char *bp, *dp;
-    char *cp;
+    char *bp, *dp, *cp;
     char buf[BUFSIZ], name[NAMESZ];
     FILE *fp;
     m_getfld_state_t gstate = 0;
     char buf[BUFSIZ], name[NAMESZ];
     FILE *fp;
     m_getfld_state_t gstate = 0;
@@ -363,7 +362,7 @@ is_nontext (char *msgnam)
                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;
@@ -408,17 +407,17 @@ invalid:
                    if ((result = (mh_strcasecmp (bp, "plain") != 0)))
                        goto out;
                    *dp = c;
                    if ((result = (mh_strcasecmp (bp, "plain") != 0)))
                        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, '"')))
                            dp++;
                        if (*dp == '"') {
                            if ((bp = strchr(++dp, '"')))
@@ -448,6 +447,7 @@ out:
                free (cp);
                if (result) {
                    fclose (fp);
                free (cp);
                if (result) {
                    fclose (fp);
+                   m_getfld_state_destroy (&gstate);
                    return result;
                }
                break;
                    return result;
                }
                break;
@@ -463,9 +463,9 @@ out:
                    state = m_getfld (&gstate, name, buf, &bufsz, fp);
                    cp = add (buf, cp);
                }
                    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;
                    continue;
-               for (dp = bp; istoken (*dp); dp++)
+               for (dp = bp; istoken ((unsigned char) *dp); dp++)
                    continue;
                *dp = '\0';
                result = (mh_strcasecmp (bp, "7bit")
                    continue;
                *dp = '\0';
                result = (mh_strcasecmp (bp, "7bit")
@@ -475,6 +475,7 @@ out:
                free (cp);
                if (result) {
                    fclose (fp);
                free (cp);
                if (result) {
                    fclose (fp);
+                   m_getfld_state_destroy (&gstate);
                    return result;
                }
                break;
                    return result;
                }
                break;
@@ -496,8 +497,8 @@ out:
             */
        default:
            fclose (fp);
             */
        default:
            fclose (fp);
+           m_getfld_state_destroy (&gstate);
            return 0;
        }
     }
            return 0;
        }
     }
-    m_getfld_state_destroy (&gstate);
 }
 }