]> granicus.if.org Git - neomutt/commitdiff
rename rfc822.c to address.c
authorRichard Russon <rich@flatcap.org>
Tue, 28 Nov 2017 15:16:06 +0000 (15:16 +0000)
committerRichard Russon <rich@flatcap.org>
Wed, 29 Nov 2017 00:29:10 +0000 (00:29 +0000)
37 files changed:
Makefile.am
Makefile.autosetup
addrbook.c
address.c [moved from rfc822.c with 99% similarity]
address.h
alias.c
commands.c
compose.c
copy.c
edit.c
envelope.c
group.c
hcache/hcache.c
hdrline.c
init.c
main.c
mbox.c
mutt_address.c
mutt_lua.c
muttlib.c
ncrypt/crypt.c
ncrypt/crypt_gpgme.c
ncrypt/pgp.c
ncrypt/pgpinvoke.c
ncrypt/pgpkey.c
ncrypt/smime.c
parse.c
po/POTFILES.in
pop_auth.c
query.c
recvcmd.c
remailer.c
rfc2047.c
rfc822.h [deleted file]
send.c
sendlib.c
url.c

index 3f313aa7cb0cc3d1271ea07db9a96d894a90e648..1c729b69ea779101c32d375f92bcc30114774b70 100644 (file)
@@ -53,7 +53,7 @@ neomutt_SOURCES = mutt_account.c addrbook.c address.h alias.c alias.h attach.c \
        mx.c newsrc.c nntp.c options.h pager.c parameter.c parameter.h \
        parse.c pattern.c pattern.h pop.c pop_auth.c pop_lib.c postpone.c \
        query.c recvattach.c recvcmd.c rfc1524.c rfc2047.c rfc2231.c rfc3676.c \
-       rfc822.c safe_asprintf.c score.c send.c sendlib.c sidebar.c mutt_signal.c \
+       address.c safe_asprintf.c score.c send.c sendlib.c sidebar.c mutt_signal.c \
        smtp.c sort.c state.c state.h status.c system.c thread.c thread.h url.c \
        version.c where.h mutt_tags.c
 
@@ -92,7 +92,7 @@ EXTRA_DIST = mutt_account.h attach.h bcache.h browser.h buffy.h \
        mutt_options.h mutt_regex.h \
        mutt_socket.h mx.h myvar.h nntp.h opcodes.h pager.h \
        pgpewrap.c pop.h protos.h README.md README.SSL remailer.c remailer.h \
-       rfc1524.h rfc2047.h rfc2231.h rfc3676.h rfc822.h sidebar.h \
+       rfc1524.h rfc2047.h rfc2231.h rfc3676.h sidebar.h \
        sort.h txt2c.c txt2c.sh version.h mutt_tags.h
 
 EXTRA_SCRIPTS =
index bcb94c827da0718925ad41ae7a5d78ad1edb551f..a2d9f86016e7fce35143ef74325a4363cbfbfe9a 100644 (file)
@@ -63,7 +63,7 @@ NEOMUTTOBJS=  mutt_account.o addrbook.o alias.o attach.o bcache.o body.o \
                mutt_socket.o mutt_tags.o mx.o \
                newsrc.o nntp.o pager.o parameter.o parse.o pattern.o pop.o \
                pop_auth.o pop_lib.o postpone.o query.o recvattach.o recvcmd.o \
-               rfc1524.o rfc2047.o rfc2231.o rfc3676.o rfc822.o \
+               rfc1524.o rfc2047.o rfc2231.o rfc3676.o address.o \
                safe_asprintf.o score.o send.o sendlib.o sidebar.o mutt_signal.o \
                smtp.o sort.o state.o status.o system.o thread.o url.o \
                version.o
index 659a5880b099792bbc9c5722c900094697e7b516..c75e1c1c844e08cea8d6910a3df5b43e80479334 100644 (file)
@@ -36,7 +36,6 @@
 #include "opcodes.h"
 #include "options.h"
 #include "protos.h"
-#include "rfc822.h"
 #include "sort.h"
 
 #define RSORT(x) (SortAlias & SORT_REVERSE) ? -x : x
similarity index 99%
rename from rfc822.c
rename to address.c
index 60378c9476c230f16401414f48ed04b797954acb..6f0ab2d1e27b58503a2deb21f7b0a495c6a6298e 100644 (file)
--- a/rfc822.c
+++ b/address.c
@@ -54,7 +54,7 @@
 #include <stdio.h>
 #include <string.h>
 #include "mutt/mutt.h"
