abc-master
|
Go to the source code of this file.
Macros | |
#define | STMM_NUMCMP(x, y) ((x) != (y)) |
#define | STMM_NUMHASH(x, size) (Abc_AbsInt((long)x)%(size)) |
#define | STMM_PTRHASH(x, size) ((int)(((ABC_PTRUINT_T)(x)>>2)%size)) |
#define | EQUAL(func, x, y) |
#define | do_hash(key, table) |
#define | PTR_NOT_EQUAL(table, ptr, user_key) (ptr != NULL && !EQUAL(table->compare, user_key, (ptr)->key)) |
#define | FIND_ENTRY(table, hash_val, key, ptr, last) |
#define | ADD_DIRECT(table, key, value, hash_val, new) |
Functions | |
static int | rehash (stmm_table *table) |
stmm_table * | stmm_init_table_with_params (stmm_compare_func_type compare, stmm_hash_func_type hash, int size, int density, double grow_factor, int reorder_flag) |
stmm_table * | stmm_init_table (stmm_compare_func_type compare, stmm_hash_func_type hash) |
void | stmm_free_table (stmm_table *table) |
void | stmm_clean (stmm_table *table) |
int | stmm_lookup (stmm_table *table, char *key, char **value) |
int | stmm_lookup_int (stmm_table *table, char *key, int *value) |
int | stmm_insert (stmm_table *table, char *key, char *value) |
int | stmm_add_direct (stmm_table *table, char *key, char *value) |
int | stmm_find_or_add (stmm_table *table, char *key, char ***slot) |
int | stmm_find (stmm_table *table, char *key, char ***slot) |
stmm_table * | stmm_copy (stmm_table *old_table) |
int | stmm_delete (stmm_table *table, char **keyp, char **value) |
int | stmm_delete_int (stmm_table *table, long *keyp, char **value) |
int | stmm_foreach (stmm_table *table, enum stmm_retval(*func)(char *, char *, char *), char *arg) |
int | stmm_strhash (const char *string, int modulus) |
int | stmm_numhash (const char *x, int size) |
int | stmm_ptrhash (const char *x, int size) |
int | stmm_numcmp (const char *x, const char *y) |
int | stmm_ptrcmp (const char *x, const char *y) |
stmm_generator * | stmm_init_gen (stmm_table *table) |
int | stmm_gen (stmm_generator *gen, char **key_p, char **value_p) |
int | stmm_gen_int (stmm_generator *gen, char **key_p, long *value_p) |
void | stmm_free_gen (stmm_generator *gen) |
#define EQUAL | ( | func, | |
x, | |||
y | |||
) |
#define FIND_ENTRY | ( | table, | |
hash_val, | |||
key, | |||
ptr, | |||
last | |||
) |
#define STMM_NUMHASH | ( | x, | |
size | |||
) | (Abc_AbsInt((long)x)%(size)) |
|
static |
int stmm_add_direct | ( | stmm_table * | table, |
char * | key, | ||
char * | value | ||
) |
Definition at line 238 of file stmm.c.
void stmm_clean | ( | stmm_table * | table | ) |
Definition at line 105 of file stmm.c.
stmm_table* stmm_copy | ( | stmm_table * | old_table | ) |
Definition at line 374 of file stmm.c.
int stmm_delete | ( | stmm_table * | table, |
char ** | keyp, | ||
char ** | value | ||
) |
Definition at line 430 of file stmm.c.
int stmm_delete_int | ( | stmm_table * | table, |
long * | keyp, | ||
char ** | value | ||
) |
Definition at line 456 of file stmm.c.
int stmm_find | ( | stmm_table * | table, |
char * | key, | ||
char *** | slot | ||
) |
int stmm_find_or_add | ( | stmm_table * | table, |
char * | key, | ||
char *** | slot | ||
) |
Definition at line 266 of file stmm.c.
int stmm_foreach | ( | stmm_table * | table, |
enum stmm_retval(*)(char *, char *, char *) | func, | ||
char * | arg | ||
) |
Definition at line 482 of file stmm.c.
void stmm_free_gen | ( | stmm_generator * | gen | ) |
void stmm_free_table | ( | stmm_table * | table | ) |
Definition at line 79 of file stmm.c.
int stmm_gen | ( | stmm_generator * | gen, |
char ** | key_p, | ||
char ** | value_p | ||
) |
int stmm_gen_int | ( | stmm_generator * | gen, |
char ** | key_p, | ||
long * | value_p | ||
) |
stmm_generator* stmm_init_gen | ( | stmm_table * | table | ) |
stmm_table* stmm_init_table | ( | stmm_compare_func_type | compare, |
stmm_hash_func_type | hash | ||
) |
stmm_table* stmm_init_table_with_params | ( | stmm_compare_func_type | compare, |
stmm_hash_func_type | hash, | ||
int | size, | ||
int | density, | ||
double | grow_factor, | ||
int | reorder_flag | ||
) |
Definition at line 35 of file stmm.c.
int stmm_insert | ( | stmm_table * | table, |
char * | key, | ||
char * | value | ||
) |
Definition at line 200 of file stmm.c.
int stmm_lookup | ( | stmm_table * | table, |
char * | key, | ||
char ** | value | ||
) |
int stmm_lookup_int | ( | stmm_table * | table, |
char * | key, | ||
int * | value | ||
) |