<commit_before>/*! \file gear_config.h
 *  \brief This header defines the general configuration shared between the Gear compiler and runtime.
 *
 *  This header defines the common configuration used by Gear.
 *  All of Gear's features are enabled by default, but this header can be edited to disable or
 *  reconfigure a feature.
 *  Alternatively, features can be disabled by passing the appropriate preprocessor directives
 *  during the build process.
 *
 *  \note
 *  If this header is modified, then the Gear compiler and runtime must both be rebuilt to reflect the changes.
 */

#ifndef GEAR_CONFIG_API_H
#define GEAR_CONFIG_API_H

/*! \brief This preprocessor directive must be defined when building Gear as a dynamic link library (.DLL) on Windows.
 *
 *  This preprocessor directive is defined by default when building Gear using its build scripts. 
 *  If Gear is being integrated with a different build system, then it should define this directive.
 *  This directive should \b not be defined if Gear is being built as a static library.
 */
#if defined(_WIN32) && defined(GEAR_SHARED_OBJECT)
#define GEAR_API __declspec(dllexport)
#else
#define GEAR_API
#endif

/*! \brief The compiled version of Gear as a string.
 *
 *  Do not assume this string is of the form "X.Y.Z" (where X, Y, Z are the major, minor, and patch versions).
 *  This is because it may contain letters, dashes, or other symbols indicating its alpha, beta, or preview status.
 *
 *  \note
 *  Gear adheres to semantic versioning.
 */
#define GEAR_VERSION_STRING "0.7.1 (pre-alpha)"

/*! \brief The major version of Gear.
 *
 *  The major version of Gear as an integer.
 */
#define GEAR_VERSION_MAJOR 0

/*! \brief The minor version of Gear.
 *
 *  The minor version of Gear as an integer.
 */
#define GEAR_VERSION_MINOR 7

/*! \brief The patch version of Gear.
 *
 *  The patch version of Gear as an integer.
 */
#define GEAR_VERSION_PATCH 1

/*! \brief Defines the integer storage type used by the Gear runtime.
 * 
 *  Define one of the following preprocessor definitions to choose which 
 *  integer storage type is used by Gear's \c Int type.
 *  By default, Gear will pick the largest integer type available.
 *
 *  Preprocessor Definition | C Storage Type
 *  ----------------------- | --------------
 *  GEAR_INT_INT            | int
 *  GEAR_INT_LONG           | long
 *  GEAR_INT_LONGLONG       | long long
 *
 *  The header can be modified to use any integer type, but it's must be a \e signed integer type.
 */
#ifdef DOXYGEN
typedef storage_type gear_int;
#endif
#if !defined(GEAR_INT_INT) && !defined(GEAR_INT_LONG) && !defined(GEAR_INT_LONGLONG)
#define GEAR_INT_LONGLONG /* The default configuration. */<commit_msg>Adding additional typedefs to the public API for codepoints and C89 compatable booleans.<commit_after>/*! \file gear_config.h
 *  \brief This header defines the general configuration shared between the Gear compiler and runtime.
 *
 *  All features are enabled by default, but this header can be edited to disable or reconfigure a feature.
 *  Alternatively, features can be disabled by passing the appropriate preprocessor directives during compilation.
 *
 *  \note
 *  If this header is modified, then the Gear compiler, runtime, and tool suite must be completely rebuilt.
 */

#ifndef GEAR_CONFIG_API_H
#define GEAR_CONFIG_API_H

/*! \brief This preprocessor directive must be defined when building Gear as a dynamic link library (.DLL) on Windows.
 *
 *  This preprocessor directive is defined by default when building Gear using its build scripts. 
 *  If Gear is being integrated with a different build system, then it should define this directive.
 *  This directive should \b not be defined if Gear is being built as a static library.
 */
#if defined(_WIN32) && defined(GEAR_SHARED_OBJECT)
#define GEAR_API __declspec(dllexport)
#else
#define GEAR_API
#endif

/*! \brief The compiled version of Gear as a string.
 *
 *  Do not assume this string is of the form "X.Y.Z" (where X, Y, Z are the major, minor, and patch versions).
 *  This is because it may contain letters, dashes, or other symbols indicating its alpha, beta, or preview status.
 *
 *  \note
 *  Gear adheres to semantic versioning.
 */
#define GEAR_VERSION_STRING "0.7.1 (pre-alpha)"

/*! \brief The major version of Gear.
 *
 *  The major version of Gear as an integer.
 */
#define GEAR_VERSION_MAJOR 0

/*! \brief The minor version of Gear.
 *
 *  The minor version of Gear as an integer.
 */
#define GEAR_VERSION_MINOR 7

/*! \brief The patch version of Gear.
 *
 *  The patch version of Gear as an integer.
 */
#define GEAR_VERSION_PATCH 1

/*! \brief A boolean type compatible with pre-C99 compilers.
 *
 *  Gear aliases C's `_Bool` type when building with a compiler supporting C99 or newer.
 *  It aliases an integer type when compiled with a pre-C99 compiler.
 *  User's of these older compilers should use the integer `0` for false and `1` for true.
 *  User's of C99 (or newer) can do the same or use the `true` and `false` macros defined in `stdbool.h`.
 */
#ifdef DOXYGEN
typedef _Bool gear_bool;
#endif
/* The Microsoft Visual C++ compiler does not define the __STDC_VERSION__ macro despite supporting
   most C99 feature since MSVC 2013. This means an additional _MSC_VER check is required below. */
#if (__STDC_VERSION__ >= 199901L) || (defined(_MSC_VER) && _MSC_VER >= 1800)
typedef _Bool gear_bool;
#else
typedef unsigned char gear_bool;
#endif

/*! \brief A single Unicode code point.
 *
 *  A "character" in Gear refers to a single Unicode code point.
 *  This typedef defines an integer large enough to hold one code point.
 *
 *  Unicode defines code points to be at most 21-bits with the largest being 0x10FFFF.
 *  C's `long` type is used because it's guaranteed to be at least 32-bits.
 */
typedef long gear_char;

/*! \brief Defines the integer storage type used by the Gear runtime.
 * 
 *  Define one of the following preprocessor definitions to choose which 
 *  integer storage type is used by Gear's \c Int type.
 *  By default, Gear will pick the largest integer type available.
 *
 *  Preprocessor Definition | C Storage Type
 *  ----------------------- | --------------
 *  GEAR_INT_INT            | int
 *  GEAR_INT_LONG           | long
 *  GEAR_INT_LONGLONG       | long long
 *
 *  The header can be modified to use any integer type, but it's must be a \e signed integer type.
 */
#ifdef DOXYGEN
typedef storage_type gear_int;
#endif
#if !defined(GEAR_INT_INT) && !defined(GEAR_INT_LONG) && !defined(GEAR_INT_LONGLONG)
#define GEAR_INT_LONGLONG /* The default configuration. */
{'fraction_non_alphanumeric': 0.08335859351318581, 'fraction_numerical': 0.007729615034859048, 'mean_word_length': 3.449763991908294, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2613649', 'n_tokens_mistral': 1986, 'n_tokens_neox': 1862, 'n_words': 883}