]> diplodocus.org Git - nmh/blobdiff - uip/comp.c
test-mhfixmsg: pwd(1)'s `-P' needed to avoid failure with symlinks.
[nmh] / uip / comp.c
index 3667f2e400a4df81afb19cc7888d99c8aab22490..00aa1c2c7c3ba5daa8cf7061d19632676301b2f3 100644 (file)
@@ -5,9 +5,33 @@
  * complete copyright information.
  */
 
  * complete copyright information.
  */
 
-#include <h/mh.h>
-#include <h/utils.h>
-#include <h/fmt_scan.h>
+#include "h/mh.h"
+#include "sbr/fmt_new.h"
+#include "whatnowproc.h"
+#include "sbr/m_name.h"
+#include "sbr/m_gmprot.h"
+#include "sbr/getarguments.h"
+#include "sbr/read_switch_multiword.h"
+#include "sbr/seq_setprev.h"
+#include "sbr/seq_save.h"
+#include "sbr/showfile.h"
+#include "sbr/smatch.h"
+#include "sbr/refile.h"
+#include "sbr/cpydata.h"
+#include "sbr/m_draft.h"
+#include "sbr/m_convert.h"
+#include "sbr/getfolder.h"
+#include "sbr/fdcompare.h"
+#include "sbr/folder_read.h"
+#include "sbr/context_save.h"
+#include "sbr/context_find.h"
+#include "sbr/ambigsw.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>
 #include "h/done.h"
 #include "sbr/m_maildir.h"
 #include <fcntl.h>
@@ -70,7 +94,10 @@ static struct swit aqrul[] = {
 int
 main (int argc, char **argv)
 {
 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;
     int i, in = NOTOK, isdf = 0, out, dat[5], format_len = 0;
     int outputlinelen = OUTPUTLINELEN;
     char *cp, *cwd, *maildir, *dfolder = NULL;
@@ -83,7 +110,7 @@ main (int argc, char **argv)
     struct format *fmt;
     struct stat st;
 
     struct format *fmt;
     struct stat st;
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], true, true)) { return 1; }
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
@@ -109,23 +136,23 @@ main (int argc, char **argv)
                case EDITRSW: 
                    if (!(ed = *argp++) || *ed == '-')
                        die("missing argument to %s", argp[-2]);
                case EDITRSW: 
                    if (!(ed = *argp++) || *ed == '-')
                        die("missing argument to %s", argp[-2]);
-                   nedit = 0;
+                   nedit = false;
                    continue;
                case NEDITSW: 
                    continue;
                case NEDITSW: 
-                   nedit++;
+                   nedit = true;
                    continue;
 
                case WHATSW: 
                    if (!(whatnowproc = *argp++) || *whatnowproc == '-')
                        die("missing argument to %s", argp[-2]);
                    continue;
 
                case WHATSW: 
                    if (!(whatnowproc = *argp++) || *whatnowproc == '-')
                        die("missing argument to %s", argp[-2]);
-                   nwhat = 0;
+                   nwhat = false;
                    continue;
 
                case BILDSW:
                    continue;
 
                case BILDSW:
-                   build++;
+                   build = true;
                    /* FALLTHRU */
                case NWHATSW: 
                    /* FALLTHRU */
                case NWHATSW: 
-                   nwhat++;
+                   nwhat = true;
                    continue;
 
                case FORMSW: 
                    continue;
 
                case FORMSW: