create the lib-mx now
authorPierre Habouzit <madcoder@madism.org>
Sat, 18 Nov 2006 20:53:00 +0000 (21:53 +0100)
committerPierre Habouzit <madcoder@madism.org>
Sat, 18 Nov 2006 20:53:00 +0000 (21:53 +0100)
Signed-off-by: Pierre Habouzit <madcoder@madism.org>
50 files changed:
Makefile.am
attach.c
browser.c
buffy.c
commands.c
compose.c
configure.ac
copy.c
editmsg.c
flags.c
hook.c
imap/command.c
imap/imap.c
imap/imap.h
imap/message.c
imap/util.c
init.c
lib-crypt/crypt.c
lib-crypt/pgp.c
lib-mx/Makefile.am [new file with mode: 0644]
lib-mx/compress.c [moved from compress.c with 100% similarity]
lib-mx/compress.h [moved from compress.h with 100% similarity]
lib-mx/hcache.c [moved from hcache.c with 100% similarity]
lib-mx/hcache.h [moved from hcache.h with 100% similarity]
lib-mx/mbox.c [moved from mbox.c with 100% similarity]
lib-mx/mbox.h [moved from mbox.h with 100% similarity]
lib-mx/mh.c [moved from mh.c with 100% similarity]
lib-mx/mh.h [moved from mh.h with 100% similarity]
lib-mx/mx.c [moved from mx.c with 100% similarity]
lib-mx/mx.h [moved from mx.h with 100% similarity]
lib-ui/complete.c
lib-ui/curs_main.c
lib-ui/hdrline.c
lib-ui/status.c
main.c
muttlib.c
nntp/newsrc.c
nntp/nntp.c
nntp/nntp.h
pager.c
pattern.c
pop/pop.c
pop/pop.h
pop/pop_auth.c
pop/pop_lib.c
postpone.c
recvattach.c
recvcmd.c
send.c
sendlib.c

index 1b74d01..2877658 100644 (file)
@@ -10,7 +10,7 @@ NNTP_INCLUDES = -I$(top_srcdir)/nntp
 endif
 
 SUBDIRS = intl m4 po $(XXXXXXXXXXXX_doc) contrib \
-         lib-mime lib-lib lib-crypt lib-hash lib-sys lib-ui \
+         lib-mime lib-lib lib-mx lib-crypt lib-hash lib-sys lib-ui \
          pop imap $(NNTP_SUBDIR)
 
 BUILT_SOURCES = keymap_defs.h version.h charset.gperf
@@ -18,17 +18,16 @@ DISTCLEANFILES = $(BUILT_SOURCES)
 
 bin_PROGRAMS = madmutt madmutt_dotlock pgpringng pgpewrapng smime_keysng
 madmutt_SOURCES = $(BUILT_SOURCES) \
-       alias.c attach.c base64.c browser.c buffy.c charset.c compress.c commands.c \
+       alias.c attach.c base64.c browser.c buffy.c charset.c commands.c \
        compose.c copy.c editmsg.c init.c keymap.c lib.c \
-       flags.c from.c handler.c hcache.c headers.c help.c hook.c \
-       main.c mbox.c mh.c muttlib.c mutt_idna.c mx.c \
-       pager.c pattern.c postpone.c recvattach.c recvcmd.c \
+       flags.c from.c handler.c headers.c help.c hook.c \
+       main.c muttlib.c mutt_idna.c pager.c pattern.c postpone.c recvattach.c recvcmd.c \
        score.c send.c sendlib.c sort.c state.c thread.c account.c
 
 madmutt_LDADD = @MUTT_LIB_OBJECTS@ @LIBOBJS@ \
+              -Llib-lib -llib -Llib-mime -lmime -Llib-crypt -lcrypt -Llib-mx -lmx \
               -Limap -limap -Lpop -lpop $(LIBNNTP) \
