]> diplodocus.org Git - nmh/blobdiff - sbr/addrsbr.c
crawl_folders.h: Base header on implementation.
[nmh] / sbr / addrsbr.c
index eadf1d07443e71a1bc3399e33b4181d3017cd0a5..9b2973a369fc8c77d4a9671213495096d91eb025 100644 (file)
@@ -5,11 +5,17 @@
  * complete copyright information.
  */
 
-#include <h/mh.h>
-#include <h/addrsbr.h>
-#include <h/mf.h>
-#include <h/mts.h>
-#include <h/utils.h>
+#include "h/mh.h"
+#include "snprintb.h"
+#include "strindex.h"
+#include "uprf.h"
+#include "getcpy.h"
+#include "context_find.h"
+#include "error.h"
+#include "h/addrsbr.h"
+#include "h/mf.h"
+#include "h/mts.h"
+#include "h/utils.h"
 
 /* High level parsing of addresses:
 
@@ -77,7 +83,8 @@ static char adr[BUFSIZ];
 static int eai = 0;
 
 void
-enable_eai(void) {
+enable_eai(void)
+{
     eai = 1;
 }
 
@@ -270,7 +277,7 @@ auxformat (struct mailname *mp, int extras)
 bool
 ismymbox (struct mailname *np)
 {
-    int oops;
+    bool oops;
     int len, i;
     char *cp;
     char *pp;
@@ -278,7 +285,7 @@ ismymbox (struct mailname *np)
     struct mailname *mp;
     static char *am = NULL;
     static struct mailname mq;
-    static int localmailbox = 0;
+    static bool localmailbox;
 
     /*
      * If this is the first call, initialize
@@ -290,7 +297,7 @@ ismymbox (struct mailname *np)
 
        if ((am = context_find ("local-mailbox"))) {
 
-           localmailbox++;
+           localmailbox = true;
 
            if ((cp = getname(am)) == NULL) {
                inform("Unable to find address in local-mailbox, continuing...");
@@ -312,11 +319,11 @@ ismymbox (struct mailname *np)
            am = getusername();
        else {
            mp = mq.m_next ? mq.m_next : &mq;
-           oops = 0;
+           oops = false;
            while ((cp = getname (am))) {
                if ((mp->m_next = getm (cp, NULL, 0, NULL, 0)) == NULL) {
                    inform("illegal address: %s, continuing...", cp);
-                   oops++;
+                   oops = true;
                } else {
                    mp = mp->m_next;
                    mp->m_type = W_NIL;