diff options
Diffstat (limited to 'rabincarp.h')
-rw-r--r-- | rabincarp.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/rabincarp.h b/rabincarp.h index e69de29..753ff66 100644 --- a/rabincarp.h +++ b/rabincarp.h @@ -0,0 +1,36 @@ +#ifndef __RABINCARP_H +#define __RABINCARP_H + +#include <stdlib.h> +#include <stdio.h> +#include <stdint.h> +#include <unistd.h> +#include <fcntl.h> +#include <string.h> + +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
\ No newline at end of file |