]> diplodocus.org Git - nmh/blobdiff - uip/slocal.c
Reorder configure options to be before variables
[nmh] / uip / slocal.c
index 8677b3f2b500a96700b1a482eb08dd0a7976332f..c86f2ceea80ba91a632c6ecc0c313a858523a824 100644 (file)
@@ -8,7 +8,7 @@
 /*
  *  Under sendmail, users should add the line
  *
- *     "| /usr/local/nmh/lib/slocal"
+ *     "| /usr/local/nmh/lib/slocal"
  *
  *  to their $HOME/.forward file.
  *
  * Ruud de Rooij <ruud@ruud.org>  Sun, 28 May 2000 17:28:55 +0200
  */
 
-#include <h/mh.h>
-#include <h/dropsbr.h>
-#include <h/rcvmail.h>
-#include <h/signals.h>
+#include "h/mh.h"
+#include "sbr/dtime.h"
+#include "sbr/m_gmprot.h"
+#include "sbr/m_getfld.h"
+#include "sbr/getarguments.h"
+#include "sbr/smatch.h"
+#include "sbr/strindex.h"
+#include "sbr/trimcpy.h"
+#include "sbr/getcpy.h"
+#include "sbr/ambigsw.h"
+#include "sbr/pidstatus.h"
+#include "sbr/print_version.h"
+#include "sbr/print_help.h"
+#include "sbr/error.h"
+#include "h/dropsbr.h"
+#include "h/signals.h"
 #include <setjmp.h>
-#include <h/tws.h>
-#include <h/mts.h>
+#include "h/tws.h"
+#include "h/mts.h"
 #include "h/done.h"
-#include <h/utils.h>
+#include "h/utils.h"
 #include "sbr/lock_file.h"
 #include "sbr/m_mktemp.h"
 
@@ -273,9 +285,9 @@ main (int argc, char **argv)
     }
 
     if (addr == NULL)
-       addr = getusername ();
+       addr = getusername (1);
     if (user == NULL) {
-       user = getusername ();
+       user = getusername (1);
     }
     if ((pw = getpwnam (user)) == NULL)
        die("no such local user as %s", user);
@@ -379,7 +391,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;
 }
 
@@ -489,7 +501,7 @@ usr_delivery (int fd, char *delivery, int su)
                 * If previous condition failed, don't
                 * do this - else fall through
                 */
-               if (!next)
+               if (!next)
                    continue;
                /* FALLTHRU */
 
@@ -1080,7 +1092,6 @@ usr_pipe (int fd_arg, char *cmd, char *pgm, char **vec, int suppress)
            }
            if (fd != 3)
                dup2 (fd, 3);
-           closefds (4);
 
 #ifdef TIOCNOTTY
            if ((fd = open ("/dev/tty", O_RDWR)) != -1) {