24 #include <yaz/xmalloc.h>
29 #define DICT_MAGIC "dict01"
31 #define DICT_DEFAULT_PAGESIZE 4096
75 const char **(*grep_cmap)(
void *vp,
const char **from,
int len);
103 #define DICT_type(x) 0[(Dict_ptr*) x]
104 #define DICT_backptr(x) 1[(Dict_ptr*) x]
105 #define DICT_bsize(x) 2[(short*)((char*)(x)+2*sizeof(Dict_ptr))]
106 #define DICT_nodir(x) 0[(short*)((char*)(x)+2*sizeof(Dict_ptr))]
107 #define DICT_size(x) 1[(short*)((char*)(x)+2*sizeof(Dict_ptr))]
108 #define DICT_infoffset (2*sizeof(Dict_ptr)+3*sizeof(short))
109 #define DICT_xxxxpagesize(x) ((x)->head.page_size)
111 #define DICT_to_str(x) sizeof(Dict_info)+sizeof(Dict_ptr)
Dict_BFile dict_bf_open(BFiles bfs, const char *name, int block_size, int cache, int rw)
int dict_strncmp(const Dict_char *s1, const Dict_char *s2, size_t n)
void dict_bf_flush_blocks(Dict_BFile bf, int no_to_flush)
void dict_bf_compact(Dict_BFile dbf)
struct Dict_file_struct * Dict_BFile
int dict_bf_touch(Dict_BFile bf, int no)
int dict_bf_readp(Dict_BFile bf, int no, void **bufp)
int dict_strlen(const Dict_char *s)
int dict_strcmp(const Dict_char *s1, const Dict_char *s2)
int dict_bf_newp(Dict_BFile bf, int no, void **bufp, int nbytes)
int dict_bf_close(Dict_BFile dbf)
struct Dict_file_block ** h_prev
struct Dict_file_block * lru_next
struct Dict_file_block * lru_prev
struct Dict_file_block * h_next
struct Dict_file_block * free_list
struct Dict_file_block * lru_front
struct Dict_file_block * lru_back
struct Dict_file_block ** hash_array
struct Dict_file_block * all_blocks