Created initial files
This commit is contained in:
@@ -1,20 +1,27 @@
|
||||
#ifndef MAP_REDUCE_H
|
||||
#define MAP_REDUCE_H
|
||||
#ifndef KEY_VALUE_PAIR_H
|
||||
#define KEY_VALUE_PAIR_H
|
||||
|
||||
// Constants
|
||||
#include <stddef.h>
|
||||
|
||||
// Structures
|
||||
typedef struct key_value_pair{
|
||||
char *key;
|
||||
char value;
|
||||
char *value;
|
||||
struct key_value_pair *next;
|
||||
char *(*toString)(struct key_value_pair *);
|
||||
} key_value_pair;
|
||||
|
||||
static key_value_pair *head = NULL;
|
||||
// Externals
|
||||
extern key_value_pair *head;
|
||||
extern key_value_pair *tail;
|
||||
|
||||
// Functions
|
||||
void init_key_value_pair(key_value_pair *kv, char *key, char *value);
|
||||
void free_key_value_pair(key_value_pair *kv);
|
||||
void free_key_value_pair(key_value_pair **kv);
|
||||
|
||||
void add_key_value_pair(key_value_pair *kv, char *key, char *value);
|
||||
int add_key_value_pair(key_value_pair *kv);
|
||||
void remove_key_value_pair(key_value_pair *kv);
|
||||
void find_key_value_pair(char *key);
|
||||
char *to_string_key_value_pair(key_value_pair *kv);
|
||||
|
||||
#endif //MAP_REDUCE_H
|
||||
#endif //KEY_VALUE_PAIR_H
|
||||
|
||||
Reference in New Issue
Block a user