51 int compact_flag,
int page_size)
65 yaz_log(YLOG_WARN,
"Page size for dict %s %d<2048. Set to 2048",
77 yaz_log(YLOG_WARN,
"Cannot open `%s'", name);
92 yaz_log(YLOG_WARN,
"Bad magic of `%s'", name);
99 yaz_log(YLOG_WARN,
"Page size for existing dict %s is %d. Current is %d",
110 return strcmp((
const char *) s1, (
const char *) s2);
115 return strncmp((
const char *) s1, (
const char *) s2, n);
120 return strlen((
const char *) s);
int dict_bf_close(Dict_BFile dbf)
Dict_BFile dict_bf_open(BFiles bfs, const char *name, int block_size, int cache, int rw)
void dict_bf_compact(Dict_BFile dbf)
int dict_bf_readp(Dict_BFile bf, int no, void **bufp)
#define DICT_DEFAULT_PAGESIZE
int dict_bf_newp(Dict_BFile bf, int no, void **bufp, int nbytes)
struct Dict_struct * Dict
Dictionary handle.
int dict_strncmp(const Dict_char *s1, const Dict_char *s2, size_t n)
zint dict_get_no_split(Dict dict)
get number of page split operations, since dict_open
Dict dict_open(BFiles bfs, const char *name, int cache, int rw, int compact_flag, int page_size)
open dictionary
void dict_clean(Dict dict)
reset Dictionary (makes it empty)
zint dict_get_no_insert(Dict dict)
get number of insert operations, since dict_open
int dict_strlen(const Dict_char *s)
int dict_strcmp(const Dict_char *s1, const Dict_char *s2)
zint dict_get_no_lookup(Dict dict)
get number of lookup operations, since dict_open
const char **(* grep_cmap)(void *vp, const char **from, int len)