Move simple hashes under separate subdirectory.
authorMarko Kreen <[email protected]>
Sat, 22 Dec 2012 22:47:44 +0000 (00:47 +0200)
committerMarko Kreen <[email protected]>
Thu, 3 Jan 2013 21:56:28 +0000 (23:56 +0200)
There may be more of them.

Makefile
test/compile.c
test/test_hashing.c
usual/hashing/crc32.c [moved from usual/crc32.c with 99% similarity]
usual/hashing/crc32.h [moved from usual/crc32.h with 93% similarity]
usual/hashing/lookup3.c [moved from usual/lookup3.c with 97% similarity]
usual/hashing/lookup3.h [moved from usual/lookup3.h with 74% similarity]

index 737e5d26951e2b0cdc22368983a09123c3aa3ce3..54f98245b42788b56c863385e24a7c35cc33f0de 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,6 @@ libusual_la_SOURCES = usual/config.h.in \
        usual/bits.h \
        usual/cbtree.h usual/cbtree.c \
        usual/cfparser.h usual/cfparser.c \
-       usual/crc32.h usual/crc32.c \
        usual/crypto/digest.h usual/crypto/digest.c \
        usual/crypto/hmac.h usual/crypto/hmac.c \
        usual/crypto/keccak.h usual/crypto/keccak.c \
@@ -34,11 +33,12 @@ libusual_la_SOURCES = usual/config.h.in \
        usual/event.h usual/event.c \
        usual/fileutil.h usual/fileutil.c \
        usual/getopt.h usual/getopt.c \
+       usual/hashing/crc32.h usual/hashing/crc32.c \
+       usual/hashing/lookup3.h usual/hashing/lookup3.c \
        usual/hashtab-impl.h \
        usual/heap.h usual/heap.c \
        usual/list.h usual/list.c \
        usual/logging.h usual/logging.c \
-       usual/lookup3.h usual/lookup3.c \
        usual/mbuf.h usual/mbuf.c \
        usual/mdict.h usual/mdict.c \
        usual/mempool.h usual/mempool.c \
index ac1c76bac8809bd477c370f9b785124bac700433..97526fef433764703a1fbe91524db2f5a40b315f 100644 (file)
@@ -2,7 +2,7 @@
 #include <usual/base.h>
 #include <usual/cbtree.h>
 #include <usual/cfparser.h>
-#include <usual/crc32.h>
+#include <usual/hashing/crc32.h>
 #include <usual/daemon.h>
 #include <usual/endian.h>
 #include <usual/err.h>
@@ -12,7 +12,7 @@
 #include <usual/heap.h>
 #include <usual/list.h>
 #include <usual/logging.h>
-#include <usual/lookup3.h>
+#include <usual/hashing/lookup3.h>
 #include <usual/mbuf.h>
 #include <usual/crypto/md5.h>
 #include <usual/misc.h>
index f4ef012c7c017c725692390c40d592515cc281a2..b3c190fdd80a301d70f5bd93f982dafebef50163 100644 (file)
@@ -1,5 +1,5 @@
-#include <usual/crc32.h>
-#include <usual/lookup3.h>
+#include <usual/hashing/crc32.h>
+#include <usual/hashing/lookup3.h>
 
 #include <usual/string.h>
 
similarity index 99%
rename from usual/crc32.c
rename to usual/hashing/crc32.c
index f4f5441bf4b5ef746122eb05272f6204a9f29ab6..ec2dd06917720c1df5231e2a4b5deea8481e87c2 100644 (file)
@@ -17,7 +17,7 @@
  */
 
 
-#include <usual/crc32.h>
+#include <usual/hashing/crc32.h>
 
 static const uint32_t crc_tab[256] = {
 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
similarity index 93%
rename from usual/crc32.h
rename to usual/hashing/crc32.h
index c07e87ab17499a984e1a42f96c07cb40b005a8c5..3744b6984ec76fa8de5bb26c58a3256474710d2f 100644 (file)
@@ -19,8 +19,8 @@
  *
  * CRC32 checksum.
  */
-#ifndef _USUAL_CRC32_H_
-#define _USUAL_CRC32_H_
+#ifndef _USUAL_HASHING_CRC32_H_
+#define _USUAL_HASHING_CRC32_H_
 
 #include <usual/base.h>
 
similarity index 97%
rename from usual/lookup3.c
rename to usual/hashing/lookup3.c
index 93ed2541686ce8639791a70f49fd493af55819a4..a28e6746b6cdc3b36c48503ee5f17a8e8f8b9387 100644 (file)
@@ -8,7 +8,7 @@
  * Compact version of Bob Jenkins' lookup3.c hash.
  */
 
-#include <usual/lookup3.h>
+#include <usual/hashing/lookup3.h>
 
 #include <string.h>
 
similarity index 74%
rename from usual/lookup3.h
rename to usual/hashing/lookup3.h
index 8b66fe61fcf2e7c019412eda436cf6b284c43bb3..33e227fe00a1813f3106b59a8aecbe38328fdff2 100644 (file)
@@ -3,8 +3,8 @@
  *
  * Jenkins' lookup3 non-cryptographic hash.
  */
-#ifndef _USUAL_LOOKUP3_H_
-#define _USUAL_LOOKUP3_H_
+#ifndef _USUAL_HASHING_LOOKUP3_H_
+#define _USUAL_HASHING_LOOKUP3_H_
 
 #include <usual/base.h>