14 #ifndef ABC__misc__st__st_h
15 #define ABC__misc__st__st_h
27 # define EXTERN extern
29 # define EXTERN extern "C"
32 # define EXTERN extern
37 #define ARGS(protos) protos
70 #define st__is_member(table,key) st__lookup(table,key,(char **) 0)
71 #define st__count(table) ((table)->num_entries)
94 extern int st__numcmp (
const char *,
const char *);
95 extern int st__ptrcmp (
const char *,
const char *);
102 #define st__DEFAULT_MAX_DENSITY 5
103 #define st__DEFAULT_INIT_TABLE_SIZE 11
104 #define st__DEFAULT_GROW_FACTOR 2.0
105 #define st__DEFAULT_REORDER_FLAG 0
107 #define st__foreach_item(table, gen, key, value) \
108 for(gen= st__init_gen(table); st__gen(gen,key,value) || ( st__free_gen(gen),0);)
110 #define st__foreach_item_int(table, gen, key, value) \
111 for(gen= st__init_gen(table); st__gen_int(gen,key,value) || ( st__free_gen(gen),0);)
113 #define st__OUT_OF_MEM -10000
st__compare_func_type compare
int st__lookup_int(st__table *, char *, int *)
st__table * st__copy(st__table *)
int(* st__hash_func_type)(const char *, int)
int st__gen_int(st__generator *, const char **, long *)
enum st__retval(* st__PFSR)(char *, char *, char *)
int st__ptrhash(const char *, int)
int st__gen(st__generator *, const char **, char **)
st__generator * st__init_gen(st__table *)
int st__strhash(const char *, int)
int st__insert(st__table *, const char *, char *)
int st__find_or_add(st__table *, char *, char ***)
static uint32_t hash(uint32_t x)
void st__free_gen(st__generator *)
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
int st__add_direct(st__table *, char *, char *)
#define ABC_NAMESPACE_HEADER_END
st__table * st__init_table(st__compare_func_type, st__hash_func_type)
int st__delete(st__table *, const char **, char **)
st__table * st__init_table_with_params(st__compare_func_type compare, st__hash_func_type hash, int size, int density, double grow_factor, int reorder_flag)
int st__find(st__table *, char *, char ***)
int st__ptrcmp(const char *, const char *)
int(* st__compare_func_type)(const char *, const char *)
int st__delete_int(st__table *, long *, char **)
int st__numhash(const char *, int)
void st__free_table(st__table *)
int st__lookup(st__table *, const char *, char **)
int st__numcmp(const char *, const char *)
int st__foreach(st__table *, st__PFSR, char *)