#ifndef __RABINCARP_H #define __RABINCARP_H #include #include #include #include #include #include typedef struct rol_hash_isearch { int b; int m; int pow; int pattern_len; int text_len; int pattern_hash; int text_hash; char *text; char *pattern; int iter_pos; char *pre_text; int count; int chunk_done; } rol_hash_isearch; int rlsi_hash_reset(rol_hash_isearch *rlh); int rlsi_hash_init(rol_hash_isearch *rlh, int b, int m); int rlsi_hash_precalc(rol_hash_isearch *rlh, char *pattern, int plen, char *text, int tlen); int rlsi_hash_search(rol_hash_isearch *rlh, char *pattern, int plen, char *text, int tlen); int rlsi_hash_get(rol_hash_isearch *rlh); #endif