--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/settings.c Thu Sep 15 13:29:06 2011 +0200 @@ -0,0 +1,30 @@ +/* + * settings.c + * + * Created on: 15.09.2011 + * Author: beckermi + */ + +#include "settings.h" + +settings_t* new_settings_t() { + settings_t *settings = malloc(sizeof(settings_t*)); + if (settings != NULL) { + #ifdef _WIN32 + settings->fileSeparator = '\\'; + #else + settings->fileSeparator = '/'; + #endif /* _WIN32 */ + settings->recursive = false; + settings->includeSuffixes = false; + settings->matchesOnly = false; + settings->suffixList = new_suffix_list_t(); + } + + return settings; +} + +void destroy_settings_t(settings_t* settings) { + destroy_suffix_list_t(settings->suffixList); + free(settings); +}