-              -Llib-lib -llib -Llib-mime -lmime -Llib-crypt -lcrypt -Llib-hash -lhash \
-              -Llib-sys -lsys -Llib-ui -lui \
+              -Llib-hash -lhash -Llib-sys -lsys -Llib-ui -lui \
               $(MUTTLIBS) $(INTLLIBS) $(LIBICONV)
 
 madmutt_DEPENDENCIES = @MUTT_LIB_OBJECTS@ @LIBOBJS@ \
@@ -37,6 +36,7 @@ madmutt_DEPENDENCIES = @MUTT_LIB_OBJECTS@ @LIBOBJS@ \
                       $(top_builddir)/lib-crypt/libcrypt.a \
                       $(top_builddir)/lib-hash/libhash.a \
                       $(top_builddir)/lib-ui/libui.a \
+                      $(top_builddir)/lib-mx/libmx.a \
                       \
                       $(top_builddir)/pop/libpop.a  \
                       $(top_builddir)/imap/libimap.a \
@@ -63,9 +63,9 @@ EXTRA_madmutt_SOURCES = \
 
 EXTRA_DIST = config.rpath  COPYRIGHT GPL OPS OPS.MIX TODO \
        configure account.h alias.h attach.h recvattach.h handler.h thread.h \
-       buffy.h charset.h compress.h copy.h dotlock.h functions.def gen_defs \
+       buffy.h charset.h copy.h dotlock.h functions.def gen_defs \
        recvattach.h handler.h thread.h globals.h init.h keymap.h \
-       mime.h mutt.h mutt_sasl.h mbox.h mh.h mx.h pager.h protos.h \
+       mime.h mutt.h mutt_sasl.h pager.h protos.h \
        sort.h mime.types autogen.sh remailer.c remailer.h browser.h state.h \
        lib.h extlib.c pgpewrap.c smime_keys.pl Madmuttrc.head Madmuttrc \
        makedoc.c stamp-doc-rc README.SSL depcomp mutt_idna.h mutt_libesmtp.h
index d32f80c..118edfa 100644 (file)
--- a/attach.c
+++ b/attach.c
 #include <lib-lib/lib-lib.h>
 
 #include <lib-sys/unix.h>
-
 #include <lib-mime/mime.h>
-
 #include <lib-ui/curses.h>
 #include <lib-ui/menu.h>
+#include <lib-mx/mx.h>
 
 #include "mutt.h"
 #include "handler.h"
@@ -23,7 +22,6 @@
 #include "keymap.h"
 #include "pager.h"
 #include "copy.h"
-#include "mx.h"
 #include <lib-crypt/crypt.h>
 
 int mutt_get_tmp_attachment (BODY * a)
index 676aca9..c6207c7 100644 (file)
--- a/browser.c
+++ b/browser.c
@@ -17,9 +17,9 @@
 #include <lib-ui/enter.h>
 #include <lib-ui/menu.h>
 #include <lib-ui/sidebar.h>
+#include <lib-mx/mx.h>
 
 #include "mutt.h"
-#include "mx.h"
 #include "buffy.h"
 #include "sort.h"
 #include "browser.h"
diff --git a/buffy.c b/buffy.c
index 124ffff..0c3b4b3 100644 (file)
--- a/buffy.c
+++ b/buffy.c
 
 #include <lib-ui/curses.h>
 #include <lib-ui/sidebar.h>
+#include <lib-mx/mx.h>
+#include <lib-mx/mh.h>
 
 #include <imap/imap.h>
 
 #include "mutt.h"
 #include "buffy.h"
-#include "mx.h"
-#include "mh.h"
 
 static time_t BuffyTime = 0;    /* last time we started checking for mail */
 
index 2be0260..88d4a11 100644 (file)
 #include <lib-ui/curses.h>
 #include <lib-ui/enter.h>
 #include <lib-ui/menu.h>
+#include <lib-mx/mx.h>
 
 #include "mutt.h"
 #include "alias.h"
 #include "recvattach.h"
 #include "sort.h"
 #include "copy.h"
-#include "mx.h"
 #include "pager.h"
 #include <lib-crypt/crypt.h>
 #include "mutt_idna.h"
index c06f2fd..96d0bb1 100644 (file)
--- a/compose.c
+++ b/compose.c
@@ -20,6 +20,7 @@
 #include <lib-ui/curses.h>
 #include <lib-ui/enter.h>
 #include <lib-ui/menu.h>
