#define PROG_NAME "xgrep"

#define BEEN_HERE printf("BEEN HERE [%i3] %s\n",__LINE__,__FILE__)

#define FOUND 1
#define NOT_FOUND -1
#define ERROR -2
#define ALPHABET_SIZE 256
#define MAX_LINE_SIZE 1024

typedef void (*t_preprocess_pattern_func)(const unsigned char*);
typedef int (*t_find_func)(const unsigned char*, unsigned int);

void bmh_preprocess_pattern(const unsigned char* pattern);
int bmh_find(const unsigned char* text, unsigned int blah);

void shiftand_exato_preprocess_pattern(const unsigned char* pattern);
int shiftand_exato_find(const unsigned char* text, unsigned int blah);

void shiftand_aprox_preprocess_pattern(const unsigned char* pattern);
int shiftand_aprox_find(const unsigned char* text, unsigned int k);

unsigned char * strcpy_alloc(unsigned char** to, const unsigned char* from);
unsigned long int * alloc_registers(unsigned long int **R, unsigned int n );
