Patch for text output mode by originally by Patrik Bless, updated by Roman Hoog

Antink <rha@open.ch>
This commit is contained in:
pdw
2014-01-01 14:37:31 +00:00
parent 59cf360690
commit a966319256
9 changed files with 522 additions and 377 deletions

10
hash.c
View File

@@ -76,6 +76,11 @@ hash_status_enum hash_find(hash_type* hash_table, void* key, void **rec) {
hash_status_enum hash_next_item(hash_type* hash_table, hash_node_type** ppnode) {
int i;
if (hash_table == 0) {
return HASH_STATUS_KEY_NOT_FOUND;
}
if(*ppnode != NULL) {
if((*ppnode)->next != NULL) {
*ppnode = (*ppnode)->next;
@@ -101,6 +106,11 @@ hash_status_enum hash_next_item(hash_type* hash_table, hash_node_type** ppnode)
void hash_delete_all(hash_type* hash_table) {
int i;
hash_node_type *n, *nn;
if(hash_table == 0) {
return;
}
for(i = 0; i < hash_table->size; i++) {
n = hash_table->table[i];
while(n != NULL) {