From 8476307969a605bea67f6b702b0c1e7a52038bed Mon Sep 17 00:00:00 2001 From: Pierre Habouzit Date: Sat, 18 Nov 2006 21:53:00 +0100 Subject: [PATCH] create the lib-mx now Signed-off-by: Pierre Habouzit --- Makefile.am | 18 +++++++++--------- attach.c | 4 +--- browser.c | 2 +- buffy.c | 4 ++-- commands.c | 2 +- compose.c | 2 +- configure.ac | 1 + copy.c | 2 +- editmsg.c | 2 +- flags.c | 2 +- hook.c | 7 +++---- imap/command.c | 2 +- imap/imap.c | 2 +- imap/imap.h | 3 ++- imap/message.c | 4 ++-- imap/util.c | 2 +- init.c | 2 +- lib-crypt/crypt.c | 2 +- lib-crypt/pgp.c | 2 +- lib-mx/Makefile.am | 8 ++++++++ compress.c => lib-mx/compress.c | 0 compress.h => lib-mx/compress.h | 0 hcache.c => lib-mx/hcache.c | 0 hcache.h => lib-mx/hcache.h | 0 mbox.c => lib-mx/mbox.c | 0 mbox.h => lib-mx/mbox.h | 0 mh.c => lib-mx/mh.c | 0 mh.h => lib-mx/mh.h | 0 mx.c => lib-mx/mx.c | 0 mx.h => lib-mx/mx.h | 0 lib-ui/complete.c | 2 +- lib-ui/curs_main.c | 3 +-- lib-ui/hdrline.c | 3 +-- lib-ui/status.c | 2 +- main.c | 4 +--- muttlib.c | 4 +--- nntp/newsrc.c | 2 +- nntp/nntp.c | 2 +- nntp/nntp.h | 2 +- pager.c | 6 ++---- pattern.c | 2 +- pop/pop.c | 2 +- pop/pop.h | 2 +- pop/pop_auth.c | 2 +- pop/pop_lib.c | 2 +- postpone.c | 2 +- recvattach.c | 2 +- recvcmd.c | 2 +- send.c | 2 +- sendlib.c | 2 +- 50 files changed, 61 insertions(+), 62 deletions(-) create mode 100644 lib-mx/Makefile.am rename compress.c => lib-mx/compress.c (100%) rename compress.h => lib-mx/compress.h (100%) rename hcache.c => lib-mx/hcache.c (100%) rename hcache.h => lib-mx/hcache.h (100%) rename mbox.c => lib-mx/mbox.c (100%) rename mbox.h => lib-mx/mbox.h (100%) rename mh.c => lib-mx/mh.c (100%) rename mh.h => lib-mx/mh.h (100%) rename mx.c => lib-mx/mx.c (100%) rename mx.h => lib-mx/mx.h (100%) diff --git a/Makefile.am b/Makefile.am index 1b74d01..2877658 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 diff --git a/attach.c b/attach.c index d32f80c..118edfa 100644 --- a/attach.c +++ b/attach.c @@ -11,11 +11,10 @@ #include #include - #include - #include #include +#include #include "mutt.h" #include "handler.h" @@ -23,7 +22,6 @@ #include "keymap.h" #include "pager.h" #include "copy.h" -#include "mx.h" #include int mutt_get_tmp_attachment (BODY * a) diff --git a/browser.c b/browser.c index 676aca9..c6207c7 100644 --- a/browser.c +++ b/browser.c @@ -17,9 +17,9 @@ #include #include #include +#include #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 --- a/buffy.c +++ b/buffy.c @@ -16,13 +16,13 @@ #include #include +#include +#include #include #include "mutt.h" #include "buffy.h" -#include "mx.h" -#include "mh.h" static time_t BuffyTime = 0; /* last time we started checking for mail */ diff --git a/commands.c b/commands.c index 2be0260..88d4a11 100644 --- a/commands.c +++ b/commands.c @@ -19,13 +19,13 @@ #include #include #include +#include #include "mutt.h" #include "alias.h" #include "recvattach.h" #include "sort.h" #include "copy.h" -#include "mx.h" #include "pager.h" #include #include "mutt_idna.h" diff --git a/compose.c b/compose.c index c06f2fd..96d0bb1 100644 --- a/compose.c +++ b/compose.c @@ -20,6 +20,7 @@ #include #include #include +#include #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 diff --git a/configure.ac b/configure.ac index ce8e3ae..1fcdb34 100644 --- a/configure.ac +++ b/configure.ac @@ -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 --- a/copy.c +++ b/copy.c @@ -10,10 +10,10 @@ #include #include +#include #include "mutt.h" #include "handler.h" -#include "mx.h" #include "copy.h" #include #include diff --git a/editmsg.c b/editmsg.c index f204456..c77cbf9 100644 --- a/editmsg.c +++ b/editmsg.c @@ -11,10 +11,10 @@ #include #include +#include #include "mutt.h" #include "copy.h" -#include "mx.h" /* * return value: diff --git a/flags.c b/flags.c index 4fe7ce3..fc3c4b4 100644 --- a/flags.c +++ b/flags.c @@ -12,10 +12,10 @@ #include #include #include +#include #include "mutt.h" #include "sort.h" -#include "mx.h" #include diff --git a/hook.c b/hook.c index 9bb2386..86158f3 100644 --- a/hook.c +++ b/hook.c @@ -9,12 +9,11 @@ #include #include +#include +#include +#include -#include "mutt.h" #include "alias.h" -#include "mx.h" -#include -#include "compress.h" #define ERROR_STOP 0 diff --git a/imap/command.c b/imap/command.c index 2714633..bf21c4b 100644 --- a/imap/command.c +++ b/imap/command.c @@ -13,10 +13,10 @@ * responses */ #include +#include #include "mutt.h" #include "message.h" -#include "mx.h" #include "imap_private.h" #include diff --git a/imap/imap.c b/imap/imap.c index dcaccd1..a180ac1 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -12,9 +12,9 @@ /* Support for IMAP4rev1, with the occasional nod to IMAP 4. */ #include +#include #include "mutt.h" -#include "mx.h" #include "globals.h" #include "sort.h" #include "browser.h" diff --git a/imap/imap.h b/imap/imap.h index 3b634e0..a1ef7e6 100644 --- a/imap/imap.h +++ b/imap/imap.h @@ -11,9 +11,10 @@ #ifndef _IMAP_H #define _IMAP_H 1 +#include + #include "account.h" #include "browser.h" -#include "mx.h" extern mx_t const imap_mx; diff --git a/imap/message.c b/imap/message.c index 1f634af..930f4d3 100644 --- a/imap/message.c +++ b/imap/message.c @@ -13,12 +13,12 @@ #include #include +#include +#include #include "mutt.h" #include "imap_private.h" #include "message.h" -#include "mx.h" -#include "hcache.h" #ifdef HAVE_PGP #include "pgp.h" diff --git a/imap/util.c b/imap/util.c index abcbe2b..fb4c503 100644 --- a/imap/util.c +++ b/imap/util.c @@ -14,9 +14,9 @@ #include #include #include +#include #include "mutt.h" -#include "mx.h" /* for M_IMAP */ #include "imap_private.h" #include diff --git a/init.c b/init.c index 983a620..c3db611 100644 --- a/init.c +++ b/init.c @@ -18,6 +18,7 @@ #include #include +#include #include "mutt.h" #include "keymap.h" @@ -31,7 +32,6 @@ #endif #include "alias.h" -#include "mx.h" #include "init.h" /* diff --git a/lib-crypt/crypt.c b/lib-crypt/crypt.c index 19d36c0..f677789 100644 --- a/lib-crypt/crypt.c +++ b/lib-crypt/crypt.c @@ -24,8 +24,8 @@ #include #include +#include -#include "mx.h" #include "alias.h" #include "handler.h" #include "copy.h" diff --git a/lib-crypt/pgp.c b/lib-crypt/pgp.c index b29d35b..ab978d0 100644 --- a/lib-crypt/pgp.c +++ b/lib-crypt/pgp.c @@ -29,8 +29,8 @@ #include #include #include +#include -#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 index 0000000..3261100 --- /dev/null +++ b/lib-mx/Makefile.am @@ -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 diff --git a/compress.c b/lib-mx/compress.c similarity index 100% rename from compress.c rename to lib-mx/compress.c diff --git a/compress.h b/lib-mx/compress.h similarity index 100% rename from compress.h rename to lib-mx/compress.h diff --git a/hcache.c b/lib-mx/hcache.c similarity index 100% rename from hcache.c rename to lib-mx/hcache.c diff --git a/hcache.h b/lib-mx/hcache.h similarity index 100% rename from hcache.h rename to lib-mx/hcache.h diff --git a/mbox.c b/lib-mx/mbox.c similarity index 100% rename from mbox.c rename to lib-mx/mbox.c diff --git a/mbox.h b/lib-mx/mbox.h similarity index 100% rename from mbox.h rename to lib-mx/mbox.h diff --git a/mh.c b/lib-mx/mh.c similarity index 100% rename from mh.c rename to lib-mx/mh.c diff --git a/mh.h b/lib-mx/mh.h similarity index 100% rename from mh.h rename to lib-mx/mh.h diff --git a/mx.c b/lib-mx/mx.c similarity index 100% rename from mx.c rename to lib-mx/mx.c diff --git a/mx.h b/lib-mx/mx.h similarity index 100% rename from mx.h rename to lib-mx/mx.h diff --git a/lib-ui/complete.c b/lib-ui/complete.c index ded2862..97f5b2d 100644 --- a/lib-ui/complete.c +++ b/lib-ui/complete.c @@ -8,9 +8,9 @@ */ #include +#include #include "mutt.h" -#include "mx.h" #include "curses.h" #include #ifdef USE_NNTP diff --git a/lib-ui/curs_main.c b/lib-ui/curs_main.c index fdce20e..6e20d66 100644 --- a/lib-ui/curs_main.c +++ b/lib-ui/curs_main.c @@ -13,6 +13,7 @@ #include #include +#include #include @@ -21,11 +22,9 @@ #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" diff --git a/lib-ui/hdrline.c b/lib-ui/hdrline.c index 1b3f10a..883c9cb 100644 --- a/lib-ui/hdrline.c +++ b/lib-ui/hdrline.c @@ -10,8 +10,8 @@ #include #include - #include +#include #include "mutt.h" #include "alias.h" @@ -20,7 +20,6 @@ #include "charset.h" #include #include "mutt_idna.h" -#include "mx.h" int mutt_is_mail_list (address_t * addr) { diff --git a/lib-ui/status.c b/lib-ui/status.c index 28b1329..b19bf24 100644 --- a/lib-ui/status.c +++ b/lib-ui/status.c @@ -11,10 +11,10 @@ #include #include +#include #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 --- a/main.c +++ b/main.c @@ -20,14 +20,12 @@ #include #include - #include - #include +#include #include "mutt.h" #include "alias.h" -#include "mx.h" #include "buffy.h" #include "sort.h" #include diff --git a/muttlib.c b/muttlib.c index caf5fd9..1c8a288 100644 --- a/muttlib.c +++ b/muttlib.c @@ -15,15 +15,13 @@ #include #include - #include #include - #include +#include #include "alias.h" #include "mutt.h" -#include "mx.h" #include "attach.h" #include "version.h" diff --git a/nntp/newsrc.c b/nntp/newsrc.c index 1499ba8..fef72fc 100644 --- a/nntp/newsrc.c +++ b/nntp/newsrc.c @@ -15,10 +15,10 @@ #include #include +#include #include "mutt.h" #include "sort.h" -#include "mx.h" #include "nntp.h" void nntp_add_to_list (NNTP_SERVER * s, NNTP_DATA * d) diff --git a/nntp/nntp.c b/nntp/nntp.c index e24857a..2141454 100644 --- a/nntp/nntp.c +++ b/nntp/nntp.c @@ -14,10 +14,10 @@ #include #include #include +#include #include "mutt.h" #include "sort.h" -#include "mx.h" #include "nntp.h" #include "buffy.h" diff --git a/nntp/nntp.h b/nntp/nntp.h index 90e2bf1..4ce5635 100644 --- a/nntp/nntp.h +++ b/nntp/nntp.h @@ -13,7 +13,7 @@ #define _NNTP_H_ 1 #include -#include "mx.h" +#include extern mx_t const nntp_mx; diff --git a/pager.c b/pager.c index b83eaaf..0c9441f 100644 --- a/pager.c +++ b/pager.c @@ -17,6 +17,7 @@ #include #include #include +#include #include "mutt.h" #include "alias.h" @@ -28,7 +29,6 @@ #include "charset.h" #include "buffy.h" -#include "mx.h" #include @@ -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 #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) diff --git a/pattern.c b/pattern.c index 392a4a6..de4efb4 100644 --- a/pattern.c +++ b/pattern.c @@ -12,11 +12,11 @@ #include #include #include +#include #include "mutt.h" #include "alias.h" #include "handler.h" -#include "mx.h" #include "keymap.h" #include "copy.h" diff --git a/pop/pop.c b/pop/pop.c index a6e1fd8..3f3ee0f 100644 --- a/pop/pop.c +++ b/pop/pop.c @@ -10,9 +10,9 @@ #include #include +#include #include "mutt.h" -#include "mx.h" #include "pop.h" #include diff --git a/pop/pop.h b/pop/pop.h index a6c9049..da52593 100644 --- a/pop/pop.h +++ b/pop/pop.h @@ -12,8 +12,8 @@ #include #include +#include -#include "mx.h" extern mx_t const pop_mx; diff --git a/pop/pop_auth.c b/pop/pop_auth.c index d17d52f..04c1e39 100644 --- a/pop/pop_auth.c +++ b/pop/pop_auth.c @@ -10,9 +10,9 @@ #include #include +#include #include "mutt.h" -#include "mx.h" #include "pop.h" #ifdef USE_SASL diff --git a/pop/pop_lib.c b/pop/pop_lib.c index a96a01c..b3bac5a 100644 --- a/pop/pop_lib.c +++ b/pop/pop_lib.c @@ -8,9 +8,9 @@ */ #include +#include #include "mutt.h" -#include "mx.h" #include "pop.h" #if defined (USE_SSL) || defined (USE_GNUTLS) # include diff --git a/postpone.c b/postpone.c index 7198d53..4f57af2 100644 --- a/postpone.c +++ b/postpone.c @@ -15,6 +15,7 @@ #include #include #include +#include #include @@ -22,7 +23,6 @@ #include "handler.h" #include "sort.h" #include "thread.h" -#include "mx.h" #include #include diff --git a/recvattach.c b/recvattach.c index 97cb41a..760651c 100644 --- a/recvattach.c +++ b/recvattach.c @@ -15,6 +15,7 @@ #include #include #include +#include #include @@ -22,7 +23,6 @@ #include "handler.h" #include "recvattach.h" #include "attach.h" -#include "mx.h" #include "copy.h" #include diff --git a/recvcmd.c b/recvcmd.c index 4e37015..550ec9c 100644 --- a/recvcmd.c +++ b/recvcmd.c @@ -14,6 +14,7 @@ #include #include #include +#include #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 --- a/send.c +++ b/send.c @@ -15,11 +15,11 @@ #include #include #include +#include #include "alias.h" #include "keymap.h" #include "copy.h" -#include "mx.h" #include #include "mutt_idna.h" #include "attach.h" diff --git a/sendlib.c b/sendlib.c index 6f40ea1..cc2562d 100644 --- a/sendlib.c +++ b/sendlib.c @@ -18,13 +18,13 @@ #include #include #include +#include #include #include "mutt.h" #include "handler.h" #include "recvattach.h" -#include "mx.h" #include "copy.h" #include "pager.h" #include "charset.h" -- 2.20.1