IDZEBRA
2.2.7
|
Go to the source code of this file.
Data Structures | |
struct | Dict_head |
struct | Dict_file_block |
struct | Dict_file_struct |
struct | Dict_struct |
Macros | |
#define | DICT_MAGIC "dict01" |
#define | DICT_DEFAULT_PAGESIZE 4096 |
#define | DICT_EOS 0 |
#define | DICT_type(x) 0[(Dict_ptr*) x] |
#define | DICT_backptr(x) 1[(Dict_ptr*) x] |
#define | DICT_bsize(x) 2[(short*)((char*)(x)+2*sizeof(Dict_ptr))] |
#define | DICT_nodir(x) 0[(short*)((char*)(x)+2*sizeof(Dict_ptr))] |
#define | DICT_size(x) 1[(short*)((char*)(x)+2*sizeof(Dict_ptr))] |
#define | DICT_infoffset (2*sizeof(Dict_ptr)+3*sizeof(short)) |
#define | DICT_xxxxpagesize(x) ((x)->head.page_size) |
#define | DICT_to_str(x) sizeof(Dict_info)+sizeof(Dict_ptr) |
Typedefs | |
typedef unsigned char | Dict_char |
typedef unsigned | Dict_ptr |
typedef struct Dict_file_struct * | Dict_BFile |
Functions | |
int | dict_bf_readp (Dict_BFile bf, int no, void **bufp) |
int | dict_bf_newp (Dict_BFile bf, int no, void **bufp, int nbytes) |
int | dict_bf_touch (Dict_BFile bf, int no) |
void | dict_bf_flush_blocks (Dict_BFile bf, int no_to_flush) |
Dict_BFile | dict_bf_open (BFiles bfs, const char *name, int block_size, int cache, int rw) |
int | dict_bf_close (Dict_BFile dbf) |
void | dict_bf_compact (Dict_BFile dbf) |
int | dict_strcmp (const Dict_char *s1, const Dict_char *s2) |
int | dict_strncmp (const Dict_char *s1, const Dict_char *s2, size_t n) |
int | dict_strlen (const Dict_char *s) |
#define DICT_bsize | ( | x | ) | 2[(short*)((char*)(x)+2*sizeof(Dict_ptr))] |
#define DICT_infoffset (2*sizeof(Dict_ptr)+3*sizeof(short)) |
#define DICT_nodir | ( | x | ) | 0[(short*)((char*)(x)+2*sizeof(Dict_ptr))] |
#define DICT_size | ( | x | ) | 1[(short*)((char*)(x)+2*sizeof(Dict_ptr))] |
#define DICT_to_str | ( | x | ) | sizeof(Dict_info)+sizeof(Dict_ptr) |
typedef struct Dict_file_struct * Dict_BFile |
int dict_bf_close | ( | Dict_BFile | dbf | ) |
Definition at line 32 of file dclose.c.
References Dict_file_struct::all_blocks, Dict_file_struct::all_data, Dict_file_struct::bf, bf_close(), dict_bf_flush_blocks(), and Dict_file_struct::hash_array.
Referenced by dict_close(), and dict_open().
void dict_bf_compact | ( | Dict_BFile | dbf | ) |
Definition at line 91 of file dopen.c.
References Dict_file_struct::compact_flag.
Referenced by dict_open().
void dict_bf_flush_blocks | ( | Dict_BFile | bf, |
int | no_to_flush | ||
) |
Definition at line 82 of file drdwr.c.
References Dict_file_struct::bf, bf_write(), Dict_file_struct::block_size, Dict_file_struct::compact_flag, Dict_file_block::data, Dict_file_block::dirty, Dict_file_struct::lru_back, Dict_file_block::nbytes, Dict_file_block::no, and release_block().
Referenced by alloc_block(), and dict_bf_close().
int dict_bf_newp | ( | Dict_BFile | bf, |
int | no, | ||
void ** | bufp, | ||
int | nbytes | ||
) |
Definition at line 226 of file drdwr.c.
References alloc_block(), Dict_file_struct::block_size, Dict_file_block::data, dict_pr_lru(), Dict_file_block::dirty, find_block(), move_to_front(), Dict_file_block::nbytes, and Dict_file_block::no.
Referenced by dict_clean(), dict_copy_compact(), and new_page().
Dict_BFile dict_bf_open | ( | BFiles | bfs, |
const char * | name, | ||
int | block_size, | ||
int | cache, | ||
int | rw | ||
) |
Definition at line 75 of file dopen.c.
References Dict_file_struct::bf, bf_open(), and common_init().
Referenced by dict_open().
int dict_bf_readp | ( | Dict_BFile | bf, |
int | no, | ||
void ** | bufp | ||
) |
Definition at line 188 of file drdwr.c.
References alloc_block(), Dict_file_struct::bf, bf_read(), Dict_file_struct::block_size, Dict_file_struct::compact_flag, Dict_file_block::data, find_block(), Dict_file_struct::hits, Dict_file_struct::misses, move_to_front(), Dict_file_block::no, and release_block().
Referenced by dict_close(), dict_copy_compact(), dict_del_string(), dict_del_subtree(), dict_ins(), dict_look(), dict_open(), dict_scan_r(), grep(), lookup_ec(), new_page(), scan_direction(), and split_page().
int dict_bf_touch | ( | Dict_BFile | bf, |
int | no | ||
) |
Definition at line 244 of file drdwr.c.
References Dict_file_block::dirty, find_block(), and Dict_file_block::no.
Referenced by clean_page(), dict_close(), dict_del_string(), dict_del_subtree(), and dict_ins().
Definition at line 108 of file open.c.
Referenced by dict_del_string(), dict_ins(), dict_look(), and dict_scan_r().
int dict_strlen | ( | const Dict_char * | s | ) |
Definition at line 118 of file open.c.
Referenced by clean_page(), dict_copy_page(), dict_del_string(), dict_del_subtree(), dict_ins(), dict_look(), dict_lookup_ec(), dict_scan_r(), prepare_match(), and split_page().
Definition at line 113 of file open.c.
Referenced by dict_del_string().