27 lines
595 B
C
27 lines
595 B
C
#ifndef KEY_VALUE_PAIR_H
|
|
#define KEY_VALUE_PAIR_H
|
|
|
|
#include <stddef.h>
|
|
|
|
// Structures
|
|
typedef struct key_value_pair{
|
|
char *key;
|
|
char *value;
|
|
struct key_value_pair *next;
|
|
char *(*toString)(struct key_value_pair *);
|
|
} key_value_pair;
|
|
|
|
// Externals
|
|
extern key_value_pair *head;
|
|
extern key_value_pair *tail;
|
|
|
|
// Functions
|
|
key_value_pair *init_key_value_pair(const char *key, const char *value);
|
|
void free_key_value_pair(key_value_pair **kv);
|
|
void free_key_value_pairs();
|
|
|
|
int add_key_value_pair(key_value_pair *kv);
|
|
void remove_key_value_pair(key_value_pair *kv);
|
|
|
|
#endif //KEY_VALUE_PAIR_H
|