Tachyon (current)
Current Main Branch
|
Go to the source code of this file.
Data Structures | |
struct | rt_hash_t |
Macros | |
#define | HASH_FAIL -1 |
Return code when a hash key is not find, or there's no collision upon insertion. More... | |
Typedefs | |
typedef struct rt_hash_t | rt_hash_t |
Functions | |
void | rt_hash_init (rt_hash_t *, int) |
int | rt_hash_lookup (rt_hash_t *, const char *) |
int | rt_hash_insert (rt_hash_t *, const char *, int) |
int | rt_hash_delete (rt_hash_t *, const char *) |
void | rt_hash_destroy (rt_hash_t *) |
char * | rt_hash_stats (rt_hash_t *) |
#define HASH_FAIL -1 |
Return code when a hash key is not find, or there's no collision upon insertion.
Definition at line 30 of file hash.h.
Referenced by find_texture(), rt_hash_delete(), rt_hash_insert(), and rt_hash_lookup().
int rt_hash_delete | ( | rt_hash_t * | , |
const char * | |||
) |
Definition at line 177 of file hash.c.
References rt_hash_t::bucket, hash_node_t::data, hash(), HASH_FAIL, hash_node_t::key, and hash_node_t::next.
void rt_hash_destroy | ( | rt_hash_t * | ) |
Definition at line 218 of file hash.c.
References rt_hash_t::bucket, hash_node_t::next, and rt_hash_t::size.
Referenced by free_tex_table().
void rt_hash_init | ( | rt_hash_t * | , |
int | |||
) |
Definition at line 87 of file hash.c.
References rt_hash_t::bucket, rt_hash_t::downshift, rt_hash_t::entries, rt_hash_t::mask, and rt_hash_t::size.
Referenced by rebuild_table(), and reset_tex_table().
int rt_hash_insert | ( | rt_hash_t * | , |
const char * | , | ||
int | |||
) |
Definition at line 144 of file hash.c.
References rt_hash_t::bucket, hash_node_t::data, rt_hash_t::entries, hash(), HASH_FAIL, HASH_LIMIT, hash_node_t::key, hash_node_t::next, rebuild_table(), rt_hash_lookup(), and rt_hash_t::size.
Referenced by add_texture().
int rt_hash_lookup | ( | rt_hash_t * | , |
const char * | |||
) |
Definition at line 119 of file hash.c.
References rt_hash_t::bucket, hash_node_t::data, hash(), HASH_FAIL, hash_node_t::key, and hash_node_t::next.
Referenced by find_texture(), and rt_hash_insert().
char* rt_hash_stats | ( | rt_hash_t * | ) |
Definition at line 264 of file hash.c.
References alos(), rt_hash_t::entries, and rt_hash_t::size.