46 lines
673 B
C
46 lines
673 B
C
#include <zmq.h>
|
|
#include <ctype.h>
|
|
#include <stdbool.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
#include "key_value_pair.h"
|
|
|
|
#define tolower_str(word) for(int i = 0; i < strlen(word); i++) word[i] = tolower(word[i]);
|
|
|
|
bool run = true;
|
|
|
|
void main(int argc, char **argv)
|
|
{
|
|
// TODO: Start socket with zmq
|
|
// TODO: Wait on calls
|
|
// TODO: Handle calls
|
|
// TODO: Reply to requester
|
|
}
|
|
|
|
void count_word(const char *word)
|
|
{
|
|
char *word_copy = strdup(word);
|
|
tolower_str(word);
|
|
|
|
find_key_value_pair(word);
|
|
|
|
free(word_copy);
|
|
}
|
|
|
|
char *map(char *args)
|
|
{
|
|
|
|
return NULL;
|
|
}
|
|
|
|
char *reduce(char *args)
|
|
{
|
|
|
|
return NULL;
|
|
}
|
|
|
|
char *rip()
|
|
{
|
|
return NULL;
|
|
} |