<commit_before>/**
 * This source file contains everything that is in freesasa.h
 * interface and does not have a natural home in any of the other
 * source files.
 */

#if HAVE_CONFIG_H
#include <config.h>
#endif
#include <assert.h>
#include <stdlib.h>
#include <string.h>

#include "freesasa_internal.h"

#ifdef PACKAGE_VERSION
const char *freesasa_version = PACKAGE_VERSION;
#else
const char *freesasa_version = "";
#endif

#ifdef PACKAGE_STRING
const char *freesasa_string = PACKAGE_STRING;
#else
const char *freesasa_string = "FreeSASA";
#endif

/* Allows compilation with different defaults
   depending on USE_THREADS. but still exposing the value in a header
   that doesn't depend on USE_THREADS */
#ifdef USE_THREADS
#define DEF_NUMBER_THREADS 2
#else
#define DEF_NUMBER_THREADS 1
#endif
const int FREESASA_DEF_NUMBER_THREADS = DEF_NUMBER_THREADS;

const freesasa_parameters freesasa_default_parameters = {
    FREESASA_DEF_ALGORITHM,
    FREESASA_DEF_PROBE_RADIUS,
    FREESASA_DEF_SR_N,
    FREESASA_DEF_LR_N,
    DEF_NUMBER_THREADS};

static freesasa_result *
result_new(int n)
{
    freesasa_result *result = malloc(sizeof(freesasa_result));

    if (result == NULL) {
        mem_fail();
        return NULL;
    }
<commit_msg>Fix bug where threads where not properly disabled. Closes #79.<commit_after>/**
 * This source file contains everything that is in freesasa.h
 * interface and does not have a natural home in any of the other
 * source files.
 */

#if HAVE_CONFIG_H
#include <config.h>
#endif
#include <assert.h>
#include <stdlib.h>
#include <string.h>

#include "freesasa_internal.h"

#ifdef PACKAGE_VERSION
const char *freesasa_version = PACKAGE_VERSION;
#else
const char *freesasa_version = "";
#endif

#ifdef PACKAGE_STRING
const char *freesasa_string = PACKAGE_STRING;
#else
const char *freesasa_string = "FreeSASA";
#endif

/* Allows compilation with different defaults
   depending on USE_THREADS. but still exposing the value in a header
   that doesn't depend on USE_THREADS */
#if USE_THREADS
#define DEF_NUMBER_THREADS 2
#else
#define DEF_NUMBER_THREADS 1
#endif
const int FREESASA_DEF_NUMBER_THREADS = DEF_NUMBER_THREADS;

const freesasa_parameters freesasa_default_parameters = {
    FREESASA_DEF_ALGORITHM,
    FREESASA_DEF_PROBE_RADIUS,
    FREESASA_DEF_SR_N,
    FREESASA_DEF_LR_N,
    DEF_NUMBER_THREADS};

static freesasa_result *
result_new(int n)
{
    freesasa_result *result = malloc(sizeof(freesasa_result));

    if (result == NULL) {
        mem_fail();
        return NULL;
    }

{'fraction_non_alphanumeric': 0.07944664031620553, 'fraction_numerical': 0.0023715415019762848, 'mean_word_length': 4.726244343891403, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2304245', 'n_tokens_mistral': 904, 'n_tokens_neox': 886, 'n_words': 243}