diff --git a/src/database.c b/src/database.c index b1c0f67..a62d7ff 100644 --- a/src/database.c +++ b/src/database.c @@ -183,48 +183,6 @@ int imdb_read_blk(imdb_t *db, imdb_block_t *blk) return blk->records; } -int imdb_read_list(imdb_t *db, imdb_rec_t *list, size_t list_len) -{ - imdb_rec_t *r = NULL; - ssize_t bytes; - unsigned int i = 0; - unsigned int processed = 0; - - assert(db != NULL); - assert(list != NULL); - assert(list_len > 0); - - r = list; - for (i = 0; i < list_len; i++, r++) { - DB_SEEK(db, r->num * IMDB_REC_LEN); - DB_READ(db, r->data, IMDB_REC_LEN); - if (bytes == IMDB_REC_LEN) { processed++; } - } - - return processed; -} - -int imdb_write_list(imdb_t *db, imdb_rec_t *list, size_t list_len) -{ - imdb_rec_t *r = NULL; - ssize_t bytes; - unsigned int i = 0; - unsigned int processed = 0; - - assert(db != NULL); - assert(list != NULL); - assert(list_len > 0); - - r = list; - for (i = 0; i < list_len; i++, r++) { - DB_SEEK(db, r->num * IMDB_REC_LEN); - DB_WRITE(db, r->data, IMDB_REC_LEN); - if (bytes == IMDB_REC_LEN) { processed++; } - } - - return processed; -} - uint64_t imdb_records_count(imdb_t * const db) { struct stat st; diff --git a/src/database.h b/src/database.h index 4cc590d..8a63530 100644 --- a/src/database.h +++ b/src/database.h @@ -98,9 +98,6 @@ extern int imdb_write_rec(imdb_t *db, imdb_rec_t *rec); 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); - extern int imdb_init (imdb_t *db, const char *path); extern int imdb_open (imdb_t *db, const char *path); extern int imdb_close(imdb_t *db);