IDZEBRA
2.2.7
|
#include <stddef.h>
#include <string.h>
#include <zebra_strmap.h>
#include <yaz/nmem.h>
#include <yaz/xmalloc.h>
Go to the source code of this file.
Data Structures | |
struct | strmap_entry |
struct | zebra_strmap |
struct | zebra_strmap_it_s |
Functions | |
zebra_strmap_t | zebra_strmap_create (void) |
void | zebra_strmap_destroy (zebra_strmap_t st) |
static struct strmap_entry ** | hash (zebra_strmap_t st, const char *name) |
void | zebra_strmap_add (zebra_strmap_t st, const char *name, void *data_buf, size_t data_len) |
void * | zebra_strmap_lookup (zebra_strmap_t st, const char *name, int no, size_t *data_len) |
int | zebra_strmap_remove (zebra_strmap_t st, const char *name) |
int | zebra_strmap_get_size (zebra_strmap_t st) |
zebra_strmap_it | zebra_strmap_it_create (zebra_strmap_t st) |
void | zebra_strmap_it_destroy (zebra_strmap_it it) |
const char * | zebra_strmap_it_next (zebra_strmap_it it, void **data_buf, size_t *data_len) |
|
static |
Definition at line 70 of file strmap.c.
References zebra_strmap::entries, zebra_strmap::hsize, and strmap_entry::name.
Referenced by init_DFA_states(), zebra_strmap_add(), zebra_strmap_lookup(), and zebra_strmap_remove().
void zebra_strmap_add | ( | zebra_strmap_t | st, |
const char * | name, | ||
void * | data_buf, | ||
size_t | data_len | ||
) |
Definition at line 80 of file strmap.c.
References strmap_entry::data_buf, strmap_entry::data_len, zebra_strmap::free_entries, hash(), strmap_entry::name, strmap_entry::next, zebra_strmap::nmem_ent, zebra_strmap::nmem_str, and zebra_strmap::size.
Referenced by perform_facet_index(), perform_facet_sort(), test1(), and test2().
zebra_strmap_t zebra_strmap_create | ( | void | ) |
Definition at line 45 of file strmap.c.
References zebra_strmap::entries, zebra_strmap::free_entries, zebra_strmap::hsize, zebra_strmap::nmem_ent, zebra_strmap::nmem_str, and zebra_strmap::size.
Referenced by perform_facet(), test1(), and test2().
void zebra_strmap_destroy | ( | zebra_strmap_t | st | ) |
Definition at line 61 of file strmap.c.
References zebra_strmap::nmem_ent, and zebra_strmap::nmem_str.
Referenced by perform_facet(), test1(), and test2().
int zebra_strmap_get_size | ( | zebra_strmap_t | st | ) |
Definition at line 136 of file strmap.c.
References zebra_strmap::size.
zebra_strmap_it zebra_strmap_it_create | ( | zebra_strmap_t | st | ) |
Definition at line 148 of file strmap.c.
References zebra_strmap_it_s::ent, zebra_strmap_it_s::hno, and zebra_strmap_it_s::st.
Referenced by term_collect_create(), and test1().
void zebra_strmap_it_destroy | ( | zebra_strmap_it | it | ) |
Definition at line 157 of file strmap.c.
Referenced by term_collect_create(), and test1().
const char* zebra_strmap_it_next | ( | zebra_strmap_it | it, |
void ** | data_buf, | ||
size_t * | data_len | ||
) |
Definition at line 162 of file strmap.c.
References strmap_entry::data_buf, strmap_entry::data_len, ent, zebra_strmap_it_s::ent, zebra_strmap::entries, zebra_strmap_it_s::hno, zebra_strmap::hsize, record_index_entry::next, and zebra_strmap_it_s::st.
Referenced by term_collect_create(), and test1().
void* zebra_strmap_lookup | ( | zebra_strmap_t | st, |
const char * | name, | ||
int | no, | ||
size_t * | data_len | ||
) |
Definition at line 99 of file strmap.c.
References strmap_entry::data_buf, strmap_entry::data_len, hash(), strmap_entry::name, and strmap_entry::next.
Referenced by perform_facet_index(), perform_facet_sort(), test1(), and test2().
int zebra_strmap_remove | ( | zebra_strmap_t | st, |
const char * | name | ||
) |
Definition at line 118 of file strmap.c.
References zebra_strmap::free_entries, hash(), strmap_entry::name, strmap_entry::next, and zebra_strmap::size.
Referenced by test1().