]> diplodocus.org Git - nmh/commitdiff
uip/mhshowsbr.c: Create header file with exports' declarations.
authorRalph Corderoy <ralph@inputplus.co.uk>
Mon, 15 May 2017 16:14:01 +0000 (17:14 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Mon, 15 May 2017 16:34:18 +0000 (17:34 +0100)
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.

Makefile.am
uip/mhn.c
uip/mhshow.c
uip/mhshowsbr.c
uip/mhshowsbr.h [new file with mode: 0644]

index 89c84b91f593ce47afe561984c38b08d8158650d..c1a39063a2e60bee0ad2105806501fd263b015ee 100644 (file)
@@ -362,6 +362,7 @@ noinst_HEADERS = \
     thirdparty/jsmn/jsmn.h \
     uip/mhfree.h \
     uip/mhoutsbr.h \
+    uip/mhshowsbr.h \
     #
 
 ##
index 816f8d9f80b1329d8cc3ae2ee687861832b626fb..6a525917e5f60d97da83bad6765a49a0b397830d 100644 (file)
--- a/uip/mhn.c
+++ b/uip/mhn.c
@@ -16,6 +16,7 @@
 #include <h/mhcachesbr.h>
 #include <h/utils.h>
 #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;
index a294c90ebe008ef9b1ff15618f6d46b27fe21540..073194890d456d9eb22cb16bc0d623ae4401692f 100644 (file)
@@ -16,6 +16,7 @@
 #include <h/mhcachesbr.h>
 #include <h/utils.h>
 #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;
index b2cdfb54d40ab7fb0f677824e598bfb2601d5aba..fe64e734e8084793d0b4721c458b82ac38bdcead 100644 (file)
@@ -15,6 +15,7 @@
 #include <h/mhparse.h>
 #include <h/fmt_scan.h>
 #include <h/utils.h>
+#include "mhshowsbr.h"
 #include "../sbr/m_mktemp.h"
 #ifdef HAVE_ICONV
 #   include <iconv.h>
diff --git a/uip/mhshowsbr.h b/uip/mhshowsbr.h
new file mode 100644 (file)
index 0000000..83c62bf
--- /dev/null
@@ -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;