diff --git a/cdb/cdb.h b/cdb/cdb.h deleted file mode 100644 index aeb2316..0000000 --- a/cdb/cdb.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef __CMPH_CDB_H__ -#define __CMPH_CDB_H__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -typedef struct -{ - int fd; - void *data; -} cdb; - -int cdb_init(struct cdb *cdbp, int fd); -void cdb_free(struct cdb *cdbp); -int cdb_read(const struct cdb *cdbp, void *buf, cmph_uint32 len, cmph_uint32 pos); -int cdb_find(const struct cdb *cdbp, const void *key, cmph_uint32 keylen); -int cdb_read(const struct cdb *cdbp, void *buf, cmph_uint32 len, cmph_uint32 pos); - -typedef struct -{ - int fd; - void *data; -} cdb_make; - -int cdb_make_start(struct cdb_make *cdbmp, int fd); -int cdb_make_add(struct cdb_make *cdbmp, const void *key, cmph_uint32 keylen, const void *val, cmph_uint32 vallen); -int cdb_make_exists(struct cdb_make *cdbmp, const void *key, cmph_uint32 klen); -int cdb_make_find(struct cdb_make *cdbmp, const void *key, cmph_uint32 klen, enum cdb_put_mode mode); -int cdb_make_put(struct cdb_make *cdbmp, const void *key, cmph_uint32 klen, const void *val, cmph_uint32 vlen, enum cdb_put_mode mode); -int cdb_make_finish(struct cdb_make *cdbmp); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/cmph.pc.in b/cmph.pc.in index 56589ac..6eb21c3 100644 --- a/cmph.pc.in +++ b/cmph.pc.in @@ -4,7 +4,7 @@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ -Name: alsa +Name: cmph Description: minimal perfect hashing library Version: @VERSION@ Libs: -L${libdir} -lcmph diff --git a/src/cmph.c b/src/cmph.c index 8726bec..cba735f 100644 --- a/src/cmph.c +++ b/src/cmph.c @@ -1,14 +1,14 @@ #include "cmph.h" #include "cmph_structs.h" #include "chm.h" -#include "bmz.h" /* included -- Fabiano */ -#include "bmz8.h" /* included -- Fabiano */ -#include "brz.h" /* included -- Fabiano */ -#include "fch.h" /* included -- Fabiano */ -#include "bdz.h" /* included -- Fabiano */ -#include "bdz_ph.h" /* included -- Fabiano */ -#include "chd_ph.h" /* included -- Fabiano */ -#include "chd.h" /* included -- Fabiano */ +#include "bmz.h" +#include "bmz8.h" +#include "brz.h" +#include "fch.h" +#include "bdz.h" +#include "bdz_ph.h" +#include "chd_ph.h" +#include "chd.h" #include #include @@ -16,7 +16,7 @@ //#define DEBUG #include "debug.h" -const char *cmph_names[] = {"bmz", "bmz8", "chm", "brz", "fch", "bdz", "bdz_ph", "chd_ph", "chd", NULL }; /* included -- Fabiano */ +const char *cmph_names[] = {"bmz", "bmz8", "chm", "brz", "fch", "bdz", "bdz_ph", "chd_ph", "chd", NULL }; typedef struct { diff --git a/src/cmph_types.h b/src/cmph_types.h index fa9c635..40f4332 100644 --- a/src/cmph_types.h +++ b/src/cmph_types.h @@ -35,7 +35,8 @@ typedef unsigned int cmph_uint32; typedef enum { CMPH_HASH_JENKINS, CMPH_HASH_COUNT } CMPH_HASH; extern const char *cmph_hash_names[]; typedef enum { CMPH_BMZ, CMPH_BMZ8, CMPH_CHM, CMPH_BRZ, CMPH_FCH, - CMPH_BDZ, CMPH_BDZ_PH, CMPH_CHD_PH, CMPH_CHD, CMPH_COUNT } CMPH_ALGO; /* included -- Fabiano */ + CMPH_BDZ, CMPH_BDZ_PH, + CMPH_CHD_PH, CMPH_CHD, CMPH_COUNT } CMPH_ALGO; extern const char *cmph_names[]; #endif