]> granicus.if.org Git - neomutt/commitdiff
move rfc822_new_address to address.c
authorRichard Russon <rich@flatcap.org>
Tue, 28 Nov 2017 15:25:35 +0000 (15:25 +0000)
committerRichard Russon <rich@flatcap.org>
Wed, 29 Nov 2017 00:29:10 +0000 (00:29 +0000)
address.c
address.h
commands.c
compose.c
edit.c
mutt_lua.c
parse.c
pop_auth.c
recvcmd.c
url.c

index 6f0ab2d1e27b58503a2deb21f7b0a495c6a6298e..ef0a96d80293bab13550b379e4754cf51d143c9b 100644 (file)
--- a/address.c
+++ b/address.c
@@ -86,6 +86,17 @@ const char *const RFC822Errors[] = {
   "bad route in <>", "bad address in <>",      "bad address spec",
 };
 
+/**
+ * rfc822_new_address - Create a new Address
+ * @retval ptr Newly allocated Address
+ *
+ * Free the result with free_address() or rfc822_free_address()
+ */
+struct Address *rfc822_new_address(void)
+{
+  return mutt_mem_calloc(1, sizeof(struct Address));
+}
+
 /**
  * free_address - Free a single Address
  * @param a Address to free
index a384109457b389d7077669bb3b9ee2745175be07..f7c59bf51c170266946a00f8b8f0f94eb12edfde 100644 (file)
--- a/address.h
+++ b/address.h
@@ -51,6 +51,7 @@ enum AddressError
   ERR_BAD_ADDR_SPEC
 };
 
+struct Address *rfc822_new_address(void);
 void rfc822_free_address(struct Address **p);
 void rfc822_qualify(struct Address *addr, const char *host);
 struct Address *rfc822_parse_adrlist(struct Address *top, const char *s);
@@ -69,15 +70,4 @@ extern const char RFC822Specials[];
 
 #define rfc822_error(x) RFC822Errors[x]
 
-/**
- * rfc822_new_address - Create a new Address
- * @retval ptr Newly allocated Address
- *
- * Free the result with free_address() or rfc822_free_address()
- */
-static inline struct Address *rfc822_new_address(void)
-{
-  return mutt_mem_calloc(1, sizeof(struct Address));
-}
-
 #endif /* _MUTT_ADDRESS_H */
index be4cc61d438c8010826fed8e7f48def767afdfa6..8a6afaa083e6873dab7282e17d4f2761d6f8d1fa 100644 (file)
@@ -36,6 +36,7 @@
 #include <unistd.h>
 #include "mutt/mutt.h"
 #include "mutt.h"
+#include "address.h"
 #include "alias.h"
 #include "body.h"
 #include "buffy.h"
@@ -58,7 +59,6 @@
 #include "pager.h"
 #include "parameter.h"
 #include "protos.h"
-#include "address.h"
 #include "sort.h"
 #ifdef USE_IMAP
 #include "imap/imap.h"
index 734a7e0a0d4ad453d3fbdc8e49a82a83d1786961..ef06acdb0a10ce2a89154ffc8361ba66b6a506ba 100644 (file)
--- a/compose.c
+++ b/compose.c
@@ -35,6 +35,7 @@
 #include "mutt/mutt.h"
 #include "conn/conn.h"
 #include "mutt.h"
+#include "address.h"
 #include "alias.h"
 #include "attach.h"
 #include "body.h"
@@ -55,7 +56,6 @@
 #include "opcodes.h"
 #include "options.h"
 #include "protos.h"
-#include "address.h"
 #include "sort.h"
 #ifdef MIXMASTER
 #include "remailer.h"
diff --git a/edit.c b/edit.c
index 187c6be6f9d90d2acc376fc660bf1cefb5775cac..349d4bfebb7197b613fe79f3eb62e2942a3b6769 100644 (file)
--- a/edit.c
+++ b/edit.c
@@ -35,6 +35,7 @@
 #include <sys/stat.h>
 #include "mutt/mutt.h"
 #include "mutt.h"
+#include "address.h"
 #include "alias.h"
 #include "body.h"
 #include "context.h"
@@ -45,7 +46,6 @@
 #include "mutt_idna.h"
 #include "options.h"
 #include "protos.h"
-#include "address.h"
 
 /*
  * SLcurses_waddnstr() can't take a "const char *", so this is only
index 7bfc2efb88054be13269e3b1900b4590bdf5fda3..8ac9a5958c572204cbc5d7e4b3dcc93bc7c44a47 100644 (file)
@@ -32,6 +32,7 @@
 #include "mutt/mutt.h"
 #include "mutt.h"
 #include "mutt_lua.h"
+#include "address.h"
 #include "globals.h"
 #include "mailbox.h"
 #include "mbtable.h"
@@ -39,7 +40,6 @@
 #include "mutt_options.h"
 #include "options.h"
 #include "protos.h"
-#include "address.h"
 
 static int handle_panic(lua_State *l)
 {
diff --git a/parse.c b/parse.c
index c651966eb62b447dd9998c3ffdff05e596918c16..dada31fec9840dfafc4fafff342405701298ce96 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -30,6 +30,7 @@
 #include <time.h>
 #include "mutt/mutt.h"
 #include "mutt.h"
+#include "address.h"
 #include "body.h"
 #include "charset.h"
 #include "envelope.h"
@@ -44,7 +45,6 @@
 #include "protos.h"
 #include "rfc2047.h"
 #include "rfc2231.h"
-#include "address.h"
 #include "url.h"
 
 struct Address;
index b9e3b3e50bd4731ff192bc87cdd99841d80d9085..f7788a3370a91136b0cda3d72feaf533dff92e67 100644 (file)
 #include "mutt/mutt.h"
 #include "conn/conn.h"
 #include "mutt.h"
+#include "address.h"
 #include "globals.h"
 #include "mutt_account.h"
 #include "mutt_socket.h"
 #include "options.h"
 #include "pop.h"
 #include "protos.h"
-#include "address.h"
 #ifdef USE_SASL
 #include <sasl/sasl.h>
 #include <sasl/saslutil.h>
index f3ca65b3c31b5da05c84363ac614b133f7646944..c6aeb0b2aa0e13fc275f729b08c1c33ed6f84d42 100644 (file)
--- a/recvcmd.c
+++ b/recvcmd.c
@@ -27,6 +27,7 @@
 #include <string.h>
 #include "mutt/mutt.h"
 #include "mutt.h"
+#include "address.h"
 #include "alias.h"
 #include "attach.h"
 #include "body.h"
@@ -38,7 +39,6 @@
 #include "mutt_idna.h"
 #include "options.h"
 #include "protos.h"
-#include "address.h"
 #include "state.h"
 
 /**
diff --git a/url.c b/url.c
index 557ea077966e400660a2dc5b5c866bfeff5f0d4f..50960729c28d12b1e3fe2358d7cd3bed767a6e60 100644 (file)
--- a/url.c
+++ b/url.c
 #include "mutt/mutt.h"
 #include "mutt.h"
 #include "url.h"
+#include "address.h"
 #include "envelope.h"
 #include "globals.h"
 #include "mime.h"
 #include "protos.h"
 #include "rfc2047.h"
-#include "address.h"
 
 static const struct Mapping UrlMap[] = {
   { "file", U_FILE },       { "imap", U_IMAP },     { "imaps", U_IMAPS },