]> granicus.if.org Git - neomutt/commitdiff
move email functions to libemail
authorRichard Russon <rich@flatcap.org>
Sat, 14 Jul 2018 10:43:36 +0000 (11:43 +0100)
committerRichard Russon <rich@flatcap.org>
Mon, 16 Jul 2018 22:44:16 +0000 (23:44 +0100)
18 files changed:
.gitignore
Makefile.autosetup
conn/conn_raw.c
conn/ssl.c
email/address.c
email/body.c
email/email.h
email/idna.c [moved from mutt/idna.c with 98% similarity]
email/idna2.h [moved from mutt/idna2.h with 94% similarity]
email/mime.c [moved from mutt/mime.c with 96% similarity]
email/mime.h [moved from mutt/mime.h with 96% similarity]
email/rfc2047.c [moved from mutt/rfc2047.c with 99% similarity]
email/rfc2047.h [moved from mutt/rfc2047.h with 93% similarity]
email/url.c
mutt/mutt.h
ncrypt/gnupgparse.c
test/rfc2047.c
version.c

index 0429f6e147c8b180b88b5ef0cc02139cee48f2d8..8e0b57eac87334f2eda46a648f0856f0cef5ab39 100644 (file)
@@ -16,6 +16,7 @@ test/neomutt-test
 *.o
 *.Po
 *.Tpo
+html
 lib*.a
 po/*.mo
 po/neomutt.pot
index fd1400d8fe2a020d6f99d30da516d0316769cacb..526345e4d2b367e692f1350ca2cc399b17c8841d 100644 (file)
@@ -90,7 +90,7 @@ ALLOBJS+=     $(NEOMUTTOBJS)
 # libemail
 LIBEMAIL=      libemail.a
 LIBEMAILOBJS=  email/address.o email/attach.o email/body.o email/envelope.o \
-               email/from.o email/header.o email/parameter.o email/tags.o email/thread.o email/url.o
+               email/from.o email/header.o email/idna.o email/mime.o email/parameter.o email/rfc2047.o email/tags.o email/thread.o email/url.o
 CLEANFILES+=   $(LIBEMAIL) $(LIBEMAILOBJS)
 MUTTLIBS+=     $(LIBEMAIL)
 ALLOBJS+=      $(LIBEMAILOBJS)
@@ -142,9 +142,9 @@ ALLOBJS+=   $(LIBMAILDIROBJS)
 LIBMUTT=       libmutt.a
 LIBMUTTOBJS=   mutt/base64.o mutt/buffer.o mutt/charset.o mutt/date.o \
                mutt/envlist.o mutt/exit.o mutt/file.o mutt/hash.o mutt/history.o \
-               mutt/idna.o mutt/list.o mutt/logging.o mutt/mapping.o \
-               mutt/mbyte.o mutt/md5.o mutt/memory.o mutt/mime.o mutt/regex.o \
-               mutt/rfc2047.o mutt/sha1.o mutt/signal.o mutt/string.o
+               mutt/list.o mutt/logging.o mutt/mapping.o \
+               mutt/mbyte.o mutt/md5.o mutt/memory.o mutt/regex.o \
+               mutt/sha1.o mutt/signal.o mutt/string.o
 CLEANFILES+=   $(LIBMUTT) $(LIBMUTTOBJS)
 MUTTLIBS+=     $(LIBMUTT)
 ALLOBJS+=      $(LIBMUTTOBJS)
index cc1b8a5c6c2392c2403a300aa96905fcb94a9453..14d4974442978894fbd204b8599538a5e76cd1dd 100644 (file)
@@ -42,6 +42,7 @@
 #include <sys/time.h>
 #include <time.h>
 #include <unistd.h>
+#include "email/email.h"
 #include "conn_globals.h"
 #include "connection.h"
 #include "curs_lib.h"
index 6294625cf275db5015617fd403665eb6cdba124b..d79223238c080ce01d31bd694d79407a9ca7b582 100644 (file)
@@ -51,6 +51,7 @@
 #include "mutt/memory.h"
 #include "mutt/message.h"
 #include "mutt/string2.h"
+#include "email/idna2.h"
 #include "mutt.h"
 #include "ssl.h"
 #include "account.h"
index 9cab3d0a91be6679de532d4d0bc98b9e9531e679..2d7c944d1ac5e455ffbba3881b5adbe0ebba2da0 100644 (file)
@@ -33,6 +33,7 @@
 #include <string.h>
 #include "mutt/mutt.h"
 #include "address.h"
+#include "idna2.h"
 
 /**
  * AddressSpecials - Characters with special meaning for email addresses
index af672db26588ddbd938439e0789c9cb2fb25ef1b..842857778ba7b376cec6791aa226070f32937e1b 100644 (file)
@@ -32,6 +32,7 @@
 #include "mutt/mutt.h"
 #include "body.h"
 #include "header.h"
+#include "mime.h"
 
 /**
  * mutt_body_new - Create a new Body
index ff9dbd08c1ad5de5b69f26a56b04c538ef72e844..6b306812284716f3d3e12397f45395f8a7d972db 100644 (file)
  * | email/envelope.c  | @subpage email_envelope  |
  * | email/from.c      | @subpage email_from      |
  * | email/header.c    | @subpage email_header    |
+ * | email/idna.c      | @subpage email_idna      |
  * | email/parameter.c | @subpage email_parameter |
+ * | email/mime.c      | @subpage email_mime      |
+ * | email/rfc2047.c   | @subpage email_rfc2047   |
  * | email/tags.c      | @subpage email_tags      |
  * | email/thread.c    | @subpage email_thread    |
  * | email/url.c       | @subpage email_url       |
 #include "envelope.h"
 #include "from.h"
 #include "header.h"
+#include "idna2.h"
+#include "mime.h"
 #include "parameter.h"
+#include "rfc2047.h"
 #include "tags.h"
 #include "thread.h"
 #include "url.h"
similarity index 98%
rename from mutt/idna.c
rename to email/idna.c
index f39822ec3ece1811673cdcfdc0679a2c5b2b86c0..159eb47f6e91609e0bba5a39f6fb65ef7f484c79 100644 (file)
@@ -21,7 +21,7 @@
  */
 
 /**
- * @page idna Handling of international domain names
+ * @page email_idna Handling of international domain names
  *
  * Handling of international domain names
  */
 #include <stdbool.h>
 #include <stdio.h>
 #include <string.h>
