]> diplodocus.org Git - nmh/blobdiff - uip/whatnowproc.c
Fixed inc(1) and %(me) to not obey Local-Mailbox profile component.
[nmh] / uip / whatnowproc.c
index 2fa0ed85cd3b92f584f1578f6f21cbafeee35500..badd8daaa242b377a22c79c3608efa5416dc4d52 100644 (file)
@@ -5,7 +5,14 @@
  * complete copyright information.
  */
 
-#include <h/mh.h>
+#include "h/mh.h"
+#include "whatnowsbr.h"
+#include "whatnowproc.h"
+#include "sbr/m_name.h"
+#include "sbr/r1bindex.h"
+#include "sbr/geteditor.h"
+#include "sbr/context_save.h"
+#include "sbr/error.h"
 #include "h/done.h"
 
 
@@ -23,7 +30,8 @@ int
 what_now (char *ed, int nedit, int use, char *file, char *altmsg, int dist,
           struct msgs *mp, char *text, int inplace, char *cwd, int atfile)
 {
-    int found, k, msgnum, vecp;
+    bool found;
+    int k, msgnum, vecp;
     int len, buflen;
     char *bp;
     char buffer[BUFSIZ], *vec[MAXARGS];
@@ -68,7 +76,7 @@ what_now (char *ed, int nedit, int use, char *file, char *altmsg, int dist,
     unsetenv("mhinplace");
 
     if (text && mp && !is_readonly(mp)) {
-       found = 0;
+       found = false;
        bp = buffer;
        buflen = sizeof(buffer);
        for (msgnum = mp->lowmsg; msgnum <= mp->hghmsg; msgnum++) {
@@ -86,7 +94,7 @@ what_now (char *ed, int nedit, int use, char *file, char *altmsg, int dist,
                    buflen -= len;
                }
                msgnum = k + 1;
-               found++;
+               found = true;
            }
        }
        if (found) {