]> diplodocus.org Git - nmh/blobdiff - uip/prompter.c
Remove MIME content caching code
[nmh] / uip / prompter.c
index 1564852d747e9547faf77388e9616300eea3fc4e..de8b67a88731b0371de170efe6647ade19b30b40 100644 (file)
@@ -5,11 +5,22 @@
  * complete copyright information.
  */
 
-#include <h/mh.h>
+#include "h/mh.h"
+#include "sbr/m_gmprot.h"
+#include "sbr/m_getfld.h"
+#include "sbr/getarguments.h"
+#include "sbr/smatch.h"
+#include "sbr/cpydata.h"
+#include "sbr/m_atoi.h"
+#include "sbr/context_save.h"
+#include "sbr/ambigsw.h"
+#include "sbr/print_version.h"
+#include "sbr/print_help.h"
+#include "sbr/error.h"
 #include <fcntl.h>
-#include <h/signals.h>
+#include "h/signals.h"
 #include "h/done.h"
-#include <h/utils.h>
+#include "h/utils.h"
 #include "sbr/m_mktemp.h"
 #include <setjmp.h>
 
@@ -42,7 +53,7 @@ DEFINE_SWITCH_ARRAY(PROMPTER, switches);
 static struct termios tio;
 
 static bool wtuser;
-static int sigint = 0;
+static bool sigint;
 static jmp_buf sigenv;
 
 /*
@@ -57,8 +68,11 @@ static void intrser (int);
 int
 main (int argc, char **argv)
 {
-    int body = 1, prepend = 1, rapid = 0;
-    int doteof = 0, fdi, fdo, i, state;
+    bool body = true;
+    bool prepend = true;
+    bool rapid = false;
+    bool doteof = false;
+    int fdi, fdo, i, state;
     char *cp, *drft = NULL, *erasep = NULL;
     char *killp = NULL, name[NAMESZ], field[NMH_BUFSIZ];
     char buffer[BUFSIZ];
@@ -100,31 +114,31 @@ main (int argc, char **argv)
                    continue;
 
                case PREPSW: 
-                   prepend++;
+                   prepend = true;
                    continue;
                case NPREPSW: 
-                   prepend = 0;
+                   prepend = false;
                    continue;
 
                case RAPDSW: 
-                   rapid++;
+                   rapid = true;
                    continue;
                case NRAPDSW: 
-                   rapid = 0;
+                   rapid = false;
                    continue;
 
                case BODYSW: 
-                   body++;
+                   body = true;
                    continue;
                case NBODYSW: 
-                   body = 0;
+                   body = false;
                    continue;
 
                case DOTSW: 
-                   doteof++;
+                   doteof = true;
                    continue;
                case NDOTSW: 
-                   doteof = 0;
+                   doteof = false;
                    continue;
            }
        } else {
@@ -177,7 +191,7 @@ main (int argc, char **argv)
        tio.c_cc[VERASE] = save_erase;
     }
 
-    sigint = 0;
+    sigint = false;
     SIGNAL2 (SIGINT, intrser);
 
     /*
@@ -379,7 +393,7 @@ intrser (int i)
 
     if (wtuser)
        longjmp (sigenv, NOTOK);
-    sigint++;
+    sigint = true;
 }