-#include "charset.h"
+#include "mutt/mutt.h"
 #include "idna2.h"
-#include "logging.h"
-#include "memory.h"
-#include "string2.h"
 #ifdef HAVE_STRINGPREP_H
 #include <stringprep.h>
 #elif defined(HAVE_IDN_STRINGPREP_H)
similarity index 94%
rename from mutt/idna2.h
rename to email/idna2.h
index 972a6bc8e16b8307f5df80f546ba87eb5e4501f3..50645d9fb516fd632961cc73ead0128b35d14b3e 100644 (file)
@@ -20,8 +20,8 @@
  * this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef _MUTT_IDNA_H
-#define _MUTT_IDNA_H
+#ifndef _EMAIL_IDNA_H
+#define _EMAIL_IDNA_H
 
 #include <stdbool.h>
 
@@ -37,4 +37,4 @@ const char *mutt_idna_print_version(void);
 int         mutt_idna_to_ascii_lz(const char *input, char **output, int flags);
 
 
-#endif /* _MUTT_IDNA_H */
+#endif /* _EMAIL_IDNA_H */
similarity index 96%
rename from mutt/mime.c
rename to email/mime.c
index fb99cb7ce879be0668b8324de09f2e2afd7bffc0..526243c14b7c7e4df6cb6b665b4db9e8b950d07a 100644 (file)
@@ -21,7 +21,7 @@
  */
 
 /**
- * @page mime Constants and macros for managing MIME encoding
+ * @page email_mime Constants and macros for managing MIME encoding
  *
  * Constants and macros for managing MIME encoding.
  */
similarity index 96%
rename from mutt/mime.h
rename to email/mime.h
index 12e2aa1bda5cacf5dc6392ac7cfdbc386e3e20fe..a8d37e423d3f3415739f0a520584cac086938a18 100644 (file)
@@ -20,8 +20,8 @@
  * this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef _MUTT_MIME_H
-#define _MUTT_MIME_H
+#ifndef _EMAIL_MIME_H
+#define _EMAIL_MIME_H
 
 /**
  * enum ContentType - Content-Type
@@ -83,4 +83,4 @@ extern const char MimeSpecials[];
   ((X->type == TYPEOTHER) && (X->xtype != NULL) ? X->xtype : BodyTypes[(X->type)])
 #define ENCODING(X) BodyEncodings[(X)]
 
-#endif /* _MUTT_MIME_H */
+#endif /* _EMAIL_MIME_H */
similarity index 99%
rename from mutt/rfc2047.c
rename to email/rfc2047.c
index 3cc8f58678fe1af460e93475f8adf8a5e5a17a74..98467a631d733e7770c3833264d06f5fe29add42 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 /**
- * @page rfc2047 RFC2047 encoding / decoding functions
+ * @page email_rfc2047 RFC2047 encoding / decoding functions
  *
  * RFC2047 MIME extensions encoding / decoding routines.
  */
 #include <stdbool.h>
 #include <string.h>
 #include "rfc2047.h"
