
#ifndef MAP_HEADER
#define MAP_HEADER

#include <stdbool.h>
#include <locale.h>

#include "MapReduce.h"

// Constants definitions:
#define DMAX_WORD 256

// Functions Prototypes
int utf8_char_len(unsigned char c);
int is_utf8_letter(const unsigned char *s, int *len);
void normalize_utf8(char *word);
void flush_out(int fd_out, char *buf, int *pos);
int map_process_file(int fd_in, int fd_out);
int wordcount_mapper(int ninputfiles, char *input_files[], bool multiple_mappers);



#endif //MAP_HEADER