-#include "rfc822.h"
+#include "address.h"
 #include "mutt_idna.h"
 
 /**
index a39649eba1808ddcb968fcde0c8481d4eb5247af..a384109457b389d7077669bb3b9ee2745175be07 100644 (file)
--- a/address.h
+++ b/address.h
@@ -38,4 +38,46 @@ struct Address
   bool intl_checked : 1;
 };
 
+/**
+ * enum AddressError - possible values for RFC822Error
+ */
+enum AddressError
+{
+  ERR_MEMORY = 1,
+  ERR_MISMATCH_PAREN,
+  ERR_MISMATCH_QUOTE,
+  ERR_BAD_ROUTE,
+  ERR_BAD_ROUTE_ADDR,
+  ERR_BAD_ADDR_SPEC
+};
+
+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);
+struct Address *rfc822_cpy_adr(struct Address *addr, int prune);
+struct Address *rfc822_cpy_adr_real(struct Address *addr);
+struct Address *rfc822_append(struct Address **a, struct Address *b, int prune);
+int rfc822_write_address(char *buf, size_t buflen, struct Address *addr, int display);
+void rfc822_write_address_single(char *buf, size_t buflen, struct Address *addr, int display);
+void rfc822_cat(char *buf, size_t buflen, const char *value, const char *specials);
+bool rfc822_valid_msgid(const char *msgid);
+int rfc822_remove_from_adrlist(struct Address **a, const char *mailbox);
+
+extern int RFC822Error;
+extern const char *const RFC822Errors[];
+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 */
diff --git a/alias.c b/alias.c
index 205f5319ffed17702c94f4443b37444660122e19..dcf51d5236e95648cfa0271571ff3eb7184f7c4d 100644 (file)
--- a/alias.c
+++ b/alias.c
@@ -43,7 +43,6 @@
 #include "mutt_idna.h"
 #include "options.h"
 #include "protos.h"
