From b2a771f96f6344841a78015a591418e5ab6ef608 Mon Sep 17 00:00:00 2001 From: John Dennis Date: Thu, 16 Apr 2009 17:48:13 -0400 Subject: add dynamic hash table data structure implementation Apply suggested fixes by Simo after code review * return statements no longer use () unless it's an expression * remove all use of assert() in library * use bool,true,false instead of int,TRUE,FALSE * add check for NULL hash table in public entry points * example code in header file now a seperate file * assure consistent use of unsigned long data type * add more debugging support * break out generation of integer key into convert_key() function * table parameters now tunable rather than hardcoded * table can now accept custom alloc()/free() functions * add function create_table_ex() to pass extra table parameters * remove MUL(), DIV(), MOD() macros * hash statistics now separate struct which can be queried * test program now accepts tuning parameters, iteration count; has better error checking and reporting fix min/max load factor comman line args in test program --- common/dhash/Makefile.am | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 common/dhash/Makefile.am (limited to 'common/dhash/Makefile.am') diff --git a/common/dhash/Makefile.am b/common/dhash/Makefile.am new file mode 100644 index 00000000..d2b92bce --- /dev/null +++ b/common/dhash/Makefile.am @@ -0,0 +1,15 @@ +AM_CPPFLAGS = -Wall + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = dhash.pc + +lib_LTLIBRARIES = libdhash.la +libdhash_la_SOURCES = dhash.c +pkginclude_HEADERS = dhash.h + +check_PROGRAMS = dhash_test dhash_example +dhash_test_LDADD = dhash.o +dhash_example_LDADD = dhash.o + +examplesdir = $(docdir)/examples +dist_examples_DATA = dhash_test.c dhash_example.c -- cgit