Tachyon (current)
Current Main Branch
|
Go to the source code of this file.
Data Structures | |
struct | hash_node_t |
Macros | |
#define | HASH_LIMIT 0.5 |
Typedefs | |
typedef struct hash_node_t | hash_node_t |
Functions | |
static int | hash (rt_hash_t *tptr, const char *key) |
static void | rebuild_table (rt_hash_t *tptr) |
void | rt_hash_init (rt_hash_t *tptr, int buckets) |
int | rt_hash_lookup (rt_hash_t *tptr, const char *key) |
int | rt_hash_insert (rt_hash_t *tptr, const char *key, int data) |
int | rt_hash_delete (rt_hash_t *tptr, const char *key) |
void | rt_hash_destroy (rt_hash_t *tptr) |
static float | alos (rt_hash_t *tptr) |
char * | rt_hash_stats (rt_hash_t *tptr) |
#define HASH_LIMIT 0.5 |
Definition at line 17 of file hash.c.
Referenced by rt_hash_insert().
typedef struct hash_node_t hash_node_t |
|
static |
Definition at line 243 of file hash.c.
References rt_hash_t::bucket, rt_hash_t::entries, hash_node_t::next, and rt_hash_t::size.
Referenced by rt_hash_stats().
|
static |
Definition at line 34 of file hash.c.
References rt_hash_t::downshift, hash_node_t::key, and rt_hash_t::mask.
Referenced by rebuild_table(), rt_hash_delete(), rt_hash_insert(), and rt_hash_lookup().
|
static |
Definition at line 54 of file hash.c.
References rt_hash_t::bucket, rt_hash_t::entries, hash(), hash_node_t::key, hash_node_t::next, rt_hash_init(), and rt_hash_t::size.
Referenced by rt_hash_insert().
int rt_hash_delete | ( | rt_hash_t * | tptr, |
const char * | key | ||
) |
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 * | tptr | ) |
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 * | tptr, |
int | buckets | ||
) |
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 * | tptr, |
const char * | key, | ||
int | data | ||
) |
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 * | tptr, |
const char * | key | ||
) |
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 * | tptr | ) |
Definition at line 264 of file hash.c.
References alos(), rt_hash_t::entries, and rt_hash_t::size.