]> diplodocus.org Git - nmh/commitdiff
h/rcvmail.h: Delete. Contained just a couple of pointless macros.
authorRalph Corderoy <ralph@inputplus.co.uk>
Tue, 14 Nov 2017 23:56:16 +0000 (23:56 +0000)
committerRalph Corderoy <ralph@inputplus.co.uk>
Thu, 16 Nov 2017 00:03:51 +0000 (00:03 +0000)
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.

Makefile.am
h/rcvmail.h [deleted file]
uip/rcvdist.c
uip/rcvpack.c
uip/rcvtty.c
uip/slocal.c

index 5eea1cf..1bbe02e 100644 (file)
@@ -354,7 +354,6 @@ noinst_HEADERS = \
     h/nmh.h \
     h/oauth.h \
     h/prototypes.h \
     h/nmh.h \
     h/oauth.h \
     h/prototypes.h \
-    h/rcvmail.h \
     h/signals.h \
     h/tws.h \
     h/utils.h \
     h/signals.h \
     h/tws.h \
     h/utils.h \
diff --git a/h/rcvmail.h b/h/rcvmail.h
deleted file mode 100644 (file)
index 1e13397..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-/* rcvmail.h -- rcvmail hook definitions
- */
-
-#include <ctype.h>
-#include <errno.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include "mts/smtp/smtp.h"
-
-
-#define RCV_MOK        0
-#define RCV_MBX        1
index 3a5a348..c8a1d95 100644 (file)
@@ -20,7 +20,6 @@
 #include "sbr/arglist.h"
 #include "sbr/error.h"
 #include "h/fmt_scan.h"
 #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"
 #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);
 
     if (tmpfil[0])
        (void) m_unlink (tmpfil);
 
-    exit (status ? RCV_MBX : RCV_MOK);
+    exit(status ? 1 : 0);
 }
 }
index 1bcef7c..c2e509b 100644 (file)
@@ -14,7 +14,6 @@
 #include "sbr/print_help.h"
 #include "sbr/error.h"
 #include "h/dropsbr.h"
 #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"
 #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)
 
     /* 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);
 
     /* 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)
     }
 
     /* close and unlock the file */
     if (mbx_close (file, md) == NOTOK)
-       done (RCV_MBX);
+       done(1);
 
 
-    done (RCV_MOK);
+    done(0);
     return 1;
 }
     return 1;
 }
index 6f8ded3..90994bf 100644 (file)
@@ -21,7 +21,6 @@
 #include "sbr/error.h"
 #include "h/signals.h"
 #include <setjmp.h>
 #include "sbr/error.h"
 #include "h/signals.h"
 #include <setjmp.h>
-#include "h/rcvmail.h"
 #include "h/fmt_scan.h"
 #include "h/tws.h"
 #include "h/mts.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)
     vec[vecp] = 0;
 
     if ((md = vecp ? message_fd (vec) : header_fd ()) == NOTOK)
-       exit (RCV_MBX);
+       exit(1);
 
     user = getusername();
 
 
     user = getusername();
 
@@ -170,7 +169,7 @@ main (int argc, char **argv)
     NMH_UNUSED (utp);
 #endif /* HAVE_GETUTXENT */
 
     NMH_UNUSED (utp);
 #endif /* HAVE_GETUTXENT */
 
-    exit (RCV_MOK);
+    exit(0);
 }
 
 
 }
 
 
index f0f8dc5..5eb5243 100644 (file)
@@ -35,7 +35,6 @@
 #include "sbr/print_help.h"
 #include "sbr/error.h"
 #include "h/dropsbr.h"
 #include "sbr/print_help.h"
 #include "sbr/error.h"
 #include "h/dropsbr.h"
-#include "h/rcvmail.h"
 #include "h/signals.h"
 #include <setjmp.h>
 #include "h/tws.h"
 #include "h/signals.h"
 #include <setjmp.h>
 #include "h/tws.h"
@@ -393,7 +392,7 @@ main (int argc, char **argv)
     /* deliver the message */
     status = localmail (fd, mdlvr);
 
     /* deliver the message */
     status = localmail (fd, mdlvr);
 
-    done (status != -1 ? RCV_MOK : RCV_MBX);
+    done(status != -1 ? 0 : 1);
     return 1;
 }
 
     return 1;
 }