From cafeb9ce31b9764eb8d1332c70f778842a4af416 Mon Sep 17 00:00:00 2001 From: Marko Kreen Date: Sun, 23 Dec 2012 00:47:44 +0200 Subject: [PATCH] Move simple hashes under separate subdirectory. There may be more of them. --- Makefile | 4 ++-- test/compile.c | 4 ++-- test/test_hashing.c | 4 ++-- usual/{ => hashing}/crc32.c | 2 +- usual/{ => hashing}/crc32.h | 4 ++-- usual/{ => hashing}/lookup3.c | 2 +- usual/{ => hashing}/lookup3.h | 4 ++-- 7 files changed, 12 insertions(+), 12 deletions(-) rename usual/{ => hashing}/crc32.c (99%) rename usual/{ => hashing}/crc32.h (93%) rename usual/{ => hashing}/lookup3.c (97%) rename usual/{ => hashing}/lookup3.h (74%) diff --git a/Makefile b/Makefile index 737e5d2..54f9824 100644 --- 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 \ diff --git a/test/compile.c b/test/compile.c index ac1c76b..97526fe 100644 --- a/test/compile.c +++ b/test/compile.c @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include #include #include @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/test_hashing.c b/test/test_hashing.c index f4ef012..b3c190f 100644 --- a/test/test_hashing.c +++ b/test/test_hashing.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include diff --git a/usual/crc32.c b/usual/hashing/crc32.c similarity index 99% rename from usual/crc32.c rename to usual/hashing/crc32.c index f4f5441..ec2dd06 100644 --- a/usual/crc32.c +++ b/usual/hashing/crc32.c @@ -17,7 +17,7 @@ */ -#include +#include static const uint32_t crc_tab[256] = { 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, diff --git a/usual/crc32.h b/usual/hashing/crc32.h similarity index 93% rename from usual/crc32.h rename to usual/hashing/crc32.h index c07e87a..3744b69 100644 --- a/usual/crc32.h +++ b/usual/hashing/crc32.h @@ -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 diff --git a/usual/lookup3.c b/usual/hashing/lookup3.c similarity index 97% rename from usual/lookup3.c rename to usual/hashing/lookup3.c index 93ed254..a28e674 100644 --- a/usual/lookup3.c +++ b/usual/hashing/lookup3.c @@ -8,7 +8,7 @@ * Compact version of Bob Jenkins' lookup3.c hash. */ -#include +#include #include diff --git a/usual/lookup3.h b/usual/hashing/lookup3.h similarity index 74% rename from usual/lookup3.h rename to usual/hashing/lookup3.h index 8b66fe6..33e227f 100644 --- a/usual/lookup3.h +++ b/usual/hashing/lookup3.h @@ -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 -- 2.39.5