]> diplodocus.org Git - nmh/commitdiff
mhparse: Change mhfixmsg flags from int to bool.
authorRalph Corderoy <ralph@inputplus.co.uk>
Mon, 28 Aug 2017 13:45:16 +0000 (14:45 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Mon, 28 Aug 2017 13:45:16 +0000 (14:45 +0100)
h/mhparse.h
uip/mhfixmsg.c
uip/mhparse.c

index cc7e0df1f48f736740d60e2bf2176d93453d9dd0..9ed2b3b62f0d794eac2e284ffc2fd73422940878 100644 (file)
@@ -519,12 +519,12 @@ int mhstoreinfo_files_not_clobbered(const mhstoreinfo_t) PURE;
 void mhstoreinfo_free(mhstoreinfo_t);
 void store_all_messages (mhstoreinfo_t);
 
 void mhstoreinfo_free(mhstoreinfo_t);
 void store_all_messages (mhstoreinfo_t);
 
-extern int skip_mp_cte_check;
-extern int suppress_bogus_mp_content_warning;
-extern int bogus_mp_content;
-extern int suppress_extraneous_trailing_semicolon_warning;
+extern bool skip_mp_cte_check;
+extern bool suppress_bogus_mp_content_warning;
+extern bool bogus_mp_content;
+extern bool suppress_extraneous_trailing_semicolon_warning;
 
 
-extern int suppress_multiple_mime_version_warning;
+extern bool suppress_multiple_mime_version_warning;
 
 #define        NPREFS  20
 extern char *preferred_types[NPREFS];
 
 #define        NPREFS  20
 extern char *preferred_types[NPREFS];
index 59326ea2533b1a6742dfcdaba988274cf5d289c9..a05177a367689c447e4cb40c9c67ff60f15f2983 100644 (file)
@@ -302,8 +302,8 @@ main (int argc, char **argv) {
         fclose (fp);
     }
 
         fclose (fp);
     }
 
-    suppress_bogus_mp_content_warning = skip_mp_cte_check = 1;
-    suppress_extraneous_trailing_semicolon_warning = 1;
+    suppress_bogus_mp_content_warning = skip_mp_cte_check = true;
+    suppress_extraneous_trailing_semicolon_warning = true;
 
     if (! context_find ("path")) {
         free (path ("./", TFOLDER));
 
     if (! context_find ("path")) {
         free (path ("./", TFOLDER));
index 25525679c911317b3b8bca6cc02b83e5fc61bcf9..94fd50bca59c07a0282cbc495736ec4e7aced366 100644 (file)
@@ -34,15 +34,15 @@ int checksw = 0;    /* check Content-MD5 field */
  * 3) Suppress the warning about extraneous trailing ';' in header parameter
  *    lists.
  */
  * 3) Suppress the warning about extraneous trailing ';' in header parameter
  *    lists.
  */
-int skip_mp_cte_check;
-int suppress_bogus_mp_content_warning;
-int bogus_mp_content;
-int suppress_extraneous_trailing_semicolon_warning;
+bool skip_mp_cte_check;
+bool suppress_bogus_mp_content_warning;
+bool bogus_mp_content;
+bool suppress_extraneous_trailing_semicolon_warning;
 
 /*
  * By default, suppress warning about multiple MIME-Version header fields.
  */
 
 /*
  * By default, suppress warning about multiple MIME-Version header fields.
  */
-int suppress_multiple_mime_version_warning = 1;
+bool suppress_multiple_mime_version_warning = true;
 
 /* list of preferred type/subtype pairs, for -prefer */
 char *preferred_types[NPREFS];
 
 /* list of preferred type/subtype pairs, for -prefer */
 char *preferred_types[NPREFS];
@@ -198,7 +198,7 @@ parse_mime (char *file)
     size_t n;
     struct stat statbuf;
 
     size_t n;
     struct stat statbuf;
 
-    bogus_mp_content = 0;
+    bogus_mp_content = false;
 
     /*
      * Check if file is actually standard input
 
     /*
      * Check if file is actually standard input
@@ -1223,7 +1223,7 @@ end_part:
     if (! suppress_bogus_mp_content_warning) {
         inform("bogus multipart content in message %s", ct->c_file);
     }
     if (! suppress_bogus_mp_content_warning) {
         inform("bogus multipart content in message %s", ct->c_file);
     }
-    bogus_mp_content = 1;
+    bogus_mp_content = true;
 
     if (!inout && part) {
        p = part->mp_part;
 
     if (!inout && part) {
        p = part->mp_part;