#include #include struct node *new_node(const char *key, const void *value) { struct node *new = calloc(1, sizeof(struct node)); new->next = NULL; new->prev = NULL; new->key = key; new->value = value; return new; } struct node *insert_node(struct node *entry, const char *key, const void *value) { struct node *insert = new_node(key, value); insert->prev = entry; if(entry != NULL) { insert->next = entry->next; entry->next = insert; } return insert; }