Thu, 26 Jan 2012 15:55:52 +0100
added regexp_parser struct and compile function
universe@20 | 1 | /* |
universe@20 | 2 | * bfile_heuristics.h |
universe@20 | 3 | * |
universe@20 | 4 | * Created on: 20.10.2011 |
universe@20 | 5 | * Author: Mike |
universe@20 | 6 | */ |
universe@20 | 7 | |
universe@20 | 8 | #ifndef BFILE_HEURISTICS_H_ |
universe@20 | 9 | #define BFILE_HEURISTICS_H_ |
universe@20 | 10 | |
universe@20 | 11 | #include "stdinc.h" |
universe@21 | 12 | |
universe@21 | 13 | #define BFILE_IGNORE 0x00 |
universe@21 | 14 | #define BFILE_LOW_ACCURACY 0x01 |
universe@21 | 15 | #define BFILE_MEDIUM_ACCURACY 0x02 |
universe@21 | 16 | #define BFILE_HIGH_ACCURACY 0x04 |
universe@21 | 17 | |
universe@21 | 18 | typedef struct { |
universe@27 | 19 | unsigned int level; |
universe@27 | 20 | unsigned int bcount; /* 'binary' character count */ |
universe@27 | 21 | unsigned int tcount; /* total count */ |
universe@21 | 22 | } bfile_heuristics_t; |
universe@20 | 23 | |
universe@20 | 24 | #ifdef _cplusplus |
universe@20 | 25 | extern "C" { |
universe@20 | 26 | #endif |
universe@20 | 27 | |
universe@21 | 28 | bfile_heuristics_t *new_bfile_heuristics_t(); |
universe@21 | 29 | void destroy_bfile_heuristics_t(bfile_heuristics_t *def); |
universe@22 | 30 | void bfile_reset(bfile_heuristics_t *def); |
universe@21 | 31 | bool bfile_check(bfile_heuristics_t *def, int next_char); |
universe@20 | 32 | |
universe@20 | 33 | #ifdef _cplusplus |
universe@20 | 34 | } |
universe@20 | 35 | #endif |
universe@20 | 36 | |
universe@21 | 37 | #endif /* BFILE_HEURISTICS_H_ */ |