|
IDZEBRA 2.2.8
|
Go to the source code of this file.
Functions | |
| static int | dict_ins (Dict dict, const Dict_char *str, Dict_ptr back_ptr, int userlen, void *userinfo) |
| static void | clean_page (Dict dict, Dict_ptr ptr, void *p, Dict_char *out, Dict_ptr subptr, char *userinfo) |
| static void | checkPage (Dict dict, void *p) |
| static Dict_ptr | new_page (Dict dict, Dict_ptr back_ptr, void **pp) |
| static int | split_page (Dict dict, Dict_ptr ptr, void *p) |
| int | dict_insert (Dict dict, const char *str, int userlen, void *userinfo) |
| insert item into dictionary | |
|
static |
Definition at line 233 of file insert.c.
References DICT_bsize, DICT_nodir, and DICT_size.
Referenced by clean_page(), and split_page().
|
static |
Definition at line 147 of file insert.c.
References checkPage(), Dict_struct::dbf, dict, dict_bf_touch(), DICT_bsize, DICT_infoffset, DICT_nodir, DICT_size, dict_strlen(), DICT_type, Dict_struct::head, and Dict_head::page_size.
Referenced by dict_ins(), and split_page().
|
static |
Definition at line 249 of file insert.c.
References clean_page(), Dict_struct::dbf, dict, dict_bf_readp(), dict_bf_touch(), DICT_bsize, DICT_EOS, dict_ins(), DICT_nodir, DICT_size, dict_strcmp(), dict_strlen(), DICT_type, new_page(), and split_page().
Referenced by dict_ins(), dict_insert(), and split_page().
| int dict_insert | ( | Dict | dict, |
| const char * | p, | ||
| int | userlen, | ||
| void * | userinfo | ||
| ) |
insert item into dictionary
| dict | dictionary handle |
| p | string-z with lookup string |
| userlen | length of user data (associated with p) |
| userinfo | userdata (of size userlen) |
| 0 | p is new and inserted OK |
| 1 | p is updated (already exists) and userinfo is modified |
| 2 | p already exists and userinfo is unmodified (same as before) |
| -1 | error |
Definition at line 439 of file insert.c.
References dict, dict_ins(), Dict_struct::head, new_page(), Dict_struct::no_insert, Dict_head::root, and Dict_struct::rw.
Referenced by dict_insert_ord(), dirs_add(), dirs_mkdir(), heap_inpb(), heap_inpc(), heap_inps(), index_block_flush(), main(), and tst().
Definition at line 38 of file insert.c.
References Dict_struct::dbf, dict, DICT_backptr, dict_bf_newp(), dict_bf_readp(), DICT_bsize, DICT_infoffset, DICT_nodir, DICT_size, DICT_type, Dict_head::freelist, Dict_struct::head, Dict_head::last, and Dict_head::page_size.
Referenced by dict_ins(), dict_insert(), and split_page().
Definition at line 64 of file insert.c.
References checkPage(), clean_page(), Dict_struct::dbf, dict, dict_bf_readp(), DICT_bsize, dict_ins(), DICT_nodir, dict_strlen(), new_page(), and Dict_struct::no_split.
Referenced by dict_ins().