Thu, 20 Oct 2011 17:29:23 +0200
completed binary file heuristics
10 | 1 | /* |
2 | * settings.c | |
3 | * | |
4 | * Created on: 15.09.2011 | |
20
43725438ac50
Changed author comments + added signatures for upcomming bfile heuristics
Mike Becker <universe@uap-core.de>
parents:
19
diff
changeset
|
5 | * Author: Mike |
10 | 6 | */ |
7 | ||
8 | #include "settings.h" | |
9 | ||
10 | settings_t* new_settings_t() { | |
11
06cbd0ec003d
Merge with 1dd63a32ffc486b71399045cf8443ec6ac9d7bf5
Mike Becker <universe@uap-core.de>
parents:
10
diff
changeset
|
11 | settings_t *settings = malloc(sizeof(settings_t)); |
10 | 12 | if (settings != NULL) { |
13 | #ifdef _WIN32 | |
14 | settings->fileSeparator = '\\'; | |
15 | #else | |
16 | settings->fileSeparator = '/'; | |
17 | #endif /* _WIN32 */ | |
18 | settings->recursive = false; | |
19 | settings->includeSuffixes = false; | |
20 | settings->matchesOnly = false; | |
19
8bac9fd0629d
generalized suffix_list to string_list
Mike Becker <universe@uap-core.de>
parents:
17
diff
changeset
|
21 | settings->suffixList = new_string_list_t(); |
16
bc9a0fefd892
fixed makefile to run safely on compile errors + added -V option to cline
Mike Becker <universe@uap-core.de>
parents:
11
diff
changeset
|
22 | settings->verbose = true; |
21
91e0890464b0
implemented bfile heuristics option + TODO: implement algorithm
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
23 | settings->bfileHeuristics = new_bfile_heuristics_t(); |
10 | 24 | } |
25 | ||
26 | return settings; | |
27 | } | |
28 | ||
29 | void destroy_settings_t(settings_t* settings) { | |
19
8bac9fd0629d
generalized suffix_list to string_list
Mike Becker <universe@uap-core.de>
parents:
17
diff
changeset
|
30 | destroy_string_list_t(settings->suffixList); |
21
91e0890464b0
implemented bfile heuristics option + TODO: implement algorithm
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
31 | destroy_bfile_heuristics_t(settings->bfileHeuristics); |
10 | 32 | free(settings); |
33 | } |