bfile_heuristics.c

changeset 21
91e0890464b0
parent 20
43725438ac50
child 22
4508da679ffb
equal deleted inserted replaced
20:43725438ac50 21:91e0890464b0
3 * 3 *
4 * Created on: 20.10.2011 4 * Created on: 20.10.2011
5 * Author: Mike 5 * Author: Mike
6 */ 6 */
7 7
8
9 #include "bfile_heuristics.h" 8 #include "bfile_heuristics.h"
10 9
11 bfile_heuristics *new_bfile_heuristics(int level) { 10 bfile_heuristics_t *new_bfile_heuristics_t() {
12 bfile_heuristics *ret = malloc(sizeof(bfile_heuristics)); 11 bfile_heuristics_t *ret = malloc(sizeof(bfile_heuristics_t));
13 ret->level = level; 12 ret->level = BFILE_MEDIUM_ACCURACY;
14 memset(ret->ccount, 0, sizeof(int)*256); 13 /* TODO: check why this fails */
15 return ret; 14 /* ret->ccount = calloc(256, sizeof(int)); */
15 return ret;
16 } 16 }
17 17
18 bool bfile_check(bfile_heuristics *def, int next_char) { 18 void destroy_bfile_heuristics_t(bfile_heuristics_t *def) {
19 bool ret = false; 19 free(def->ccount);
20 20 free(def);
21 return ret;
22 } 21 }
22
23 bool bfile_check(bfile_heuristics_t *def, int next_char) {
24 bool ret = false;
25
26 return ret;
27 }

mercurial