<commit_before>/*
 * BRLTTY - A background process providing access to the console screen (when in
 *          text mode) for a blind person using a refreshable braille display.
 *
 * Copyright (C) 1995-2018 by The BRLTTY Developers.
 *
 * BRLTTY comes with ABSOLUTELY NO WARRANTY.
 *
 * This is free software, placed under the terms of the
 * GNU Lesser General Public License, as published by the Free Software
 * Foundation; either version 2.1 of the License, or (at your option) any
 * later version. Please see the file LICENSE-LGPL for details.
 *
 * Web Page: http://brltty.app/
 *
 * This software is maintained by <NAME> <<EMAIL>>.
 */

#ifndef BRLTTY_INCLUDED_RGX_INTERNAL
#define BRLTTY_INCLUDED_RGX_INTERNAL

#include "strfmth.h"

#if defined(USE_PKG_RGX_NONE)
typedef wchar_t RGX_CharacterType;
typedef size_t RGX_OffsetType;
typedef int RGX_OptionsType;
typedef uint8_t RGX_CodeType;
typedef uint8_t RGX_DataType;
#define RGX_NO_MATCH 1
#define RGX_NO_NAME 2

#elif defined(USE_PKG_RGX_LIBPCRE32)
#include <pcre.h>
typedef PCRE_UCHAR32 RGX_CharacterType;
typedef int RGX_OffsetType;
typedef int RGX_OptionsType;
typedef pcre32 RGX_CodeType;
typedef struct {
  pcre32_extra *study;
  size_t matches;
  size_t count;
  RGX_OffsetType offsets[];
} RGX_DataType;
#define RGX_NO_MATCH PCRE_ERROR_NOMATCH
#define RGX_NO_NAME PCRE_ERROR_NOSUBSTRING

#elif defined(USE_PKG_RGX_LIBPCRE2_32)
#define PCRE2_CODE_UNIT_WIDTH 32
#include <pcre2.h>
typedef PCRE2_UCHAR RGX_CharacterType;
typedef PCRE2_SIZE RGX_OffsetType;
typedef uint32_t RGX_OptionsType;
typedef pcre2_code RGX_CodeType;
typedef pcre2_match_data RGX_DataType;
#define RGX_NO_MATCH PCRE2_ERROR_NOMATCH
#define RGX_NO_NAME PCRE2_ERROR_NOSUBSTRING

#else /* regular expression package */
#error regular expression package not selected
#endif /* regular expression package */

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
<commit_msg>Make the conditional part of the internal header for rgx be a little more readable. (dm)<commit_after>/*
 * BRLTTY - A background process providing access to the console screen (when in
 *          text mode) for a blind person using a refreshable braille display.
 *
 * Copyright (C) 1995-2018 by The BRLTTY Developers.
 *
 * BRLTTY comes with ABSOLUTELY NO WARRANTY.
 *
 * This is free software, placed under the terms of the
 * GNU Lesser General Public License, as published by the Free Software
 * Foundation; either version 2.1 of the License, or (at your option) any
 * later version. Please see the file LICENSE-LGPL for details.
 *
 * Web Page: http://brltty.app/
 *
 * This software is maintained by <NAME> <<EMAIL>>.
 */

#ifndef BRLTTY_INCLUDED_RGX_INTERNAL
#define BRLTTY_INCLUDED_RGX_INTERNAL

#include "strfmth.h"

#if defined(USE_PKG_RGX_NONE)
#define RGX_NO_MATCH 1
#define RGX_NO_NAME 2

typedef wchar_t RGX_CharacterType;
typedef size_t RGX_OffsetType;
typedef int RGX_OptionsType;
typedef uint8_t RGX_CodeType;
typedef uint8_t RGX_DataType;

#elif defined(USE_PKG_RGX_LIBPCRE32)
#include <pcre.h>

#define RGX_NO_MATCH PCRE_ERROR_NOMATCH
#define RGX_NO_NAME PCRE_ERROR_NOSUBSTRING

typedef PCRE_UCHAR32 RGX_CharacterType;
typedef int RGX_OffsetType;
typedef int RGX_OptionsType;
typedef pcre32 RGX_CodeType;

typedef struct {
  pcre32_extra *study;
  size_t matches;
  size_t count;
  RGX_OffsetType offsets[];
} RGX_DataType;

#elif defined(USE_PKG_RGX_LIBPCRE2_32)
#define PCRE2_CODE_UNIT_WIDTH 32
#include <pcre2.h>

#define RGX_NO_MATCH PCRE2_ERROR_NOMATCH
#define RGX_NO_NAME PCRE2_ERROR_NOSUBSTRING

typedef PCRE2_UCHAR RGX_CharacterType;
typedef PCRE2_SIZE RGX_OffsetType;
typedef uint32_t RGX_OptionsType;
typedef pcre2_code RGX_CodeType;
typedef pcre2_match_data RGX_DataType;

#else /* regular expression package */
#error regular expression package not selected
#endif /* regular expression package */

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

{'fraction_non_alphanumeric': 0.06639323250448603, 'fraction_numerical': 0.018969495001281724, 'mean_word_length': 5.470978441127695, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6851059', 'n_tokens_mistral': 1515, 'n_tokens_neox': 1358, 'n_words': 413}