-#include "rfc822.h"
 
 struct Address *mutt_lookup_alias(const char *s)
 {
index 6dcd2c6afbebf4a5f32468775f4ea534bc0c368e..be4cc61d438c8010826fed8e7f48def767afdfa6 100644 (file)
@@ -58,7 +58,7 @@
 #include "pager.h"
 #include "parameter.h"
 #include "protos.h"
-#include "rfc822.h"
+#include "address.h"
 #include "sort.h"
 #ifdef USE_IMAP
 #include "imap/imap.h"
index b1dd75d71c52b300c397e155076e32f99d377a4d..734a7e0a0d4ad453d3fbdc8e49a82a83d1786961 100644 (file)
--- a/compose.c
+++ b/compose.c
@@ -55,7 +55,7 @@
 #include "opcodes.h"
 #include "options.h"
 #include "protos.h"
-#include "rfc822.h"
+#include "address.h"
 #include "sort.h"
 #ifdef MIXMASTER
 #include "remailer.h"
diff --git a/copy.c b/copy.c
index ab1f403df6702313172b95acce8d1d61d68ea79e..63c44db7044b87245b8cc9daf8b435aa0e40aadc 100644 (file)
--- a/copy.c
+++ b/copy.c
@@ -44,7 +44,6 @@
 #include "options.h"
 #include "protos.h"
 #include "rfc2047.h"
-#include "rfc822.h"
 #include "state.h"
 #ifdef USE_NOTMUCH
 #include "mutt_notmuch.h"
diff --git a/edit.c b/edit.c
index 316ab8b195d8298632eae00cab6c9078bd2494ec..187c6be6f9d90d2acc376fc660bf1cefb5775cac 100644 (file)
--- a/edit.c
+++ b/edit.c
@@ -45,7 +45,7 @@
 #include "mutt_idna.h"
 #include "options.h"
 #include "protos.h"
-#include "rfc822.h"
+#include "address.h"
 
 /*
  * SLcurses_waddnstr() can't take a "const char *", so this is only
index 88d2f280b9be6bb542cffcaf39d2552cf94da2b9..192e6940e7050d7bcbca1def1ae3dacbb313b1ae 100644 (file)
@@ -38,7 +38,7 @@
 #include "mutt/memory.h"
 #include "mutt/queue.h"
 #include "envelope.h"
-#include "rfc822.h"
+#include "address.h"
 
 /**
  * mutt_new_envelope - Create a new Envelope
diff --git a/group.c b/group.c
index 3f19c989deaeb313ab522c014a5dcc11a85c10b5..97998d717efd5db99339d680342c1242d5458357 100644 (file)
--- a/group.c
+++ b/group.c
@@ -29,7 +29,6 @@
 #include "address.h"
 #include "globals.h"
 #include "protos.h"
-#include "rfc822.h"
 
 struct Group *mutt_pattern_group(const char *k)
 {
index 0a5d8d3aae67712169dbc6d7e30f1bda5e6f4f7f..0683fd54606e6b1bbae22fabdaf7f78b3a5fb2d8 100644 (file)
@@ -62,7 +62,6 @@
 #include "mutt_tags.h"
 #include "parameter.h"
 #include "protos.h"
-#include "rfc822.h"
 
 static unsigned int hcachever = 0x0;
 
index 30e4f6408a7b06bb26a454e2ca4db4c82ab650cf..4be904b7834afd6c268aef4e922c5c6302893cfc 100644 (file)
--- a/hdrline.c
+++ b/hdrline.c
@@ -46,7 +46,6 @@
 #include "ncrypt/ncrypt.h"
 #include "options.h"
 #include "protos.h"
-#include "rfc822.h"
 #include "sort.h"
 #include "thread.h"
 #ifdef USE_NOTMUCH
diff --git a/init.c b/init.c
index b4a71221d4862bd228261784ef8bdb40e2d97382..dbfb236bb56bafaf746399fea9b1f66d5a0baaea 100644 (file)
--- a/init.c
+++ b/init.c
@@ -62,7 +62,6 @@
 #include "ncrypt/ncrypt.h"
 #include "options.h"
 #include "pattern.h"
-#include "rfc822.h"
 #include "sidebar.h"
 #include "version.h"
 #ifdef USE_NOTMUCH
diff --git a/main.c b/main.c
index c1d79a5170a534f2783b2118f525f9d383a1e0cf..5201b94ad42919fdbb63c2e04aa61b6e4fd22a07 100644 (file)
--- a/main.c
+++ b/main.c
@@ -57,7 +57,6 @@
 #include "ncrypt/ncrypt.h"
 #include "options.h"
 #include "protos.h"
-#include "rfc822.h"
 #include "url.h"
 #include "version.h"
 #ifdef USE_SIDEBAR
diff --git a/mbox.c b/mbox.c
index 26e4f85cd41fc744b2a3bc1be375cbe35061616d..2d1e5022758a03d687cb4d701524bd1425dd16ad 100644 (file)
--- a/mbox.c
+++ b/mbox.c
@@ -48,7 +48,6 @@
 #include "options.h"
 #include "parameter.h"
 #include "protos.h"
-#include "rfc822.h"
 #include "sort.h"
 #include "thread.h"
 
index 8dcdecb6a7a488611a9dcdb28516d5f9b8d7ae2d..7861ce34bb9cbd76bfa6350d9fde91d126456109 100644 (file)
@@ -25,8 +25,8 @@
 #include <stdio.h>
 #include <string.h>
 #include "mutt/mutt.h"
+#include "address.h"
 #include "mutt_idna.h"
-#include "rfc822.h"
 
 void rfc822_write_address_single(char *buf, size_t buflen, struct Address *addr, int display)
 {
index 7faa2fbd1713cb650a1a6dbdde1f6707b0d1739e..7bfc2efb88054be13269e3b1900b4590bdf5fda3 100644 (file)
@@ -39,7 +39,7 @@
 #include "mutt_options.h"
 #include "options.h"
 #include "protos.h"
-#include "rfc822.h"
+#include "address.h"
 
 static int handle_panic(lua_State *l)
 {
index 6c49bec750bc28b5ce276d254511706392802f39..0e20bcc817bd579cec35e4257f897ddafaae52c0 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
@@ -65,7 +65,6 @@
 #include "options.h"
 #include "parameter.h"
 #include "protos.h"
-#include "rfc822.h"
 #include "url.h"
 #ifdef USE_IMAP
 #include "imap/imap.h"
index 59d7731d3d4824dbc7ceb1104220d6c4636e88c3..545deef2e976bb58e560f7a02c6fade0b5d91391 100644 (file)
@@ -50,7 +50,6 @@
 #include "options.h"
 #include "parameter.h"
 #include "protos.h"
-#include "rfc822.h"
 #include "state.h"
 
 /**
index 711eb2427c4bab1935dc07c19115c5527972b9ee..e8e537b0a6a6b06f88c55af7a120814b03d880f0 100644 (file)
@@ -66,7 +66,6 @@
 #include "pager.h"
 #include "parameter.h"
 #include "protos.h"
-#include "rfc822.h"
 #include "sort.h"
 #include "state.h"
 
index ae0fc3ed2da1af8d3c7b82ff8256d8a55be7f3d6..ce9eb97dd7999f28d63945099e792a64882934f1 100644 (file)
@@ -64,7 +64,6 @@
 #include "pgplib.h"
 #include "pgpmicalg.h"
 #include "protos.h"
-#include "rfc822.h"
 #include "state.h"
 
 char PgpPass[LONG_STRING];
index 6daddd0a24cd26fb90b361b80fe5a0e2b2e8f8db..04e626f9c31081d8a64b2176c3899f885035c25f 100644 (file)
@@ -41,7 +41,6 @@
 #include "pgp.h"
 #include "pgpkey.h"
 #include "protos.h"
-#include "rfc822.h"
 
 /**
  * struct PgpCommandContext - Data for a PGP command
index 8e569ce0e0b5d198d6f725490c113ac7ca72f3f2..d9a1cc3721fc4e383c62a26ea49b4e38bf6f5ca5 100644 (file)
@@ -54,7 +54,6 @@
 #include "pgpinvoke.h"
 #include "pgplib.h"
 #include "protos.h"
-#include "rfc822.h"
 #include "sort.h"
 
 /**
index 64e8b9ce26c54e48fb47b70864d2b8e8945b1674..6417a0c6f65323aeaee765bb4bba873849686d93 100644 (file)
@@ -54,7 +54,6 @@
 #include "options.h"
 #include "parameter.h"
 #include "protos.h"
-#include "rfc822.h"
 #include "smime.h"
 #include "state.h"
 
diff --git a/parse.c b/parse.c
index e6ca1678a191af8e9513fa131e24a20403be01d4..c651966eb62b447dd9998c3ffdff05e596918c16 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -44,7 +44,7 @@
 #include "protos.h"
 #include "rfc2047.h"
 #include "rfc2231.h"
-#include "rfc822.h"
+#include "address.h"
 #include "url.h"
 
 struct Address;
index 248167b3d523b1f48814b0badbbee09d55ce603f..0efd84473f41e3390b8d973d5781c64baed56198 100644 (file)
@@ -1,4 +1,5 @@
 addrbook.c
+address.c
 alias.c
 attach.c
 bcache.c
@@ -128,7 +129,6 @@ rfc1524.c
 rfc2047.c
 rfc2231.c
 rfc3676.c
-rfc822.c
 safe_asprintf.c
 score.c
 send.c
index 3f4e1022787e586d8c4e7727a0ae9b396965796f..b9e3b3e50bd4731ff192bc87cdd99841d80d9085 100644 (file)
@@ -33,7 +33,7 @@
 #include "options.h"
 #include "pop.h"
 #include "protos.h"
-#include "rfc822.h"
+#include "address.h"
 #ifdef USE_SASL
 #include <sasl/sasl.h>
 #include <sasl/saslutil.h>
diff --git a/query.c b/query.c
index 0933d6d1ed21865f37b82bb62197b092f11bd7a6..f61ed131118570089afbfc66e1dd92b5cec2b797 100644 (file)
--- a/query.c
+++ b/query.c
@@ -45,7 +45,6 @@
 #include "mutt_menu.h"
 #include "opcodes.h"
 #include "protos.h"
-#include "rfc822.h"
 
 /**
  * struct Query - An entry from an external address-book
index 4fc2167a5d953113507a4338d17de3b6c56e8fac..f3ca65b3c31b5da05c84363ac614b133f7646944 100644 (file)
--- a/recvcmd.c
+++ b/recvcmd.c
@@ -38,7 +38,7 @@
 #include "mutt_idna.h"
 #include "options.h"
 #include "protos.h"
-#include "rfc822.h"
+#include "address.h"
 #include "state.h"
 
 /**
index 65b7def5444a58deea664ed2fbdbad157c2f4758..1cdd58c5d1882b9d6ed4d209130604629bf19c54 100644 (file)
@@ -45,7 +45,6 @@
 #include "opcodes.h"
 #include "options.h"
 #include "protos.h"
-#include "rfc822.h"
 
 /**
  * struct Coord - Screen coordinates
index 367c9edbecc254a9de3daf68de5ef849f3057a42..40cbd50579d7c63971319dfffbe143cd793a257f 100644 (file)
--- a/rfc2047.c
+++ b/rfc2047.c
@@ -51,8 +51,6 @@
 
 #define CONTINUATION_BYTE(c) (((c) &0xc0) == 0x80)
 
-extern char RFC822Specials[];
-
 typedef size_t (*encoder_t)(char *s, const char *d, size_t dlen, const char *tocode);
 
 static size_t convert_string(const char *f, size_t flen, const char *from,
@@ -426,7 +424,7 @@ static size_t choose_block(char *d, size_t dlen, int col, const char *fromcode,
  * if col is non-zero, the preceding character was a space.
  */
 static int rfc2047_encode(const char *d, size_t dlen, int col, const char *fromcode,
-                          const char *charsets, char **e, size_t *elen, char *specials)
+                          const char *charsets, char **e, size_t *elen, const char *specials)
 {
   int rc = 0;
   char *buf = NULL;
diff --git a/rfc822.h b/rfc822.h
deleted file mode 100644 (file)
index d983ab8..0000000
--- a/rfc822.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * @file
- * RFC822 Email format routines
- *
- * @authors
- * Copyright (C) 1996-2000 Michael R. Elkins <me@mutt.org>
- * Copyright (C) 2012 Michael R. Elkins <me@mutt.org>
- *
- * @copyright
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 2 of the License, or (at your option) any later
- * version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef _MUTT_RFC822_H
-#define _MUTT_RFC822_H
-
-#include <stddef.h>
-#include <stdbool.h>
-#include "address.h"
-#include "mutt/mutt.h"
-
-/**
- * enum AddressError - possible values for RFC822Error
- */
-enum AddressError
-{
-  ERR_MEMORY = 1,
-  ERR_MISMATCH_PAREN,
-  ERR_MISMATCH_QUOTE,
-  ERR_BAD_ROUTE,
-  ERR_BAD_ROUTE_ADDR,
-  ERR_BAD_ADDR_SPEC
-};
-
-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);
-struct Address *rfc822_cpy_adr(struct Address *addr, int prune);
-struct Address *rfc822_cpy_adr_real(struct Address *addr);
-struct Address *rfc822_append(struct Address **a, struct Address *b, int prune);
-int rfc822_write_address(char *buf, size_t buflen, struct Address *addr, int display);
-void rfc822_write_address_single(char *buf, size_t buflen, struct Address *addr, int display);
-void rfc822_cat(char *buf, size_t buflen, const char *value, const char *specials);
-bool rfc822_valid_msgid(const char *msgid);
-int rfc822_remove_from_adrlist(struct Address **a, const char *mailbox);
-
-extern int RFC822Error;
-extern const char *const RFC822Errors[];
-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_RFC822_H */
diff --git a/send.c b/send.c
index 032f7eab13adb8baa038b9c4917a468ff7618851..01607c31a0775a676c1d81c6a28fdde5a533170e 100644 (file)
--- a/send.c
+++ b/send.c
@@ -55,7 +55,6 @@
 #include "protos.h"
 #include "rfc2047.h"
 #include "rfc3676.h"
-#include "rfc822.h"
 #include "sort.h"
 #include "url.h"
 #ifdef USE_NNTP
index 72e10db38b1aa4ddd544efc4b6eaa0073110c865..92bfc9b5bf9ad2cd691d3d232a3bb9992b1fca93 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -64,7 +64,6 @@
 #include "protos.h"
 #include "rfc2047.h"
 #include "rfc2231.h"
-#include "rfc822.h"
 #include "state.h"
 #ifdef USE_NNTP
 #include "nntp.h"
diff --git a/url.c b/url.c
index bfd6ef8777fb86febccdf1a37ead9f7f7f7c1725..557ea077966e400660a2dc5b5c866bfeff5f0d4f 100644 (file)
--- a/url.c
+++ b/url.c
@@ -36,7 +36,7 @@
 #include "mime.h"
 #include "protos.h"
 #include "rfc2047.h"
-#include "rfc822.h"
+#include "address.h"
 
 static const struct Mapping UrlMap[] = {
   { "file", U_FILE },       { "imap", U_IMAP },     { "imaps", U_IMAPS },