From: Ralph Corderoy Date: Tue, 14 Nov 2017 23:56:16 +0000 (+0000) Subject: h/rcvmail.h: Delete. Contained just a couple of pointless macros. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/0c21ce5aa9a404868047f84c9d368f86ee3b168e?hp=79ed2204e93a3ace4cdd76f0628168402582e3bd h/rcvmail.h: Delete. Contained just a couple of pointless macros. RCV_MOK was 0, RCV_MBX was 1. They were used for exit(3) and done(). `exit(0)' is clearer than another layer of abstraction, and the commands that used them didn't seem to document the exit statuses anyway. The included by other means, at least on one platform. --- diff --git a/Makefile.am b/Makefile.am index 5eea1cf2..1bbe02ed 100644 --- a/Makefile.am +++ b/Makefile.am @@ -354,7 +354,6 @@ noinst_HEADERS = \ h/nmh.h \ h/oauth.h \ h/prototypes.h \ - h/rcvmail.h \ h/signals.h \ h/tws.h \ h/utils.h \ diff --git a/h/rcvmail.h b/h/rcvmail.h deleted file mode 100644 index 1e133974..00000000 --- a/h/rcvmail.h +++ /dev/null @@ -1,12 +0,0 @@ -/* rcvmail.h -- rcvmail hook definitions - */ - -#include -#include -#include -#include -#include "mts/smtp/smtp.h" - - -#define RCV_MOK 0 -#define RCV_MBX 1 diff --git a/uip/rcvdist.c b/uip/rcvdist.c index 3a5a3481..c8a1d957 100644 --- a/uip/rcvdist.c +++ b/uip/rcvdist.c @@ -20,7 +20,6 @@ #include "sbr/arglist.h" #include "sbr/error.h" #include "h/fmt_scan.h" -#include "h/rcvmail.h" #include "h/tws.h" #include "h/mts.h" #include "h/done.h" @@ -272,5 +271,5 @@ unlink_done (int status) if (tmpfil[0]) (void) m_unlink (tmpfil); - exit (status ? RCV_MBX : RCV_MOK); + exit(status ? 1 : 0); } diff --git a/uip/rcvpack.c b/uip/rcvpack.c index 1bcef7c3..c2e509bc 100644 --- a/uip/rcvpack.c +++ b/uip/rcvpack.c @@ -14,7 +14,6 @@ #include "sbr/print_help.h" #include "sbr/error.h" #include "h/dropsbr.h" -#include "h/rcvmail.h" #include "h/tws.h" #include "h/mts.h" #include "h/done.h" @@ -91,18 +90,18 @@ main (int argc, char **argv) /* open and lock the file */ if ((md = mbx_open (file, mbx_style, getuid(), getgid(), m_gmprot())) == NOTOK) - done (RCV_MBX); + done(1); /* append the message */ if (mbx_copy (file, mbx_style, md, fileno(stdin), NULL) == NOTOK) { mbx_close (file, md); - done (RCV_MBX); + done(1); } /* close and unlock the file */ if (mbx_close (file, md) == NOTOK) - done (RCV_MBX); + done(1); - done (RCV_MOK); + done(0); return 1; } diff --git a/uip/rcvtty.c b/uip/rcvtty.c index 6f8ded35..90994bff 100644 --- a/uip/rcvtty.c +++ b/uip/rcvtty.c @@ -21,7 +21,6 @@ #include "sbr/error.h" #include "h/signals.h" #include -#include "h/rcvmail.h" #include "h/fmt_scan.h" #include "h/tws.h" #include "h/mts.h" @@ -150,7 +149,7 @@ main (int argc, char **argv) vec[vecp] = 0; if ((md = vecp ? message_fd (vec) : header_fd ()) == NOTOK) - exit (RCV_MBX); + exit(1); user = getusername(); @@ -170,7 +169,7 @@ main (int argc, char **argv) NMH_UNUSED (utp); #endif /* HAVE_GETUTXENT */ - exit (RCV_MOK); + exit(0); } diff --git a/uip/slocal.c b/uip/slocal.c index f0f8dc5e..5eb5243c 100644 --- a/uip/slocal.c +++ b/uip/slocal.c @@ -35,7 +35,6 @@ #include "sbr/print_help.h" #include "sbr/error.h" #include "h/dropsbr.h" -#include "h/rcvmail.h" #include "h/signals.h" #include #include "h/tws.h" @@ -393,7 +392,7 @@ main (int argc, char **argv) /* deliver the message */ status = localmail (fd, mdlvr); - done (status != -1 ? RCV_MOK : RCV_MBX); + done(status != -1 ? 0 : 1); return 1; }