82 static const char *dict_default_lookup(
DICT *dict,
const char *unused_key)
84 msg_fatal(
"table %s:%s: lookup operation is not supported",
90 static int dict_default_update(
DICT *dict,
const char *unused_key,
91 const char *unused_value)
93 msg_fatal(
"table %s:%s: update operation is not supported",
99 static int dict_default_delete(
DICT *dict,
const char *unused_key)
101 msg_fatal(
"table %s:%s: delete operation is not supported",
107 static int dict_default_sequence(
DICT *dict,
int unused_function,
108 const char **unused_key,
const char **unused_value)
110 msg_fatal(
"table %s:%s: sequence operation is not supported",
116 static int dict_default_lock(
DICT *dict,
int operation)
127 static void dict_default_close(
DICT *dict)
129 msg_fatal(
"table %s:%s: close operation is not supported",
142 dict->
lookup = dict_default_lookup;
143 dict->
update = dict_default_update;
144 dict->
delete = dict_default_delete;
145 dict->
sequence = dict_default_sequence;
146 dict->
close = dict_default_close;
147 dict->
lock = dict_default_lock;
char * mystrdup(const char *str)
void(* close)(struct DICT *)
int(* delete)(struct DICT *, const char *)
int(* lock)(struct DICT *, int)
int(* update)(struct DICT *, const char *, const char *)
void dict_free(DICT *dict)
#define DICT_OWNER_UNKNOWN
int myflock(int fd, int lock_style, int operation)
const char *(* lookup)(struct DICT *, const char *)
NORETURN msg_fatal(const char *fmt,...)
void dict_jmp_alloc(DICT *dict)
struct DICT_UTF8_BACKUP * utf8_backup
int(* sequence)(struct DICT *, int, const char **, const char **)
void * mymalloc(ssize_t len)
DICT * dict_alloc(const char *dict_type, const char *dict_name, ssize_t size)