From 199e6d2bd26ca97b8991df2a119958f5c94b65e7 Mon Sep 17 00:00:00 2001 From: Ralph Corderoy Date: Fri, 3 Nov 2017 00:28:26 +0000 Subject: [PATCH] pidstatus.c: Move interface to own file. --- Makefile.am | 1 + h/prototypes.h | 1 - sbr/ext_hook.c | 1 + sbr/pidstatus.c | 1 + sbr/pidstatus.h | 7 +++++++ uip/forw.c | 1 + uip/mhbuildsbr.c | 1 + uip/mhlsbr.c | 1 + uip/mhparse.c | 1 + uip/mhshowsbr.c | 1 + uip/post.c | 1 + uip/rcvdist.c | 1 + uip/replsbr.c | 1 + uip/sendsbr.c | 1 + uip/slocal.c | 1 + 15 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 sbr/pidstatus.h diff --git a/Makefile.am b/Makefile.am index 4eead6f9..2497060a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -375,6 +375,7 @@ noinst_HEADERS = \ sbr/message_id.h \ sbr/mime_type.h \ sbr/path.h \ + sbr/pidstatus.h \ sbr/print_help.h \ sbr/print_sw.h \ sbr/print_version.h \ diff --git a/h/prototypes.h b/h/prototypes.h index b02675af..8078bb5d 100644 --- a/h/prototypes.h +++ b/h/prototypes.h @@ -172,7 +172,6 @@ void m_unknown2(m_getfld_state_t *); char *nmh_getpass(const char *); int pidwait (pid_t, int); -int pidstatus (int, FILE *, char *); char *r1bindex(char *, int) PURE; void readconfig (struct node **, FILE *, const char *, int); int refile (char **, char *); diff --git a/sbr/ext_hook.c b/sbr/ext_hook.c index b8892e99..817ab1fa 100644 --- a/sbr/ext_hook.c +++ b/sbr/ext_hook.c @@ -7,6 +7,7 @@ */ #include "h/mh.h" +#include "pidstatus.h" #include "arglist.h" #include "error.h" diff --git a/sbr/pidstatus.c b/sbr/pidstatus.c index ce596a51..ad3aed45 100644 --- a/sbr/pidstatus.c +++ b/sbr/pidstatus.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "pidstatus.h" /* * Return 0 if the command exited with an exit code of zero, a nonzero code diff --git a/sbr/pidstatus.h b/sbr/pidstatus.h new file mode 100644 index 00000000..60b6c748 --- /dev/null +++ b/sbr/pidstatus.h @@ -0,0 +1,7 @@ +/* pidstatus.h -- report child's status + * + * 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. */ + +int pidstatus(int, FILE *, char *); diff --git a/uip/forw.c b/uip/forw.c index afca66a3..78fc48ba 100644 --- a/uip/forw.c +++ b/uip/forw.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/pidstatus.h" #include "sbr/path.h" #include "sbr/print_version.h" #include "sbr/print_help.h" diff --git a/uip/mhbuildsbr.c b/uip/mhbuildsbr.c index d40d291a..adaadd10 100644 --- a/uip/mhbuildsbr.c +++ b/uip/mhbuildsbr.c @@ -14,6 +14,7 @@ */ #include "h/mh.h" +#include "sbr/pidstatus.h" #include "sbr/path.h" #include "sbr/error.h" #include diff --git a/uip/mhlsbr.c b/uip/mhlsbr.c index 7deb9819..42786b7a 100644 --- a/uip/mhlsbr.c +++ b/uip/mhlsbr.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/pidstatus.h" #include "sbr/print_version.h" #include "sbr/print_help.h" #include "sbr/arglist.h" diff --git a/uip/mhparse.c b/uip/mhparse.c index c3042420..df9734e1 100644 --- a/uip/mhparse.c +++ b/uip/mhparse.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/pidstatus.h" #include "sbr/arglist.h" #include "sbr/error.h" #include diff --git a/uip/mhshowsbr.c b/uip/mhshowsbr.c index fca44107..2985af8f 100644 --- a/uip/mhshowsbr.c +++ b/uip/mhshowsbr.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/pidstatus.h" #include "sbr/arglist.h" #include "sbr/error.h" #include diff --git a/uip/post.c b/uip/post.c index 18e1a79e..68ff0254 100644 --- a/uip/post.c +++ b/uip/post.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/pidstatus.h" #include "sbr/print_version.h" #include "sbr/print_help.h" #include "sbr/arglist.h" diff --git a/uip/rcvdist.c b/uip/rcvdist.c index cbd2fdd5..bfcf57d4 100644 --- a/uip/rcvdist.c +++ b/uip/rcvdist.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/pidstatus.h" #include "sbr/print_version.h" #include "sbr/print_help.h" #include "sbr/arglist.h" diff --git a/uip/replsbr.c b/uip/replsbr.c index 08991178..4c795ac8 100644 --- a/uip/replsbr.c +++ b/uip/replsbr.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/pidstatus.h" #include "sbr/arglist.h" #include "sbr/error.h" #include "h/addrsbr.h" diff --git a/uip/sendsbr.c b/uip/sendsbr.c index ca03877a..f96779c1 100644 --- a/uip/sendsbr.c +++ b/uip/sendsbr.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "sbr/pidstatus.h" #include "sbr/arglist.h" #include "sbr/error.h" #include "h/fmt_scan.h" diff --git a/uip/slocal.c b/uip/slocal.c index e773b134..b8131691 100644 --- a/uip/slocal.c +++ b/uip/slocal.c @@ -20,6 +20,7 @@ */ #include "h/mh.h" +#include "sbr/pidstatus.h" #include "sbr/print_version.h" #include "sbr/print_help.h" #include "sbr/error.h" -- 2.56.0