settings.c

Thu, 01 Dec 2011 17:06:27 +0100

author
Mike Becker <universe@uap-core.de>
date
Thu, 01 Dec 2011 17:06:27 +0100
changeset 26
853a1181884b
parent 25
802c5382f499
child 27
95a958e3de88
permissions
-rw-r--r--

Merge with 3963e8800a1268be93d938c709e2d4be4d0b2d39

/*
 * settings.c
 *
 *  Created on: 15.09.2011
 *      Author: Mike
 */

#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;
    settings->bfileHeuristics    = new_bfile_heuristics_t();
    settings->confusing_lnlen   = false;
  }

  return settings;
}

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

mercurial