]> 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 5eea1cf222fadbe9af7f6a05f8a82e9828d68d1f..1bbe02ed6af655f63aacf984e46c988dca93e363 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 3a5a34811a37e819f55d0acaded1269a7d71126f..c8a1d9573e0ea0bfb157ad4dca97bad7eb08d723 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 1bcef7c39a63b6e86b4e5c336bf74977e1f78e1e..c2e509bcd4632f3ddf722d9eab6e277b9cdece41 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 6f8ded3586caa928402876eff810ccf8f0a65f41..90994bffe64f08cd0a2e22314eb3e8b11fe9e69d 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 f0f8dc5e04f24ede74e22971777fb3c1080767ae..5eb5243c970c14373885faffd4f02bc45ef2177a 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;
 }