Created initial files

This commit is contained in:
t
2025-01-27 21:02:54 +01:00
parent 1ee553a410
commit 1766923c61
43 changed files with 5649 additions and 11 deletions
+15 -8
View File
@@ -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