31 #include <yaz/yconfig.h>
54 int compact_flag,
int page_size);
109 int (*f)(
const char *info,
void *client));
144 int (*f)(
char *name,
const char *info,
void *client));
162 int *before,
int *after,
void *client,
163 int (*f)(
char *name,
const char *info,
int pos,
void *client));
176 const char **(*cmap)(
void *vp,
177 const char **from,
int len));
static void init_pos(struct DFA_parse *parse_info)
struct Dict_struct * Dict
Dictionary handle.
char * dict_lookup(Dict dict, const char *p)
lookup item in dictionary
zint dict_get_no_split(Dict dict)
get number of page split operations, since dict_open
int dict_delete(Dict dict, const char *p)
deletes item from dictionary
int dict_lookup_ec(Dict dict, char *p, int range, int(*f)(char *name))
lookup item(s) in dictionary with error correction
void dict_grep_cmap(Dict dict, void *vp, const char **(*cmap)(void *vp, const char **from, int len))
install character mapping handler for dict_lookup_grep
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
zint dict_get_no_lookup(Dict dict)
get number of lookup operations, since dict_open
int dict_lookup_grep(Dict dict, const char *p, int range, void *client, int *max_pos, int init_pos, int(*f)(char *name, const char *info, void *client))
regular expression search with error correction
int dict_delete_subtree(Dict dict, const char *p, void *client, int(*f)(const char *info, void *client))
delete items with a given prefix from dictionary
int dict_insert(Dict dict, const char *p, int userlen, void *userinfo)
insert item into dictionary
int dict_copy_compact(BFiles bfs, const char *from, const char *to)
copies one dictionary to another
int dict_scan(Dict dict, char *str, int *before, int *after, void *client, int(*f)(char *name, const char *info, int pos, void *client))
dictionary scan
int dict_close(Dict dict)
closes dictionary