]> diplodocus.org Git - nmh/commitdiff
sbr/m_popen.c: Move prototypes from h/prototypes.h to new header.
authorRalph Corderoy <ralph@inputplus.co.uk>
Tue, 16 May 2017 09:36:02 +0000 (10:36 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Tue, 16 May 2017 09:36:02 +0000 (10:36 +0100)
Makefile.am
h/prototypes.h
sbr/m_popen.c
sbr/m_popen.h [new file with mode: 0644]
uip/mhlsbr.c
uip/mhshow.c

index 6d2488e0d7897365c34a9173126d4e0ed877c0f1..32bcb6e1ea7121db48b938f36ab665ec978e0b29 100644 (file)
@@ -361,6 +361,7 @@ noinst_HEADERS = \
     sbr/lock_file.h \
     sbr/m_maildir.h \
     sbr/m_mktemp.h \
+    sbr/m_popen.h \
     sbr/m_rand.h \
     thirdparty/jsmn/jsmn.h \
     uip/mhfree.h \
index c9bac8d8dc832448d6e0c65d4772f4a6e23e368f..452e6a163dc5617bfe26a0b8f7d8738b388181db 100644 (file)
@@ -232,22 +232,6 @@ int m_getfld (m_getfld_state_t *, char[NAMESZ], char *, int *, FILE *);
 int m_gmprot (void);
 char *m_name (int);
 
-/*
- * Create a subprocess and redirect our standard output to it.
- *
- * Arguments are:
- *
- * name                - Name of process to create
- * savestdout  - If true, will save the current stdout file descriptor and
- *               m_pclose() will close it at the appropriate time.
- */
-void m_popen(char *name, int savestdout);
-
-/*
- * Wait for the last process opened by m_popen().
- */
-void m_pclose(void);
-
 void m_unknown(m_getfld_state_t *, FILE *);
 int makedir (const char *);
 char *message_id (time_t, int);
index 17203de8afa236815e759ae346e2bc5498218431..1fb0cfb4429ac48ce519ea26166c5558291961d2 100644 (file)
@@ -8,6 +8,7 @@
 
 #include <h/mh.h>
 #include <h/signals.h>
+#include "m_popen.h"
 
 static int m_pid = NOTOK;      /* Process we're waiting for */
 static  int sd = NOTOK;                /* Original standard output */
diff --git a/sbr/m_popen.h b/sbr/m_popen.h
new file mode 100644 (file)
index 0000000..09d8ade
--- /dev/null
@@ -0,0 +1,22 @@
+/* m_popen.h -- redirect standard output to a popen(3)'d process.
+ *
+ * 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.
+ */
+
+/*
+ * Create a subprocess and redirect our standard output to it.
+ *
+ * Arguments are:
+ *
+ * name                - Name of process to create
+ * savestdout  - If true, will save the current stdout file descriptor and
+ *               m_pclose() will close it at the appropriate time.
+ */
+void m_popen(char *name, int savestdout);
+
+/*
+ * Wait for the last process opened by m_popen().
+ */
+void m_pclose(void);
index 3967c634f733400f1541c79f679a10c0f7e6bbbd..a4402c567301d6eab9c44e7ec3f2b4efd1ad9b6c 100644 (file)
@@ -11,6 +11,7 @@
 #include <h/fmt_scan.h>
 #include <h/tws.h>
 #include <h/utils.h>
+#include "../sbr/m_popen.h"
 #include <setjmp.h>
 #include <sys/types.h>
 
index cf3940b448cb5cfbb2773eccf6f66e5c38914dee..075909111437f7393e1bd561888f108a260a8f9e 100644 (file)
@@ -17,6 +17,7 @@
 #include <h/mhcachesbr.h>
 #include <h/utils.h>
 #include "../sbr/m_maildir.h"
+#include "../sbr/m_popen.h"
 #include "mhfree.h"
 #include "mhshowsbr.h"