settings.c

Sat, 15 Oct 2011 14:52:12 +0200

author
Mike Becker <universe@uap-core.de>
date
Sat, 15 Oct 2011 14:52:12 +0200
changeset 18
cae1294702aa
parent 17
5f43f733cc12
child 19
8bac9fd0629d
permissions
-rw-r--r--

Increased warning level, fixed resulting warnings, changed std form c99 to gnu99

/*
 * 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();
    settings->verbose            = true;
  }

  return settings;
}

void destroy_settings_t(settings_t* settings) {
  destroy_suffix_list_t(settings->suffixList);
  free(settings);
}

mercurial