#ifndef CLUSTER_H_ #define CLUSTER_H_ #include #include "b-tree.h" struct cluster_table { struct b_tree t_base; FILE *t_storage; }; struct cluster { unsigned long c_id; size_t c_base; size_t c_len; unsigned long c_checksum; unsigned int c_flags; }; extern void cluster_table_init(struct cluster_table *table, FILE *storage); extern void cluster_table_finish(struct cluster_table *table); extern int cluster_table_get(struct cluster_table *table, unsigned long id, struct cluster *out); extern int cluster_table_put(struct cluster_table *table, const struct cluster *in); #endif