settings.c

Fri, 16 Sep 2011 10:36:45 +0200

author
Mike Becker <universe@uap-core.de>
date
Fri, 16 Sep 2011 10:36:45 +0200
changeset 14
ee9333c91dda
parent 11
06cbd0ec003d
child 16
bc9a0fefd892
permissions
-rw-r--r--

some minor fixes + makefile now injects revisionnumber into cline.h

/*
 * 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) {
  free(settings->suffixList);
  free(settings);
}

mercurial