From: Ralph Corderoy Date: Mon, 28 Aug 2017 13:45:16 +0000 (+0100) Subject: mhparse: Change mhfixmsg flags from int to bool. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/6f9d27d45bd1ba8299ed15d53cdb76a365d641c5?hp=0960755b43eeadb9af44c924cf85b39bd2fb78f6 mhparse: Change mhfixmsg flags from int to bool. --- diff --git a/h/mhparse.h b/h/mhparse.h index cc7e0df1..9ed2b3b6 100644 --- a/h/mhparse.h +++ b/h/mhparse.h @@ -519,12 +519,12 @@ int mhstoreinfo_files_not_clobbered(const mhstoreinfo_t) PURE; 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]; diff --git a/uip/mhfixmsg.c b/uip/mhfixmsg.c index 59326ea2..a05177a3 100644 --- a/uip/mhfixmsg.c +++ b/uip/mhfixmsg.c @@ -302,8 +302,8 @@ main (int argc, char **argv) { 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)); diff --git a/uip/mhparse.c b/uip/mhparse.c index 25525679..94fd50bc 100644 --- a/uip/mhparse.c +++ b/uip/mhparse.c @@ -34,15 +34,15 @@ int checksw = 0; /* check Content-MD5 field */ * 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. */ -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]; @@ -198,7 +198,7 @@ parse_mime (char *file) size_t n; struct stat statbuf; - bogus_mp_content = 0; + bogus_mp_content = false; /* * 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); } - bogus_mp_content = 1; + bogus_mp_content = true; if (!inout && part) { p = part->mp_part;