From ec4ba6435c2402f727799ab05e386504623ef81d Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Fri, 20 Mar 2015 16:11:16 +1000 Subject: [PATCH] * rename type : block_t -> imdb_block_t --- src/database.c | 6 +++--- src/database.h | 6 +++--- src/util.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/database.c b/src/database.c index 452ee7c..d593595 100644 --- a/src/database.c +++ b/src/database.c @@ -132,7 +132,7 @@ int imdb_write_rec(imdb_t *db, imdb_rec_t *rec) return bytes / IMDB_REC_LEN; } -int imdb_read_blk(imdb_t *db, block_t *blk) +int imdb_read_blk(imdb_t *db, imdb_block_t *blk) { ssize_t bytes = 0; @@ -196,7 +196,7 @@ int imdb_search(imdb_t *db, imdb_rec_t *sample, float tresh, imdb_match_t **matc { const int blk_size = 4096; uint64_t found = 0; - block_t blk; + imdb_block_t blk; unsigned int i = 0; unsigned char *p = NULL, *t = NULL; float diff = 0.0; @@ -205,7 +205,7 @@ int imdb_search(imdb_t *db, imdb_rec_t *sample, float tresh, imdb_match_t **matc assert(sample != NULL); assert(matches != NULL); - memset(&blk, 0x0, sizeof(block_t)); + memset(&blk, 0x0, sizeof(imdb_block_t)); blk.start = 1; blk.records = blk_size; diff --git a/src/database.h b/src/database.h index 3011356..b7325d4 100644 --- a/src/database.h +++ b/src/database.h @@ -16,7 +16,7 @@ typedef struct { uint64_t start; size_t records; unsigned char *data; -} block_t; +} imdb_block_t; /** Database header format - fixed length, 48 bytes @@ -74,8 +74,8 @@ extern int imdb_close(imdb_t *db); extern int imdb_read_rec (imdb_t *db, imdb_rec_t *rec); extern int imdb_write_rec(imdb_t *db, imdb_rec_t *rec); -extern int imdb_read_blk (imdb_t *db, block_t *blk); -extern int imdb_write_blk(imdb_t *db, block_t *blk); +extern int imdb_read_blk (imdb_t *db, imdb_block_t *blk); +extern int imdb_write_blk(imdb_t *db, imdb_block_t *blk); extern int imdb_read_list (imdb_t *db, imdb_rec_t *list, size_t list_len); extern int imdb_write_list(imdb_t *db, imdb_rec_t *list, size_t list_len); diff --git a/src/util.c b/src/util.c index 59e31a7..4655d65 100644 --- a/src/util.c +++ b/src/util.c @@ -67,12 +67,12 @@ int db_usage_map(imdb_t *db, unsigned short int cols) unsigned int i, j = 0; unsigned char *p, *t; char buf[256]; - block_t blk; + imdb_block_t blk; assert(db != NULL); assert(cols <= 256); - memset(&blk, 0x0, sizeof(block_t)); + memset(&blk, 0x0, sizeof(imdb_block_t)); memset(buf, 0x0, sizeof(char) * 256); blk.start = 1;