]> diplodocus.org Git - nmh/blobdiff - uip/msgchk.c
test-mhfixmsg: pwd(1)'s `-P' needed to avoid failure with symlinks.
[nmh] / uip / msgchk.c
index 21aca33b1b412d1eb7a3361c52ff54be7fb6e124..ca3e3826a1d4aac336f5903cb8247dd8576890d2 100644 (file)
@@ -5,14 +5,21 @@
  * complete copyright information.
  */
 
-#include <h/mh.h>
-#include <h/mts.h>
-#include <h/tws.h>
+#include "h/mh.h"
+#include "sbr/dtime.h"
+#include "sbr/getarguments.h"
+#include "sbr/smatch.h"
+#include "sbr/ambigsw.h"
+#include "sbr/print_version.h"
+#include "sbr/print_help.h"
+#include "sbr/error.h"
+#include "h/mts.h"
+#include "h/tws.h"
 #include "h/done.h"
-#include <h/utils.h>
+#include "h/utils.h"
 #include <pwd.h>
 
-#include <h/popsbr.h>
+#include "popsbr.h"
 
 #ifndef CYRUS_SASL
 # define SASLminc(a) (a)
@@ -78,9 +85,14 @@ static int remotemail (char *, char *, char *, char *, int, int, int, int,
 int
 main (int argc, char **argv)
 {
-    int datesw = 1, notifysw = NT_ALL;
-    int status = 0, sasl = 0, tls = 0, noverify = 0;
-    int snoop = 0, vecp = 0;
+    bool datesw = true;
+    int notifysw = NT_ALL;
+    int status = 0;
+    bool sasl = false;
+    bool tls = false;
+    bool noverify = false;
+    bool snoop = false;
+    int vecp = 0;
     char *cp, *host = NULL, *port = NULL, *user = NULL, *proxy = NULL;
     char buf[BUFSIZ], *saslmech = NULL, *auth_svc = NULL;
     char **argp, **arguments, *vec[MAXVEC];
@@ -112,10 +124,10 @@ main (int argc, char **argv)
                    done (0);
 
                case DATESW:
-                   datesw++;
+                   datesw = true;
                    continue;
                case NDATESW:
-                   datesw = 0;
+                   datesw = false;
                    continue;
 
                case NOTESW:
@@ -148,15 +160,15 @@ main (int argc, char **argv)
                    continue;
 
                case SNOOPSW:
-                   snoop++;
+                   snoop = true;
                    continue;
 
                case SASLSW:
-                   sasl++;
+                   sasl = true;
                    continue;
                
                case NOSASLSW:
-                   sasl = 0;
+                   sasl = false;
                    continue;
 
                case SASLMECHSW:
@@ -165,19 +177,19 @@ main (int argc, char **argv)
                    continue;
 
                case INITTLSSW:
-                   tls++;
+                   tls = true;
                    continue;
 
                case NOTLSSW:
-                   tls = 0;
+                   tls = false;
                    continue;
 
                case CERTVERSW:
-                   noverify = 0;
+                   noverify = false;
                    continue;
 
                case NOCERTVERSW:
-                   noverify++;
+                   noverify = true;
                    continue;
 
                case AUTHSERVICESW: