settings.c

Sun, 16 Oct 2011 12:20:52 +0200

author
Mike Becker <universe@uap-core.de>
date
Sun, 16 Oct 2011 12:20:52 +0200
changeset 19
8bac9fd0629d
parent 17
5f43f733cc12
child 20
43725438ac50
permissions
-rw-r--r--

generalized suffix_list to string_list

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

  return settings;
}

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

mercurial