+#include <lib-mx/mx.h>
 
 #include "mutt.h"
 #include "alias.h"
@@ -28,7 +29,6 @@
 #include "recvattach.h"
 #include "sort.h"
 #include "charset.h"
-#include "mx.h"
 #include "buffy.h"
 
 #ifdef MIXMASTER
index ce8e3ae..1fcdb34 100644 (file)
@@ -728,6 +728,7 @@ AC_OUTPUT(Makefile
           lib-mime/Makefile
           lib-crypt/Makefile
           lib-hash/Makefile
+          lib-mx/Makefile
           lib-sys/Makefile
           lib-ui/Makefile
           imap/Makefile
diff --git a/copy.c b/copy.c
index 8310f6f..c63ab8d 100644 (file)
--- a/copy.c
+++ b/copy.c
 #include <lib-lib/lib-lib.h>
 
 #include <lib-mime/mime.h>
+#include <lib-mx/mx.h>
 
 #include "mutt.h"
 #include "handler.h"
-#include "mx.h"
 #include "copy.h"
 #include <lib-crypt/crypt.h>
 #include <lib-ui/curses.h>
index f204456..c77cbf9 100644 (file)
--- a/editmsg.c
+++ b/editmsg.c
 
 #include <lib-lib/lib-lib.h>
 #include <lib-ui/curses.h>
+#include <lib-mx/mx.h>
 
 #include "mutt.h"
 #include "copy.h"
-#include "mx.h"
 
 /*
  * return value:
diff --git a/flags.c b/flags.c
index 4fe7ce3..fc3c4b4 100644 (file)
--- a/flags.c
+++ b/flags.c
 #include <lib-ui/curses.h>
 #include <lib-ui/menu.h>
 #include <lib-ui/sidebar.h>
+#include <lib-mx/mx.h>
 
 #include "mutt.h"
 #include "sort.h"
-#include "mx.h"
 
 #include <imap/imap_private.h>
 
diff --git a/hook.c b/hook.c
index 9bb2386..86158f3 100644 (file)
--- a/hook.c
+++ b/hook.c
@@ -9,12 +9,11 @@
 
 #include <lib-lib/lib-lib.h>
 #include <lib-ui/curses.h>
+#include <lib-mx/mx.h>
+#include <lib-mx/compress.h>
+#include <lib-crypt/crypt.h>
 
-#include "mutt.h"
 #include "alias.h"
-#include "mx.h"
-#include <lib-crypt/crypt.h>
-#include "compress.h"
 
 #define ERROR_STOP      0
 
index 2714633..bf21c4b 100644 (file)
  *  responses */
 
 #include <lib-lib/lib-lib.h>
+#include <lib-mx/mx.h>
 
 #include "mutt.h"
 #include "message.h"
-#include "mx.h"
 #include "imap_private.h"
 
 #include <ctype.h>
index dcaccd1..a180ac1 100644 (file)
@@ -12,9 +12,9 @@
 /* Support for IMAP4rev1, with the occasional nod to IMAP 4. */
 
 #include <lib-lib/lib-lib.h>
+#include <lib-mx/mx.h>
 
 #include "mutt.h"
-#include "mx.h"
 #include "globals.h"
 #include "sort.h"
 #include "browser.h"
index 3b634e0..a1ef7e6 100644 (file)
 #ifndef _IMAP_H
 #define _IMAP_H 1
 
+#include <lib-mx/mx.h>
+
 #include "account.h"
 #include "browser.h"
-#include "mx.h"
 
 extern mx_t const imap_mx;
 
index 1f634af..930f4d3 100644 (file)
 #include <lib-lib/lib-lib.h>
 
 #include <lib-ui/curses.h>
+#include <lib-mx/mx.h>
+#include <lib-mx/hcache.h>
 
 #include "mutt.h"
 #include "imap_private.h"
 #include "message.h"
-#include "mx.h"
-#include "hcache.h"
 
 #ifdef HAVE_PGP
 #include "pgp.h"
index abcbe2b..fb4c503 100644 (file)
@@ -14,9 +14,9 @@
 #include <lib-lib/lib-lib.h>
 #include <signal.h>
 #include <netdb.h>
+#include <lib-mx/mx.h>
 
 #include "mutt.h"
-#include "mx.h"                 /* for M_IMAP */
 #include "imap_private.h"
 #include <lib-sys/mutt_ssl.h>
 
diff --git a/init.c b/init.c
index 983a620..c3db611 100644 (file)
--- a/init.c
+++ b/init.c
@@ -18,6 +18,7 @@
 
 #include <lib-ui/curses.h>
 #include <lib-ui/history.h>
+#include <lib-mx/mx.h>
 
 #include "mutt.h"
 #include "keymap.h"
@@ -31,7 +32,6 @@
 #endif
 
 #include "alias.h"
-#include "mx.h"
 #include "init.h"
 
 /*
index 19d36c0..f677789 100644 (file)
@@ -24,8 +24,8 @@
 #include <lib-mime/mime.h>
 
 #include <lib-ui/curses.h>
+#include <lib-mx/mx.h>
 
-#include "mx.h"
 #include "alias.h"
 #include "handler.h"
 #include "copy.h"
index b29d35b..ab978d0 100644 (file)
@@ -29,8 +29,8 @@
 #include <lib-ui/curses.h>
 #include <lib-ui/enter.h>
 #include <lib-ui/menu.h>
+#include <lib-mx/mx.h>
 
-#include "mx.h"
 #include "handler.h"
 #include "pgp.h"
 #include "copy.h"
diff --git a/lib-mx/Makefile.am b/lib-mx/Makefile.am
new file mode 100644 (file)
index 0000000..3261100
--- /dev/null
@@ -0,0 +1,8 @@
+noinst_LIBRARIES = libmx.a
+
+libmx_a_SOURCES = mx.h mh.h mbox.h compress.h hcache.h \
+                 mx.c mh.c mbox.c compress.c hcache.c
+
+noinst_HEADERS  = mx.h
+
+-include ../cflags.mk
similarity index 100%
rename from compress.c
rename to lib-mx/compress.c
similarity index 100%
rename from compress.h
rename to lib-mx/compress.h
similarity index 100%
rename from hcache.c
rename to lib-mx/hcache.c
similarity index 100%
rename from hcache.h
rename to lib-mx/hcache.h
similarity index 100%
rename from mbox.c
rename to lib-mx/mbox.c
similarity index 100%
rename from mbox.h
rename to lib-mx/mbox.h
similarity index 100%
rename from mh.c
rename to lib-mx/mh.c
similarity index 100%
rename from mh.h
rename to lib-mx/mh.h
similarity index 100%
rename from mx.c
rename to lib-mx/mx.c
similarity index 100%
rename from mx.h
rename to lib-mx/mx.h
index ded2862..97f5b2d 100644 (file)
@@ -8,9 +8,9 @@
  */
 
 #include <lib-lib/lib-lib.h>
+#include <lib-mx/mx.h>
 
 #include "mutt.h"
-#include "mx.h"
 #include "curses.h"
 #include <imap/imap.h>
 #ifdef USE_NNTP
index fdce20e..6e20d66 100644 (file)
@@ -13,6 +13,7 @@
 #include <lib-lib/lib-lib.h>
 
 #include <lib-ui/sidebar.h>
+#include <lib-mx/mx.h>
 
 #include <pop/pop.h>
 
 
 #include "mutt.h"
 #include "alias.h"
-#include "mx.h"
 #include "sort.h"
 #include "recvattach.h"
 #include "buffy.h"
-#include "mx.h"
 #include "thread.h"
 #include "xterm.h"
 
index 1b3f10a..883c9cb 100644 (file)
@@ -10,8 +10,8 @@
 #include <lib-lib/lib-lib.h>
 
 #include <lib-mime/mime.h>
-
 #include <lib-ui/curses.h>
+#include <lib-mx/mx.h>
 
 #include "mutt.h"
 #include "alias.h"
@@ -20,7 +20,6 @@
 #include "charset.h"
 #include <lib-crypt/crypt.h>
 #include "mutt_idna.h"
-#include "mx.h"
 
 int mutt_is_mail_list (address_t * addr)
 {
index 28b1329..b19bf24 100644 (file)
 
 #include <lib-ui/curses.h>
 #include <lib-ui/menu.h>
+#include <lib-mx/mx.h>
 
 #include "mutt.h"
 #include "sort.h"
-#include "mx.h"
 #include "buffy.h"
 
 #define SW              (option(OPTMBOXPANE)?SidebarWidth:0)
diff --git a/main.c b/main.c
index 1e512c5..96493be 100644 (file)
--- a/main.c
+++ b/main.c
 #include <sys/utsname.h>
 
 #include <lib-sys/mutt_signal.h>
-
 #include <lib-mime/mime.h>
-
 #include <lib-ui/curses.h>
+#include <lib-mx/mx.h>
 
 #include "mutt.h"
 #include "alias.h"
-#include "mx.h"
 #include "buffy.h"
 #include "sort.h"
 #include <lib-crypt/crypt.h>
index caf5fd9..1c8a288 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
 #include <utime.h>
 
 #include <lib-mime/mime.h>
-
 #include <lib-ui/curses.h>
 #include <lib-ui/enter.h>
-
 #include <lib-sys/unix.h>
+#include <lib-mx/mx.h>
 
 #include "alias.h"
 #include "mutt.h"
-#include "mx.h"
 #include "attach.h"
 
 #include "version.h"
index 1499ba8..fef72fc 100644 (file)
 
 #include <lib-mime/mime.h>
 #include <lib-ui/curses.h>
+#include <lib-mx/mx.h>
 
 #include "mutt.h"
 #include "sort.h"
-#include "mx.h"
 #include "nntp.h"
 
 void nntp_add_to_list (NNTP_SERVER * s, NNTP_DATA * d)
index e24857a..2141454 100644 (file)
 #include <lib-mime/mime.h>
 #include <lib-ui/curses.h>
 #include <lib-ui/sidebar.h>
+#include <lib-mx/mx.h>
 
 #include "mutt.h"
 #include "sort.h"
-#include "mx.h"
 #include "nntp.h"
 #include "buffy.h"
 
index 90e2bf1..4ce5635 100644 (file)
@@ -13,7 +13,7 @@
 #define _NNTP_H_ 1
 
 #include <lib-sys/mutt_socket.h>
-#include "mx.h"
+#include <lib-mx/mx.h>
 
 extern mx_t const nntp_mx;
 
diff --git a/pager.c b/pager.c
index b83eaaf..0c9441f 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -17,6 +17,7 @@
 #include <lib-ui/enter.h>
 #include <lib-ui/menu.h>
 #include <lib-ui/sidebar.h>
+#include <lib-mx/mx.h>
 
 #include "mutt.h"
 #include "alias.h"
@@ -28,7 +29,6 @@
 #include "charset.h"
 #include "buffy.h"
 
-#include "mx.h"
 
 #include <imap/imap_private.h>
 
@@ -937,11 +937,9 @@ fill_buffer (FILE * f, off_t *last_pos, off_t offset, unsigned char *buf,
 }
 
 #ifdef USE_NNTP
-#include "mx.h"
-#include "nntp.h"
+#include <nntp/nntp.h>
 #endif
 
-
 static int format_line (struct line_t **lineInfo, int n, unsigned char *buf,
                         int flags, ansi_attr * pa, int cnt,
                         int *pspace, int *pvch, int *pcol, int *pspecial)
index 392a4a6..de4efb4 100644 (file)
--- a/pattern.c
+++ b/pattern.c
 #include <lib-mime/mime.h>
 #include <lib-ui/enter.h>
 #include <lib-ui/curses.h>
+#include <lib-mx/mx.h>
 
 #include "mutt.h"
 #include "alias.h"
 #include "handler.h"
-#include "mx.h"
 #include "keymap.h"
 #include "copy.h"
 
index a6e1fd8..3f3ee0f 100644 (file)
--- a/pop/pop.c
+++ b/pop/pop.c
@@ -10,9 +10,9 @@
 #include <lib-lib/lib-lib.h>
 
 #include <lib-ui/curses.h>
+#include <lib-mx/mx.h>
 
 #include "mutt.h"
-#include "mx.h"
 #include "pop.h"
 #include <lib-crypt/crypt.h>
 
index a6c9049..da52593 100644 (file)
--- a/pop/pop.h
+++ b/pop/pop.h
@@ -12,8 +12,8 @@
 
 #include <lib-ui/curses.h>
 #include <lib-sys/mutt_socket.h>
+#include <lib-mx/mx.h>
 
-#include "mx.h"
 
 extern mx_t const pop_mx;
 
index d17d52f..04c1e39 100644 (file)
@@ -10,9 +10,9 @@
 #include <lib-lib/lib-lib.h>
 
 #include <lib-hash/hash.h>
+#include <lib-mx/mx.h>
 
 #include "mutt.h"
-#include "mx.h"
 #include "pop.h"
 
 #ifdef USE_SASL
index a96a01c..b3bac5a 100644 (file)
@@ -8,9 +8,9 @@
  */
 
 #include <lib-lib/lib-lib.h>
+#include <lib-mx/mx.h>
 
 #include "mutt.h"
-#include "mx.h"
 #include "pop.h"
 #if defined (USE_SSL) || defined (USE_GNUTLS)
 # include <lib-sys/mutt_ssl.h>
index 7198d53..4f57af2 100644 (file)
@@ -15,6 +15,7 @@
 #include <lib-ui/enter.h>
 #include <lib-ui/menu.h>
 #include <lib-ui/curses.h>
+#include <lib-mx/mx.h>
 
 #include <lib-sys/unix.h>
 
@@ -22,7 +23,6 @@
 #include "handler.h"
 #include "sort.h"
 #include "thread.h"
-#include "mx.h"
 #include <lib-crypt/crypt.h>
 
 #include <imap/imap.h>
index 97cb41a..760651c 100644 (file)
@@ -15,6 +15,7 @@
 #include <lib-ui/curses.h>
 #include <lib-ui/enter.h>
 #include <lib-ui/menu.h>
+#include <lib-mx/mx.h>
 
 #include <lib-sys/unix.h>
 
@@ -22,7 +23,6 @@
 #include "handler.h"
 #include "recvattach.h"
 #include "attach.h"
-#include "mx.h"
 #include "copy.h"
 #include <lib-crypt/crypt.h>
 
index 4e37015..550ec9c 100644 (file)
--- a/recvcmd.c
+++ b/recvcmd.c
@@ -14,6 +14,7 @@
 #include <lib-ui/curses.h>
 #include <lib-ui/enter.h>
 #include <lib-ui/menu.h>
+#include <lib-mx/mx.h>
 
 #include "mutt.h"
 #include "alias.h"
@@ -21,7 +22,6 @@
 #include "handler.h"
 #include "recvattach.h"
 #include "attach.h"
-#include "mx.h"
 #include "copy.h"
 #include "mutt_idna.h"
 
diff --git a/send.c b/send.c
index ace09c0..62748d4 100644 (file)
--- a/send.c
+++ b/send.c
 #include <lib-sys/unix.h>
 #include <lib-ui/curses.h>
 #include <lib-ui/enter.h>
+#include <lib-mx/mx.h>
 
 #include "alias.h"
 #include "keymap.h"
 #include "copy.h"
-#include "mx.h"
 #include <lib-crypt/crypt.h>
 #include "mutt_idna.h"
 #include "attach.h"
index 6f40ea1..cc2562d 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
 #include <lib-sys/mutt_signal.h>
 #include <lib-mime/mime.h>
 #include <lib-ui/curses.h>
+#include <lib-mx/mx.h>
 
 #include <lib-crypt/crypt.h>
 
 #include "mutt.h"
 #include "handler.h"
 #include "recvattach.h"
-#include "mx.h"
 #include "copy.h"
 #include "pager.h"
 #include "charset.h"