T.I.M | Toolchain Documentation
|
Contains all functions that operate on the asm_hash_table datastructure. More...
#include "asm.h"
Functions | |
void | asm_hash_table_new (int initial_size, asm_hash_table *tr) |
Creates and returns a new pointer to a hash table. More... | |
int | asm_hash_table_expand (asm_hash_table *table, int new_size) |
asm_hash_key | asm_hash_key_string (char *string, int table_size) |
Returns a hash key of a string. More... | |
int | asm_hash_table_insert (asm_hash_table *table, char *key, void *data) |
Inserts an element into the hash table associated with the provided key. More... | |
void * | asm_hash_table_get (asm_hash_table *table, char *strkey) |
Returns a pointer to the data stored in a hash table with the given key or NULL if no such element exists. More... | |
Contains all functions that operate on the asm_hash_table datastructure.
asm_hash_key asm_hash_key_string | ( | char * | string, |
int | table_size | ||
) |
Returns a hash key of a string.
Referenced by asm_hash_table_get(), and asm_hash_table_insert().
int asm_hash_table_expand | ( | asm_hash_table * | table, |
int | new_size | ||
) |
References warning.
void* asm_hash_table_get | ( | asm_hash_table * | table, |
char * | strkey | ||
) |
Returns a pointer to the data stored in a hash table with the given key or NULL if no such element exists.
table | - The table to fetch the data from. |
strkey | - The key to the data to fetch. |
References asm_hash_key_string(), and asm_hash_table::current_size.
Referenced by asm_calculate_addresses().
int asm_hash_table_insert | ( | asm_hash_table * | table, |
char * | key, | ||
void * | data | ||
) |
Inserts an element into the hash table associated with the provided key.
table | - Pointer to the hash table to insert into. |
key | - The key to the data. |
data | - Pointer to the data the table will contain. |
References asm_hash_key_string().
Referenced by asm_parse_label_declaration().
void asm_hash_table_new | ( | int | initial_size, |
asm_hash_table * | tr | ||
) |
Creates and returns a new pointer to a hash table.
initial_size | - The initial size of the hash table's internal data structure. |
tr | - The newly initialised and returned hashtable. Memory space should already be declared. |
Referenced by main().