]> diplodocus.org Git - nmh/blobdiff - uip/comp.c
vector.c: Move interface to own file.
[nmh] / uip / comp.c
index 1aba2808cc32045c7b5e05916799e7658eedecc7..9c151cf98128e89dc3b422f9b52d7f07a98793c7 100644 (file)
@@ -5,9 +5,13 @@
  * complete copyright information.
  */
 
-#include <h/mh.h>
-#include <h/utils.h>
-#include <h/fmt_scan.h>
+#include "h/mh.h"
+#include "sbr/path.h"
+#include "sbr/print_version.h"
+#include "sbr/print_help.h"
+#include "sbr/error.h"
+#include "h/utils.h"
+#include "h/fmt_scan.h"
 #include "h/done.h"
 #include "sbr/m_maildir.h"
 #include <fcntl.h>
@@ -70,7 +74,10 @@ static struct swit aqrul[] = {
 int
 main (int argc, char **argv)
 {
-    int use = NOUSE, nedit = 0, nwhat = 0, build = 0;
+    int use = NOUSE;
+    bool nedit = false;
+    bool nwhat = false;
+    bool build = false;
     int i, in = NOTOK, isdf = 0, out, dat[5], format_len = 0;
     int outputlinelen = OUTPUTLINELEN;
     char *cp, *cwd, *maildir, *dfolder = NULL;
@@ -109,23 +116,23 @@ main (int argc, char **argv)
                case EDITRSW: 
                    if (!(ed = *argp++) || *ed == '-')
                        die("missing argument to %s", argp[-2]);
-                   nedit = 0;
+                   nedit = false;
                    continue;
                case NEDITSW: 
-                   nedit++;
+                   nedit = true;
                    continue;
 
                case WHATSW: 
                    if (!(whatnowproc = *argp++) || *whatnowproc == '-')
                        die("missing argument to %s", argp[-2]);
-                   nwhat = 0;
+                   nwhat = false;
                    continue;
 
                case BILDSW:
-                   build++;
+                   build = true;
                    /* FALLTHRU */
                case NWHATSW: 
-                   nwhat++;
+                   nwhat = true;
                    continue;
 
                case FORMSW: