]> diplodocus.org Git - nmh/blobdiff - uip/mhparse.c
sbr/vector.c: Zero the growth with memset(3), not loop.
[nmh] / uip / mhparse.c
index 2be9760359526cd446863c4bc0eb3cee9dc33cbf..e10cd193a6b7bac9ab126fc2889660ad4de657fa 100644 (file)
@@ -1,6 +1,4 @@
-
-/*
- * mhparse.c -- routines to parse the contents of MIME messages
+/* mhparse.c -- routines to parse the contents of MIME messages
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
@@ -245,8 +243,8 @@ parse_mime (char *file)
            return NULL;
        }
        fseek (fp, 0L, SEEK_SET);
            return NULL;
        }
        fseek (fp, 0L, SEEK_SET);
-    } else if (lstat (file, &statbuf) == NOTOK) {
-       advise (file, "unable to lstat");
+    } else if (stat (file, &statbuf) == NOTOK) {
+       advise (file, "unable to stat");
        return NULL;
     } else if (S_ISDIR(statbuf.st_mode)) {
        /* Don't try to parse a directory. */
        return NULL;
     } else if (S_ISDIR(statbuf.st_mode)) {
        /* Don't try to parse a directory. */
@@ -413,7 +411,7 @@ get_content (FILE *in, char *file, int toplevel)
            ucmp = !strcasecmp (cp, VRSN_VALUE);
            *dp = c;
            if (!ucmp) {
            ucmp = !strcasecmp (cp, VRSN_VALUE);
            *dp = c;
            if (!ucmp) {
-               admonish (NULL, "message %s has unknown value for %s: field (%s)",
+               inform("message %s has unknown value for %s: field (%s), continuing...",
                ct->c_file, VRSN_FIELD, cp);
            }
            if (!ct->c_vrsn) {
                ct->c_file, VRSN_FIELD, cp);
            }
            if (!ct->c_vrsn) {
@@ -1103,13 +1101,12 @@ InitMultiPart (CT ct)
        while (bp >= cte && isspace ((unsigned char) *bp)) *bp-- = '\0';
        for (bp = cte; *bp && isblank ((unsigned char) *bp); ++bp) continue;
 
        while (bp >= cte && isspace ((unsigned char) *bp)) *bp-- = '\0';
        for (bp = cte; *bp && isblank ((unsigned char) *bp); ++bp) continue;
 
-       admonish (NULL,
-                 "\"%s/%s\" type in message %s must be encoded in\n"
-                 "7bit, 8bit, or binary, per RFC 2045 (6.4).  "
-                  "mhfixmsg -fixcte can fix it, or\n"
-                  "manually edit the file and change the \"%s\"\n"
-                 "Content-Transfer-Encoding to one of those.  For now",
-                 ci->ci_type, ci->ci_subtype, ct->c_file, bp);
+       inform("\"%s/%s\" type in message %s must be encoded in\n"
+           "7bit, 8bit, or binary, per RFC 2045 (6.4).  "
+           "mhfixmsg -fixcte can fix it, or\n"
+           "manually edit the file and change the \"%s\"\n"
+           "Content-Transfer-Encoding to one of those.  For now, continuing...",
+           ci->ci_type, ci->ci_subtype, ct->c_file, bp);
        free (cte);
 
        return NOTOK;
        free (cte);
 
        return NOTOK;
@@ -1398,9 +1395,9 @@ InitMessage (CT ct)
     CI ci = &ct->c_ctinfo;
 
     if ((ct->c_encoding != CE_7BIT) && (ct->c_encoding != CE_8BIT)) {
     CI ci = &ct->c_ctinfo;
 
     if ((ct->c_encoding != CE_7BIT) && (ct->c_encoding != CE_8BIT)) {
-       admonish (NULL,
-                 "\"%s/%s\" type in message %s should be encoded in 7bit or 8bit",
-                 ci->ci_type, ci->ci_subtype, ct->c_file);
+       inform("\"%s/%s\" type in message %s should be encoded in "
+           "7bit or 8bit, continuing...", ci->ci_type, ci->ci_subtype,
+           ct->c_file);
        return NOTOK;
     }
 
        return NOTOK;
     }