settings.c

changeset 11
06cbd0ec003d
parent 10
ecf787666f44
child 16
bc9a0fefd892
equal deleted inserted replaced
10:ecf787666f44 11:06cbd0ec003d
6 */ 6 */
7 7
8 #include "settings.h" 8 #include "settings.h"
9 9
10 settings_t* new_settings_t() { 10 settings_t* new_settings_t() {
11 settings_t *settings = malloc(sizeof(settings_t*)); 11 settings_t *settings = malloc(sizeof(settings_t));
12 if (settings != NULL) { 12 if (settings != NULL) {
13 #ifdef _WIN32 13 #ifdef _WIN32
14 settings->fileSeparator = '\\'; 14 settings->fileSeparator = '\\';
15 #else 15 #else
16 settings->fileSeparator = '/'; 16 settings->fileSeparator = '/';
23 23
24 return settings; 24 return settings;
25 } 25 }
26 26
27 void destroy_settings_t(settings_t* settings) { 27 void destroy_settings_t(settings_t* settings) {
28 destroy_suffix_list_t(settings->suffixList); 28 free(settings->suffixList);
29 free(settings); 29 free(settings);
30 } 30 }

mercurial