src/bfile_heuristics.h

changeset 99
094eff4cfc03
parent 57
68018eac46c3
equal deleted inserted replaced
98:09ad5d8ab860 99:094eff4cfc03
25 */ 25 */
26 26
27 #ifndef BFILE_HEURISTICS_H_ 27 #ifndef BFILE_HEURISTICS_H_
28 #define BFILE_HEURISTICS_H_ 28 #define BFILE_HEURISTICS_H_
29 29
30 #include "stdinc.h"
31
32 #define BFILE_IGNORE 0x00 30 #define BFILE_IGNORE 0x00
33 #define BFILE_LOW_ACCURACY 0x01 31 #define BFILE_LOW_ACCURACY 0x01
34 #define BFILE_MEDIUM_ACCURACY 0x02 32 #define BFILE_MEDIUM_ACCURACY 0x02
35 #define BFILE_HIGH_ACCURACY 0x04 33 #define BFILE_HIGH_ACCURACY 0x04
36 34
37 typedef struct { 35 typedef struct {
38 unsigned int level; 36 unsigned int level;
39 unsigned int bcount; /* 'binary' character count */ 37 unsigned int bcount; /* 'binary' character count */
40 unsigned int tcount; /* total count */ 38 unsigned int tcount; /* total count */
41 } bfile_heuristics_t; 39 } bfile_heuristics;
42 40
43 #ifdef _cplusplus 41 #ifdef _cplusplus
44 extern "C" { 42 extern "C" {
45 #endif 43 #endif
46 44
47 bfile_heuristics_t *new_bfile_heuristics_t(); 45 bfile_heuristics *new_bfile_heuristics();
48 void destroy_bfile_heuristics_t(bfile_heuristics_t *def); 46 void destroy_bfile_heuristics(bfile_heuristics *def);
49 void bfile_reset(bfile_heuristics_t *def); 47 void bfile_reset(bfile_heuristics *def);
50 bool bfile_check(bfile_heuristics_t *def, int next_char); 48 bool bfile_check(bfile_heuristics *def, int next_char);
51 49
52 #ifdef _cplusplus 50 #ifdef _cplusplus
53 } 51 }
54 #endif 52 #endif
55 53

mercurial