1 2 3 4 5 typedef struct { 6 unsigned char ch; 7 unsigned char count; 8 } tre_filter_profile_t; 9 10 typedef struct { 11 /* Length of the window where the character counts are kept. */ 12 int window_len; 13 /* Required character counts table. */ 14 tre_filter_profile_t *profile; 15 } tre_filter_t; 16 17 18 int 19 tre_filter_find(const unsigned char *str, size_t len, tre_filter_t *filter); 20