Go to the source code of this file.
Data Structures | |
struct | couple |
Type of the elements strored into the hash table. More... | |
Defines | |
#define | INIT_DYNAMIC_STRING 100 |
Initial size for a dynamic string. | |
#define | HASH_TABLE_ENTRIES 150 |
Number of linked lists for the hash tables used to store the couples (tags, values). | |
Functions | |
int | hash_function (const void *key) |
Hash function used by the hash table to hash the tags. | |
void | free_user_data (void *d) |
Function used to free memory allocated for the elements of the hash table. | |
int | compare_user_data (const void *d1, const void *d2) |
Function used to compare two elements of the hash table (two tags). | |
char * | replace_tags (char *text, char **tags, char **values, int nb_tags) |
Replace tags by their values in a text. | |
Variables | |
char ** | txt_tokens |
Array of strings. This variable is defined in the parser's module (see file 'replacer.lex'). It will contain all the tokens extracted by the parser. | |
size_t | nb_tokens |
Number of tokens in the array 'txt_tokens'. This variable is defined in the parser's module (see file 'replacer.lex'). |
Definition in file replacer.c.
|
Function used to compare two elements of the hash table (two tags).
Definition at line 94 of file replacer.c. References couple::key. Referenced by replace_tags(). |
|
Function used to free memory allocated for the elements of the hash table.
Definition at line 79 of file replacer.c. Referenced by replace_tags(). |
|
Hash function used by the hash table to hash the tags.
Definition at line 60 of file replacer.c. References couple::key. Referenced by replace_tags(). |
|
Replace tags by their values in a text.
Definition at line 127 of file replacer.c. References chtbl_destroy(), chtbl_init(), chtbl_insert(), chtbl_lookup(), compare_user_data(), dstring_add(), dstring_free(), dstring_get_data(), dstring_init(), free_user_data(), hash_function(), HASH_TABLE_ENTRIES, INIT_DYNAMIC_STRING, couple::key, nb_tokens, txt_tokens, and couple::value. |