From: Pierre Habouzit Date: Sun, 29 Oct 2006 20:13:50 +0000 (+0100) Subject: create a lib-hash.a with sha1 and md5. X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=commitdiff_plain;h=0c12d960399d14b4143b2bb91a96bdaca64e4c56 create a lib-hash.a with sha1 and md5. Signed-off-by: Pierre Habouzit --- diff --git a/Makefile.am b/Makefile.am index fef9893..d07b188 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,7 +19,7 @@ NNTP_SUBDIR = nntp NNTP_INCLUDES = -I$(top_srcdir)/nntp endif -SUBDIRS = intl m4 po lib-lib intl doc contrib lib $(IMAP_SUBDIR) $(POP_SUBDIR) $(NNTP_SUBDIR) +SUBDIRS = intl m4 po lib-lib lib-hash doc contrib lib $(IMAP_SUBDIR) $(POP_SUBDIR) $(NNTP_SUBDIR) bin_SCRIPTS = muttngbug fleang @@ -34,7 +34,7 @@ muttng_SOURCES = $(BUILT_SOURCES) \ flags.c filter.c from.c getdomain.c \ handler.c hcache.c hdrline.c headers.c help.c history.c hook.c \ init.c keymap.c lib.c \ - main.c mbox.c mbyte.c md5c.c menu.c mh.c muttlib.c mutt_idna.c mx.c \ + main.c mbox.c mbyte.c menu.c mh.c muttlib.c mutt_idna.c mx.c \ pager.c parse.c pattern.c postpone.c \ query.c \ recvattach.c recvcmd.c rfc822.c rfc1524.c rfc2047.c rfc2231.c rfc3676.c \ @@ -44,7 +44,7 @@ muttng_SOURCES = $(BUILT_SOURCES) \ wcwidth.c muttng_LDADD = @MUTT_LIB_OBJECTS@ @LIBOBJS@ $(LIBIMAP) $(LIBPOP) $(LIBNNTP) \ - -Llib-lib -llib -Llib -lsane $(MUTTLIBS) $(INTLLIBS) $(LIBICONV) + -Llib-lib -llib -Llib-hash -lhash -Llib -lsane $(MUTTLIBS) $(INTLLIBS) $(LIBICONV) muttng_DEPENDENCIES = @MUTT_LIB_OBJECTS@ @LIBOBJS@ \ $(top_builddir)/lib-lib/liblib.a \ @@ -73,9 +73,9 @@ INCLUDES=-I. -I$(top_srcdir) $(IMAP_INCLUDES) $(POP_INCLUDES) $(NNTP_INCLUDES) $ CPPFLAGS=@CPPFLAGS@ -I$(includedir) EXTRA_muttng_SOURCES = \ - account.c md5c.c mutt_sasl.c mutt_socket.c mutt_ssl.c \ + account.c mutt_sasl.c mutt_socket.c mutt_ssl.c \ mutt_tunnel.c smime.c pgp.c pgpinvoke.c pgpkey.c \ - pgplib.c sha1.c pgpmicalg.c gnupgparse.c resize.c dotlock.c remailer.c \ + pgplib.c pgpmicalg.c gnupgparse.c resize.c dotlock.c remailer.c \ alias.h browser.h enter.h \ mbyte.h remailer.h url.h state.h \ pgppacket.c mutt_idna.h mutt_libesmtp.c \ @@ -85,15 +85,15 @@ EXTRA_muttng_SOURCES = \ EXTRA_DIST = config.rpath COPYRIGHT GPL OPS OPS.PGP OPS.CRYPT OPS.SMIME TODO \ configure acconfig.h \ account.h alias.h attach.h recvattach.h handler.h thread.h \ - buffy.h charset.h compress.h copy.h crypthash.h \ + buffy.h charset.h compress.h copy.h \ dotlock.h functions.h gen_defs \ enter.h recvattach.h handler.h thread.h \ globals.h history.h init.h keymap.h mutt_crypt.h \ - mapping.h md5.h mime.h mutt.h mutt_curses.h mutt_menu.h \ + mapping.h mime.h mutt.h mutt_curses.h mutt_menu.h \ mutt_sasl.h mutt_socket.h mutt_ssl.h mutt_tunnel.h \ mbox.h mh.h mx.h pager.h pgp.h protos.h reldate.h rfc1524.h rfc2047.h \ rfc2231.h rfc822.h rfc3676.h \ - sha1.h sort.h mime.types autogen.sh \ + sort.h mime.types autogen.sh \ _regex.h OPS.MIX remailer.c remailer.h browser.h state.h \ mbyte.h lib.h extlib.c pgpewrap.c smime_keys.pl pgplib.h Muttngrc.head Muttngrc \ makedoc.c stamp-doc-rc README.SSL smime.h\ @@ -105,8 +105,8 @@ muttng_dotlock_SOURCES = dotlock.c muttng_dotlock_LDADD = @LIBOBJS@ muttng_dotlock_DEPENDENCIES = @LIBOBJS@ -pgpringng_SOURCES = pgppubring.c pgplib.c lib.c extlib.c sha1.c md5c.c pgppacket.c -pgpringng_LDADD = @LIBOBJS@ $(INTLLIBS) -Llib-lib -llib -Llib -lsane +pgpringng_SOURCES = pgppubring.c pgplib.c lib.c extlib.c pgppacket.c +pgpringng_LDADD = @LIBOBJS@ $(INTLLIBS) -Llib-lib -llib -Llib-hash -lhash -Llib -lsane pgpringng_DEPENDENCIES = @LIBOBJS@ $(INTLDEPS) pgpewrapng_SOURCES = pgpewrap.c diff --git a/configure.ac b/configure.ac index 44575c3..9a04920 100644 --- a/configure.ac +++ b/configure.ac @@ -1171,6 +1171,7 @@ AC_OUTPUT(Makefile intl/Makefile m4/Makefile po/Makefile.in doc/Makefile contrib/Makefile muttbug.sh lib-lib/Makefile + lib-hash/Makefile lib/Makefile imap/Makefile pop/Makefile diff --git a/hcache.c b/hcache.c index c7e13ba..6cf01e6 100644 --- a/hcache.c +++ b/hcache.c @@ -41,6 +41,7 @@ #endif #include +#include #include "mutt.h" #ifdef USE_IMAP @@ -49,7 +50,6 @@ #include "mime.h" #include "mx.h" #include "lib.h" -#include "md5.h" #include "lib/debug.h" diff --git a/imap/auth_cram.c b/imap/auth_cram.c index 2b8e130..402bd75 100644 --- a/imap/auth_cram.c +++ b/imap/auth_cram.c @@ -17,11 +17,11 @@ #include "imap_private.h" #include "auth.h" -#include "md5.h" #define MD5_BLOCK_LEN 64 #define MD5_DIGEST_LEN 16 #include +#include #include "lib/debug.h" /* forward declarations */ diff --git a/lib-hash/Makefile.am b/lib-hash/Makefile.am new file mode 100644 index 0000000..7a55dee --- /dev/null +++ b/lib-hash/Makefile.am @@ -0,0 +1,7 @@ +noinst_LIBRARIES = libhash.a + +libhash_a_SOURCES = md5.h sha1.h crypthash.h \ + md5.c sha1.c + +noinst_HEADERS = md5.h sha1.h + diff --git a/crypthash.h b/lib-hash/hash.h similarity index 93% rename from crypthash.h rename to lib-hash/hash.h index ab2234e..23e77c8 100644 --- a/crypthash.h +++ b/lib-hash/hash.h @@ -23,4 +23,7 @@ /* POINTER defines a generic pointer type */ typedef unsigned char *POINTER; +#include "sha1.h" +#include "md5.h" + #endif diff --git a/md5c.c b/lib-hash/md5.c similarity index 100% rename from md5c.c rename to lib-hash/md5.c diff --git a/md5.h b/lib-hash/md5.h similarity index 98% rename from md5.h rename to lib-hash/md5.h index b6aa699..9bfe756 100644 --- a/md5.h +++ b/lib-hash/md5.h @@ -26,7 +26,7 @@ documentation and/or software. #ifndef MD5_H #define MD5_H 1 -#include "crypthash.h" +#include "hash.h" /* MD5 context. */ typedef struct { diff --git a/sha1.c b/lib-hash/sha1.c similarity index 100% rename from sha1.c rename to lib-hash/sha1.c diff --git a/sha1.h b/lib-hash/sha1.h similarity index 96% rename from sha1.h rename to lib-hash/sha1.h index 33eebbf..be98e81 100644 --- a/sha1.h +++ b/lib-hash/sha1.h @@ -9,7 +9,7 @@ #ifndef _SHA1_H # define _SHA1_H -#include "crypthash.h" +#include "hash.h" typedef struct { uint32_t state[5]; diff --git a/pgppacket.c b/pgppacket.c index add9945..39ebdf2 100644 --- a/pgppacket.c +++ b/pgppacket.c @@ -18,8 +18,8 @@ #include #include +#include -#include "sha1.h" #include "lib.h" #include "pgplib.h" #include "pgppacket.h" diff --git a/pgppubring.c b/pgppubring.c index 9361204..6d3fc5c 100644 --- a/pgppubring.c +++ b/pgppubring.c @@ -28,6 +28,7 @@ #include #include +#include #include #include @@ -44,8 +45,6 @@ extern int optind; short Umask; /* dirty hack because we need Umask in lib.c but don't want globals.h there */ -#include "sha1.h" -#include "md5.h" #include "lib.h" #include "pgplib.h" #include "pgppacket.h" diff --git a/po/remove-potcdate.sed b/po/remove-potcdate.sed deleted file mode 100644 index edb38d7..0000000 --- a/po/remove-potcdate.sed +++ /dev/null @@ -1,11 +0,0 @@ -/^"POT-Creation-Date: .*"$/{ -x -s/P/P/ -ta -g -d -bb -:a -x -:b -} diff --git a/pop/pop_auth.c b/pop/pop_auth.c index 2e8bd21..9dd2625 100644 --- a/pop/pop_auth.c +++ b/pop/pop_auth.c @@ -14,10 +14,10 @@ #include #include #include +#include #include "mutt.h" #include "mx.h" -#include "md5.h" #include "pop.h" #include "lib/debug.h"