-#include "base64.h"
-#include "buffer.h"
-#include "charset.h"
-#include "mbyte.h"
-#include "memory.h"
+#include "mutt/mutt.h"
 #include "mime.h"
-#include "regex3.h"
-#include "string2.h"
 
 #define ENCWORD_LEN_MAX 75
 #define ENCWORD_LEN_MIN 9 /* strlen ("=?.?.?.?=") */
similarity index 93%
rename from mutt/rfc2047.h
rename to email/rfc2047.h
index af0046eb9c2b91f058eef4a588f5eb3c42b6952a..38c2ce6e39ddb242565b132f55be54fd7e15f98f 100644 (file)
  * this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef _MUTT_RFC2047_H
-#define _MUTT_RFC2047_H
+#ifndef _EMAIL_RFC2047_H
+#define _EMAIL_RFC2047_H
 
 void mutt_rfc2047_decode(char **pd);
 void mutt_rfc2047_encode(char **pd, const char *specials, int col, const char *charsets);
 
-#endif /* _MUTT_RFC2047_H */
+#endif /* _EMAIL_RFC2047_H */
index 00cc985c300b8558a97c052c6769786feea91f64..7b1917156e730256804ccf5d594b739940512a4b 100644 (file)
  * this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+/**
+ * @page email_url Parse and identify different URL schemes
+ *
+ * Parse and identify different URL schemes
+ */
+
 #include "config.h"
 #include <ctype.h>
 #include <stdio.h>
 #include <string.h>
 #include "mutt/mutt.h"
 #include "url.h"
+#include "mime.h"
 
 static const struct Mapping UrlMap[] = {
   { "file", U_FILE },   { "imap", U_IMAP },     { "imaps", U_IMAPS },
index 0b4ba11d84e44e78f259bb5a2b05228c97e16281..cdc31d4b3d0e7c810a59ae31d43ce7ebc17b7886 100644 (file)
  * | mutt/file.c      | @subpage file      |
  * | mutt/hash.c      | @subpage hash      |
  * | mutt/history.c   | @subpage history   |
- * | mutt/idna.c      | @subpage idna      |
  * | mutt/list.c      | @subpage list      |
  * | mutt/logging.c   | @subpage logging   |
  * | mutt/mapping.c   | @subpage mapping   |
  * | mutt/mbyte.c     | @subpage mbyte     |
  * | mutt/md5.c       | @subpage md5       |
  * | mutt/memory.c    | @subpage memory    |
- * | mutt/mime.c      | @subpage mime      |
  * | mutt/regex.c     | @subpage regex     |
- * | mutt/rfc2047.c   | @subpage rfc2047   |
  * | mutt/sha1.c      | @subpage sha1      |
  * | mutt/signal.c    | @subpage signal    |
  * | mutt/string.c    | @subpage string    |
  *
  * @note The library is self-contained -- some files may depend on others in
  *       the library, but none depends on source from outside.
- *
- * @image html libmutt.svg
  */
 
 #ifndef _MUTT_MUTT_H
@@ -68,7 +63,6 @@
 #include "file.h"
 #include "hash.h"
 #include "history.h"
-#include "idna2.h"
 #include "list.h"
 #include "logging.h"
 #include "mapping.h"
 #include "md5.h"
 #include "memory.h"
 #include "message.h"
-#include "mime.h"
 #include "queue.h"
 #include "regex3.h"
-#include "rfc2047.h"
 #include "sha1.h"
 #include "signal2.h"
 #include "string2.h"
index f15104b9389abecc512137c46f7b92daa9fdfafb..f9ef8b5378efc2851eb73b885d94d253eb019479 100644 (file)
@@ -42,6 +42,7 @@
 #include <time.h>
 #include <unistd.h>
 #include "mutt/mutt.h"
+#include "email/email.h"
 #include "filter.h"
 #include "globals.h"
 #include "ncrypt.h"
index bc9fcd016349532ee5226df1949454a370e79493..b1d5e2c9585e3a41fabbc063ac60994faeceb9da 100644 (file)
@@ -3,8 +3,8 @@
 
 #include "mutt/charset.h"
 #include "mutt/memory.h"
-#include "mutt/rfc2047.h"
 #include "mutt/string2.h"
+#include "email/rfc2047.h"
 
 #include <locale.h>
 
index 51be569e197aa08e5cd555626757d700978cc26d..f941e522feebf1dbb2ddad16ddc16188e38eba2c 100644 (file)
--- a/version.c
+++ b/version.c
@@ -35,6 +35,7 @@
 #include <sys/utsname.h>
 #include <unistd.h>
 #include "mutt/mutt.h"
+#include "email/email.h"
 #include "mutt_curses.h"
 
 /* #include "protos.h" */