<commit_before>/***************************************************************************
      kdbprivate.h  -  Private declarations

                           -------------------
 *  begin                : Wed 19 May, 2010
 *  copyright            : (C) 2010 by <NAME>
 *  email                : <EMAIL>
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the BSD License (revised).                      *
 *                                                                         *
 ***************************************************************************/

#ifndef KDBPRIVATE_H
#define KDBPRIVATE_H

#include <kdb.h>
#include <kdbhelper.h>
#include <kdbconfig.h>
#include <kdbplugin.h>
#include <kdbproposal.h>
#include <kdbextension.h>

#include <limits.h>

/** The minimal allocation size of a keyset inclusive
    NULL byte. ksGetAlloc() will return one less because
    it says how much can actually be stored.*/
#define KEYSET_SIZE 16

/** How many plugins can exist in an backend. */
#define NR_OF_PLUGINS 10

/** The index of the commit plugin */
#define COMMIT_PLUGIN 7

/** The index of the storage plugin */
#define STORAGE_PLUGIN 5

/** The index of the resolver plugin */
#define RESOLVER_PLUGIN 0

/** Trie optimization */
#define APPROXIMATE_NR_OF_BACKENDS 16

/**The maximum of how many characters an integer
  needs as decimal number.*/
#define MAX_LEN_INT 31

/**Backend mounting information.
 *
 * This key directory tells you where each backend is mounted
 * to which mountpoint. */
#define KDB_KEY_MOUNTPOINTS      "system/elektra/mountpoints"

#if DEBUG
# include <stdio.h>
# define ELEKTRA_PRINT_DEBUG(text) printf("%s:%d: %s\n", __FILE__, __LINE__ , text);
#else
# define ELEKTRA_PRINT_DEBUG(text)
#endif

#if DEBUG && VERBOSE
# define ELEKTRA_PRINT_VERBOSE(text) printf("%s:%d: %s\n", __FILE__, __LINE__ , text);
#else
# define ELEKTRA_PRINT_VERBOSE(text)
#endif

#if DEBUG || defined(ELEKTRA_BMC)
#undef NDEBUG
#include <assert.h>
#define ELEKTRA_ASSERT assert
#else
#define ELEKTRA_ASSERT
#endif


#ifdef __cplusplus
namespace ckdb {
extern "C" {
#endif

typedef struct _Trie	Trie;
typedef struct _Split	Split;
typedef struct _Backend	Backend;

/* These define the type for pointers to all the kdb functions */
typedef int (*kdbOpenPtr)(Plugin *, Key *errorKey);
typedef int (*kdbClosePtr)(Plugin *, Key *errorKey);

typedef int (*kdbGetPtr)(Plugin *handle, KeySet *returned, Key *parentKey);
typedef int (*kdbSetPtr)(Plugin *handle, KeySet *returned, Key *parentKey);
typedef int (*kdbErrorPtr)(Plugin *handle, KeySet *returned, Key *parentKey);

<commit_msg>fix ELEKTRA_ASSERT<commit_after>/***************************************************************************
      kdbprivate.h  -  Private declarations

                           -------------------
 *  begin                : Wed 19 May, 2010
 *  copyright            : (C) 2010 by <NAME>
 *  email                : <EMAIL>
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the BSD License (revised).                      *
 *                                                                         *
 ***************************************************************************/

#ifndef KDBPRIVATE_H
#define KDBPRIVATE_H

#include <kdb.h>
#include <kdbhelper.h>
#include <kdbconfig.h>
#include <kdbplugin.h>
#include <kdbproposal.h>
#include <kdbextension.h>

#include <limits.h>

/** The minimal allocation size of a keyset inclusive
    NULL byte. ksGetAlloc() will return one less because
    it says how much can actually be stored.*/
#define KEYSET_SIZE 16

/** How many plugins can exist in an backend. */
#define NR_OF_PLUGINS 10

/** The index of the commit plugin */
#define COMMIT_PLUGIN 7

/** The index of the storage plugin */
#define STORAGE_PLUGIN 5

/** The index of the resolver plugin */
#define RESOLVER_PLUGIN 0

/** Trie optimization */
#define APPROXIMATE_NR_OF_BACKENDS 16

/**The maximum of how many characters an integer
  needs as decimal number.*/
#define MAX_LEN_INT 31

/**Backend mounting information.
 *
 * This key directory tells you where each backend is mounted
 * to which mountpoint. */
#define KDB_KEY_MOUNTPOINTS      "system/elektra/mountpoints"

#if DEBUG
# include <stdio.h>
# define ELEKTRA_PRINT_DEBUG(text) printf("%s:%d: %s\n", __FILE__, __LINE__ , text);
#else
# define ELEKTRA_PRINT_DEBUG(text)
#endif

#if DEBUG && VERBOSE
# define ELEKTRA_PRINT_VERBOSE(text) printf("%s:%d: %s\n", __FILE__, __LINE__ , text);
#else
# define ELEKTRA_PRINT_VERBOSE(text)
#endif

#if DEBUG || defined(ELEKTRA_BMC)
#undef NDEBUG
#include <assert.h>
#define ELEKTRA_ASSERT(NX) assert(NX)
#else
#define ELEKTRA_ASSERT(NX)
#endif


#ifdef __cplusplus
namespace ckdb {
extern "C" {
#endif

typedef struct _Trie	Trie;
typedef struct _Split	Split;
typedef struct _Backend	Backend;

/* These define the type for pointers to all the kdb functions */
typedef int (*kdbOpenPtr)(Plugin *, Key *errorKey);
typedef int (*kdbClosePtr)(Plugin *, Key *errorKey);

typedef int (*kdbGetPtr)(Plugin *handle, KeySet *returned, Key *parentKey);
typedef int (*kdbSetPtr)(Plugin *handle, KeySet *returned, Key *parentKey);
typedef int (*kdbErrorPtr)(Plugin *handle, KeySet *returned, Key *parentKey);


{'fraction_non_alphanumeric': 0.20072676933725558, 'fraction_numerical': 0.007267693372555805, 'mean_word_length': 3.2688330871491877, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '323840', 'n_tokens_mistral': 1763, 'n_tokens_neox': 1641, 'n_words': 531}