From: Ralph Corderoy Date: Mon, 15 May 2017 16:14:01 +0000 (+0100) Subject: uip/mhshowsbr.c: Create header file with exports' declarations. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/cc0f051deed6b5c34de8cb12a3bae10287743d0a?ds=inline;hp=--cc uip/mhshowsbr.c: Create header file with exports' declarations. Create a single set of externs for mhshowsbr.c's global variables. Have the other users of those use the new include file instead of their own declarations. --- cc0f051deed6b5c34de8cb12a3bae10287743d0a diff --git a/Makefile.am b/Makefile.am index 89c84b91..c1a39063 100644 --- a/Makefile.am +++ b/Makefile.am @@ -362,6 +362,7 @@ noinst_HEADERS = \ thirdparty/jsmn/jsmn.h \ uip/mhfree.h \ uip/mhoutsbr.h \ + uip/mhshowsbr.h \ # ## diff --git a/uip/mhn.c b/uip/mhn.c index 816f8d9f..6a525917 100644 --- a/uip/mhn.c +++ b/uip/mhn.c @@ -16,6 +16,7 @@ #include #include #include "mhfree.h" +#include "mhshowsbr.h" #define MHN_SWITCHES \ X("auto", 0, AUTOSW) \ @@ -72,12 +73,6 @@ DEFINE_SWITCH_ARRAY(MHN, switches); #undef X -/* mhshowsbr.c */ -extern char *progsw; -extern int nolist; -extern int nomore; /* flags for moreproc/header display */ -extern char *formsw; - /* mhmisc.c */ extern int npart; extern int ntype; diff --git a/uip/mhshow.c b/uip/mhshow.c index a294c90e..07319489 100644 --- a/uip/mhshow.c +++ b/uip/mhshow.c @@ -16,6 +16,7 @@ #include #include #include "mhfree.h" +#include "mhshowsbr.h" #define MHSHOW_SWITCHES \ X("check", 0, CHECKSW) \ @@ -62,15 +63,6 @@ DEFINE_SWITCH_ARRAY(MHSHOW, switches); #undef X -/* mhshowsbr.c */ -extern char *progsw; -extern int nomore; /* flags for moreproc/header display */ -extern char *formsw; -extern char *folder; -extern char *headerform; -extern char *markerform; -extern int headersw; - /* mhmisc.c */ extern int npart; extern int ntype; diff --git a/uip/mhshowsbr.c b/uip/mhshowsbr.c index b2cdfb54..fe64e734 100644 --- a/uip/mhshowsbr.c +++ b/uip/mhshowsbr.c @@ -15,6 +15,7 @@ #include #include #include +#include "mhshowsbr.h" #include "../sbr/m_mktemp.h" #ifdef HAVE_ICONV # include diff --git a/uip/mhshowsbr.h b/uip/mhshowsbr.h new file mode 100644 index 00000000..83c62bfc --- /dev/null +++ b/uip/mhshowsbr.h @@ -0,0 +1,14 @@ +/* mhshowsbr.h -- display the contents of MIME messages. + * + * This code is Copyright (c) 2017, by the authors of nmh. See the + * COPYRIGHT file in the root directory of the nmh distribution for + * complete copyright information. + */ + +extern char *progsw; +extern int nomore; +extern char *formsw; +extern char *folder; +extern char *markerform; +extern char *headerform; +extern int headersw;