Thu, 20 Oct 2011 15:21:53 +0200
implemented bfile heuristics option + TODO: implement algorithm
universe@20 | 1 | /* |
universe@20 | 2 | * bfile_heuristics.c |
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 | #include "bfile_heuristics.h" |
universe@20 | 9 | |
universe@21 | 10 | bfile_heuristics_t *new_bfile_heuristics_t() { |
universe@21 | 11 | bfile_heuristics_t *ret = malloc(sizeof(bfile_heuristics_t)); |
universe@21 | 12 | ret->level = BFILE_MEDIUM_ACCURACY; |
universe@21 | 13 | /* TODO: check why this fails */ |
universe@21 | 14 | /* ret->ccount = calloc(256, sizeof(int)); */ |
universe@21 | 15 | return ret; |
universe@20 | 16 | } |
universe@20 | 17 | |
universe@21 | 18 | void destroy_bfile_heuristics_t(bfile_heuristics_t *def) { |
universe@21 | 19 | free(def->ccount); |
universe@21 | 20 | free(def); |
universe@20 | 21 | } |
universe@21 | 22 | |
universe@21 | 23 | bool bfile_check(bfile_heuristics_t *def, int next_char) { |
universe@21 | 24 | bool ret = false; |
universe@21 | 25 | |
universe@21 | 26 | return ret; |
universe@21 | 27 | } |