X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/370eb511c48f5d0a2e28336835e9929e6215abb1..3c54bbb247ffc8fa094d754099c0b009e79d484d:/sbr/addrsbr.c diff --git a/sbr/addrsbr.c b/sbr/addrsbr.c index eadf1d07..9b2973a3 100644 --- a/sbr/addrsbr.c +++ b/sbr/addrsbr.c @@ -5,11 +5,17 @@ * complete copyright information. */ -#include -#include -#include -#include -#include +#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;