settings.c

changeset 10
ecf787666f44
child 11
06cbd0ec003d
equal deleted inserted replaced
8:28319b20968c 10:ecf787666f44
1 /*
2 * settings.c
3 *
4 * Created on: 15.09.2011
5 * Author: beckermi
6 */
7
8 #include "settings.h"
9
10 settings_t* new_settings_t() {
11 settings_t *settings = malloc(sizeof(settings_t*));
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;
21 settings->suffixList = new_suffix_list_t();
22 }
23
24 return settings;
25 }
26
27 void destroy_settings_t(settings_t* settings) {
28 destroy_suffix_list_t(settings->suffixList);
29 free(settings);
30 }

mercurial