create a lib-hash.a with sha1 and md5.
authorPierre Habouzit <madcoder@debian.org>
Sun, 29 Oct 2006 20:13:50 +0000 (21:13 +0100)
committerPierre Habouzit <madcoder@debian.org>
Sun, 29 Oct 2006 20:13:50 +0000 (21:13 +0100)
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
14 files changed:
Makefile.am
configure.ac
hcache.c
imap/auth_cram.c
lib-hash/Makefile.am [new file with mode: 0644]
lib-hash/hash.h [moved from crypthash.h with 93% similarity]
lib-hash/md5.c [moved from md5c.c with 100% similarity]
lib-hash/md5.h [moved from md5.h with 98% similarity]
lib-hash/sha1.c [moved from sha1.c with 100% similarity]
lib-hash/sha1.h [moved from sha1.h with 96% similarity]
pgppacket.c
pgppubring.c
po/remove-potcdate.sed [deleted file]
pop/pop_auth.c

index fef9893..d07b188 100644 (file)
@@ -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
index 44575c3..9a04920 100644 (file)
@@ -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
index c7e13ba..6cf01e6 100644 (file)
--- a/hcache.c
+++ b/hcache.c
@@ -41,6 +41,7 @@
 #endif
 
 #include <lib-lib/mem.h>
+#include <lib-hash/hash.h>
 
 #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"
 
index 2b8e130..402bd75 100644 (file)
 #include "imap_private.h"
 #include "auth.h"
 
-#include "md5.h"
 #define MD5_BLOCK_LEN 64
 #define MD5_DIGEST_LEN 16
 
 #include <lib-lib/macros.h>
+#include <lib-hash/hash.h>
 #include "lib/debug.h"
 
 /* forward declarations */
diff --git a/lib-hash/Makefile.am b/lib-hash/Makefile.am
new file mode 100644 (file)
index 0000000..7a55dee
--- /dev/null
@@ -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
+
similarity index 93%
rename from crypthash.h
rename to lib-hash/hash.h
index ab2234e..23e77c8 100644 (file)
@@ -23,4 +23,7 @@
 /* POINTER defines a generic pointer type */
 typedef unsigned char *POINTER;
 
+#include "sha1.h"
+#include "md5.h"
+
 #endif
similarity index 100%
rename from md5c.c
rename to lib-hash/md5.c
similarity index 98%
rename from md5.h
rename to lib-hash/md5.h
index b6aa699..9bfe756 100644 (file)
--- a/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 {
similarity index 100%
rename from sha1.c
rename to lib-hash/sha1.c
similarity index 96%
rename from sha1.h
rename to lib-hash/sha1.h
index 33eebbf..be98e81 100644 (file)
--- a/sha1.h
@@ -9,7 +9,7 @@
 #ifndef _SHA1_H
 # define _SHA1_H
 
-#include "crypthash.h"
+#include "hash.h"
 
 typedef struct {
   uint32_t state[5];
index add9945..39ebdf2 100644 (file)
@@ -18,8 +18,8 @@
 #include <time.h>
 
 #include <lib-lib/mem.h>
+#include <lib-hash/hash.h>
 
-#include "sha1.h"
 #include "lib.h"
 #include "pgplib.h"
 #include "pgppacket.h"
index 9361204..6d3fc5c 100644 (file)
@@ -28,6 +28,7 @@
 
 #include <lib-lib/mem.h>
 #include <lib-lib/str.h>
+#include <lib-hash/hash.h>
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -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 (file)
index edb38d7..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-/^"POT-Creation-Date: .*"$/{
-x
-s/P/P/
-ta
-g
-d
-bb
-:a
-x
-:b
-}
index 2e8bd21..9dd2625 100644 (file)
 #include <lib-lib/mem.h>
 #include <lib-lib/ascii.h>
 #include <lib-lib/macros.h>
+#include <lib-hash/hash.h>
 
 #include "mutt.h"
 #include "mx.h"
-#include "md5.h"
 #include "pop.h"
 
 #include "lib/debug.h"