/* This file was generated by the following command: cfunctions bm.c */ #ifndef CFH_BM_H #define CFH_BM_H #line 7 "bm.c" typedef struct bm { /* The string to search for. */ const unsigned char * needle; /* The length of "needle" in bytes. */ int len; /* The offset of the first byte of where "needle" was found in the searched string. */ int offset; /* True if "needle" was found within the searched string, false otherwise. */ unsigned int found : 1; /* True if initialised correctly. */ unsigned int init : 1; /* The length into "needle" where each byte is last found. */ int delta1[0x100]; int * delta2; } bm_t; typedef enum { bm_status_ok, bm_status_memory_failure, /* Over or under flow. */ bm_status_bounds, /* Uninitialised structure. */ bm_status_uninit, } bm_status_t; #line 153 "bm.c" bm_status_t bm_prepare (bm_t* bm, const unsigned char* needle); #line 173 "bm.c" bm_status_t bm_free (bm_t* bm); #line 192 "bm.c" bm_status_t bm_search (bm_t* bm, const unsigned char* haystack); #endif /* CFH_BM_H */