<commit_before>/* RapicornCDefs - C compatible definitions
 * Copyright (C) 2006 <NAME>
 *
 * This library is free software; you can redistribute it and/or
 * modify it 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.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * A copy of the GNU Lesser General Public License should ship along
 * with this library; if not, see http://www.gnu.org/copyleft/.
 */
#ifndef __RAPICORN_CDEFS_H__
#define __RAPICORN_CDEFS_H__

#include <rcore/rapicornconfig.h> /* _GNU_SOURCE */
#include <stdbool.h>
#include <stdarg.h>
#include <stddef.h>			/* NULL */
#include <sys/types.h>			/* uint, ssize */
#include <stdint.h>			/* uint64_t */
#include <limits.h>                     /* {INT|CHAR|...}_{MIN|MAX} */
#include <float.h>                      /* {FLT|DBL}_{MIN|MAX|EPSILON} */

RAPICORN_EXTERN_C_BEGIN();

/* --- standard macros --- */
#ifndef FALSE
#  define FALSE					false
#endif
#ifndef TRUE
#  define TRUE					true
#endif
#define RAPICORN_ABS(a)                       	((a) > -(a) ? (a) : -(a))
#define RAPICORN_MIN(a,b)                         ((a) <= (b) ? (a) : (b))
#define RAPICORN_MAX(a,b)                         ((a) >= (b) ? (a) : (b))
#define RAPICORN_CLAMP(v,mi,ma)                   ((v) < (mi) ? (mi) : ((v) > (ma) ? (ma) : (v)))
#define RAPICORN_ARRAY_SIZE(array)		(sizeof (array) / sizeof ((array)[0]))
#undef ABS
#define ABS                                     RAPICORN_ABS
#undef MIN
#define MIN                                     RAPICORN_MIN
#undef MAX
#define MAX                                     RAPICORN_MAX
#undef CLAMP
#define CLAMP                                   RAPICORN_CLAMP
#undef ARRAY_SIZE
#define ARRAY_SIZE				RAPICORN_ARRAY_SIZE
#undef EXTERN_C
#ifdef	__cplusplus
#define EXTERN_C                                extern "C"
#else
#define EXTERN_C                                extern
#endif
#undef STRFUNC
#define STRFUNC				        RAPICORN_SIMPLE_FUNCTION
#if     !defined (INT64_MAX) || !defined (INT64_MIN) || !defined (UINT64_MAX)
#ifdef  LLONG_MAX       /* some gcc versions ship limits.h that fail to define LLONG_MAX for C99 */
#  define INT64_MAX     LLONG_MAX       // +9223372036854775807LL
#  define INT64_MIN     LLONG_MIN       // -9223372036854775808LL
#  define UINT64_MAX    ULLONG_MAX      // +18446744073709551615LLU
#else /* !LLONG_MAX but gcc always has __LONG_LONG_MAX__ */
#  define INT64_MAX     __LONG_LONG_MAX__
#  define INT64_MIN     (-INT64_MAX - 1LL)
#  define UINT64_MAX    (INT64_MAX * 2ULL + 1ULL)
#endif
#endif

/* --- likelyness hinting --- */
#define	RAPICORN__BOOL(expr)		__extension__ ({ bool _rapicorn__bool; if (expr) _rapicorn__bool = 1; else _rapicorn__bool = 0; _rapicorn__bool; })
#define	RAPICORN_ISLIKELY(expr)		__builtin_expect (RAPICORN__BOOL (expr), 1)
#define	RAPICORN_UNLIKELY(expr)		__builtin_expect (RAPICORN__BOOL (expr), 0)
#define	RAPICORN_LIKELY			RAPICORN_ISLIKELY

/* --- assertions and runtime errors --- */
#define RAPICORN_RETURN_IF_FAIL(e)	 do { if (RAPICORN_ISLIKELY (e)) break; RAPICORN__RUNTIME_PROBLEM ('R', RAPICORN_LOG_DOMAIN, __FILE__, __LINE__, RAPICORN_SIMPLE_FUNCTION, "%s", #e); return; } while (0)
#define RAPICORN_RETURN_VAL_IF_FAIL(e,v) do { if (RAPICORN_ISLIKELY (e)) break; RAPICORN__RUNTIME_PROBLEM ('R', RAPICORN_LOG_DOMAIN, __FILE__, __LINE__, RAPICORN_SIMPLE_FUNCTION, "%s", #e); return v; } while (0)
#define RAPICORN_ASSERT(e)		 do { if (RAPICORN_ISLIKELY (e)) break; RAPICORN__RUNTIME_PROBLEM ('A', RAPICORN_LOG_DOMAIN, __FILE__, __LINE__, RAPICORN_SIMPLE_FUNCTION, "%s", #e); while (1) *(void*volatile*)0; } while (0)
#define RAPICORN_ASSERT_NOT_REACHED()	 do { RAPICORN__RUNTIME_PROBLEM ('N', RAPICORN_LOG_DOMAIN, __FILE__, __LINE__, RAPICORN_SIMPLE_FUNCTION, NULL); RAPICORN_ABORT_NORETURN(); } while (0)
#define RAPICORN_WARNING(...)		 do { RAPICORN__RUNTIME_PROBLEM ('W', RAPICORN_LOG_DOMAIN, __FILE__, __LINE__, RAPICORN_SIMPLE_FUNCTION, __VA_ARGS__); } while (0)
#define RAPICORN_ERROR(...)		 do { RAPICORN__RUNTIME_PROBLEM ('E', RAPICORN_LOG_DOMAIN, __FILE__, __LINE__, RAPICORN_SIMPLE_FUNCTION, __VA_ARGS__); RAPICORN_ABORT_NORETURN(); } while (0)
#define RAPICORN_ABORT_NORETURN()	 rapicorn_abort_noreturn()

/* --- convenient aliases --- */
#ifdef  RAPICORN_INTERNALS
#define	ISLIKELY		RAPICORN_ISLIKELY
#define	UNLIKELY		RAPICORN_UNLIKELY
#define	LIKELY			RAPICORN_LIKELY
#define	STRINGIFY               RAPICORN_CPP_STRINGIFY
#define	return_if_fail		RAPICORN_RETURN_IF_FAIL
#define	return_val_if_fail	RAPICORN_RETURN_VAL_IF_FAIL
#define	assert_not_reached	RAPICORN_ASSERT_NOT_REACHED
#undef  assert
#define	assert			RAPICORN_ASSERT
#endif /* RAPICORN_INTERNALS */

/* --- preprocessor pasting --- */
#define RAPICORN_CPP_PASTE4i(a,b,c,d)             a ## b ## c ## d
#define RAPICORN_CPP_PASTE4(a,b,c,d)              RAPICORN_CPP_PASTE4i (a,b,c,d)
#define RAPICORN_CPP_PASTE3i(a,b,c)               a ## b ## c   /* indirection required to expand __LINE__ etc */
#define RAPICORN_CPP_PASTE3(a,b,c)                RAPICORN_CPP_PASTE3i (a,b,c)
#define RAPICORN_CPP_PASTE2i(a,b)                 a ## b        /* indirection required to expand __LINE__ etc */
#define RAPICORN_CPP_PASTE2(a,b)                  RAPICORN_CPP_PASTE2i (a,b)
#define RAPICORN_CPP_STRINGIFYi(s)                #s            /* indirection required to expand __LINE__ etc */
#define RAPICORN_CPP_STRINGIFY(s)                 RAPICORN_CPP_STRINGIFYi (s)
#define RAPICORN_STATIC_ASSERT_NAMED(expr,asname) typedef struct { char asname[(expr) ? 1 : -1]; } RAPICORN_CPP_PASTE2 (Rapicorn_StaticAssertion_LINE, __LINE__)
#define RAPICORN_STATIC_ASSERT(expr)              RAPICORN_STATIC_ASSERT_NAMED (expr, compile_time_assertion_failed)

/* --- attributes --- */
#if     __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
#define RAPICORN_PURE                             __attribute__ ((__pure__))
#define RAPICORN_MALLOC                           __attribute__ ((__malloc__))
#define RAPICORN_PRINTF(format_idx, arg_idx)      __attribute__ ((__format__ (__printf__, format_idx, arg_idx)))
#define RAPICORN_SCANF(format_idx, arg_idx)       __attribute__ ((__format__ (__scanf__, format_idx, arg_idx)))
#define RAPICORN_FORMAT(arg_idx)                  __attribute__ ((__format_arg__ (arg_idx)))
#define RAPICORN_NORETURN                         __attribute__ ((__noreturn__))
#define RAPICORN_CONST                            __attribute__ ((__const__))
#define RAPICORN_UNUSED                           __attribute__ ((__unused__))
#define RAPICORN_NO_INSTRUMENT                    __attribute__ ((__no_instrument_function__))
#define RAPICORN_DEPRECATED                       __attribute__ ((__deprecated__))
#define RAPICORN_ALWAYS_INLINE			__attribute__ ((always_inline))
#define RAPICORN_NEVER_INLINE			__attribute__ ((noinline))
#define RAPICORN_CONSTRUCTOR			__attribute__ ((constructor,used)) /* gcc-3.3 also needs "used" to emit code */
#define RAPICORN_MAY_ALIAS                        __attribute__ ((may_alias))
#else   /* !__GNUC__ */
#define RAPICORN_PURE
#define RAPICORN_MALLOC
#define RAPICORN_PRINTF(format_idx, arg_idx)
#define RAPICORN_SCANF(format_idx, arg_idx)
#define RAPICORN_FORMAT(arg_idx)
#define RAPICORN_NORETURN
#define RAPICORN_CONST
#define RAPICORN_UNUSED
#define RAPICORN_NO_INSTRUMENT
#define RAPICORN_DEPRECATED
#define RAPICORN_ALWAYS_INLINE
#define RAPICORN_NEVER_INLINE
#define RAPICORN_CONSTRUCTOR
#define RAPICORN_MAY_ALIAS
#error  Failed to detect a recent GCC version (>= 3.3)
#endif  /* !__GNUC__ */
#if     defined __GNUC__ && defined __cplusplus
#define	RAPICORN_SIMPLE_FUNCTION			(::Rapicorn::string_from_pretty_function_name (__PRETTY_FUNCTION__).c_str())
#else
#define	RAPICORN_SIMPLE_FUNCTION			(__func__)
#endif

/* --- provide canonical integer types --- */
#if 	RAPICORN_SIZEOF_SYS_TYPESH_UINT == 0
typedef unsigned int		uint;	/* for systems that don't define uint in types.h */
#else
RAPICORN_STATIC_ASSERT (RAPICORN_SIZEOF_SYS_TYPESH_UINT == 4);
#endif
RAPICORN_STATIC_ASSERT (sizeof (uint) == 4);
typedef uint8_t                 RapicornUInt8;  // __attribute__ ((__mode__ (__QI__)))
typedef uint16_t                RapicornUInt16; // __attribute__ ((__mode__ (__HI__)))
typedef uint32_t                RapicornUInt32; // __attribute__ ((__mode__ (__SI__)))
typedef uint64_t                RapicornUInt64; // __attribute__ ((__mode__ (__DI__)))
// Using stdint.h defines here for type compatibility with standard APIs (references, printf, ...)
// provided by rapicorncdefs.h: uint;
RAPICORN_STATIC_ASSERT (sizeof (RapicornUInt8)  == 1);
RAPICORN_STATIC_ASSERT (sizeof (RapicornUInt16) == 2);
RAPICORN_STATIC_ASSERT (sizeof (RapicornUInt32) == 4);
RAPICORN_STATIC_ASSERT (sizeof (RapicornUInt64) == 8);
typedef int8_t                  RapicornInt8;  // __attribute__ ((__mode__ (__QI__)))
typedef int16_t                 RapicornInt16; // __attribute__ ((__mode__ (__HI__)))
typedef int32_t                 RapicornInt32; // __attribute__ ((__mode__ (__SI__)))
typedef int64_t                 RapicornInt64; // __attribute__ ((__mode__ (__DI__)))<commit_msg>RCORE: use "long long" for int64 to preserve %llx on AMD64<commit_after>/* RapicornCDefs - C compatible definitions
 * Copyright (C) 2006 <NAME>
 *
 * This library is free software; you can redistribute it and/or
 * modify it 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.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * A copy of the GNU Lesser General Public License should ship along
 * with this library; if not, see http://www.gnu.org/copyleft/.
 */
#ifndef __RAPICORN_CDEFS_H__
#define __RAPICORN_CDEFS_H__

#include <rcore/rapicornconfig.h> /* _GNU_SOURCE */
#include <stdbool.h>
#include <stdarg.h>
#include <stddef.h>			/* NULL */
#include <sys/types.h>			/* uint, ssize */
#include <stdint.h>			/* uint64_t */
#include <limits.h>                     /* {INT|CHAR|...}_{MIN|MAX} */
#include <float.h>                      /* {FLT|DBL}_{MIN|MAX|EPSILON} */

RAPICORN_EXTERN_C_BEGIN();

/* --- standard macros --- */
#ifndef FALSE
#  define FALSE					false
#endif
#ifndef TRUE
#  define TRUE					true
#endif
#define RAPICORN_ABS(a)                       	((a) > -(a) ? (a) : -(a))
#define RAPICORN_MIN(a,b)                         ((a) <= (b) ? (a) : (b))
#define RAPICORN_MAX(a,b)                         ((a) >= (b) ? (a) : (b))
#define RAPICORN_CLAMP(v,mi,ma)                   ((v) < (mi) ? (mi) : ((v) > (ma) ? (ma) : (v)))
#define RAPICORN_ARRAY_SIZE(array)		(sizeof (array) / sizeof ((array)[0]))
#undef ABS
#define ABS                                     RAPICORN_ABS
#undef MIN
#define MIN                                     RAPICORN_MIN
#undef MAX
#define MAX                                     RAPICORN_MAX
#undef CLAMP
#define CLAMP                                   RAPICORN_CLAMP
#undef ARRAY_SIZE
#define ARRAY_SIZE				RAPICORN_ARRAY_SIZE
#undef EXTERN_C
#ifdef	__cplusplus
#define EXTERN_C                                extern "C"
#else
#define EXTERN_C                                extern
#endif
#undef STRFUNC
#define STRFUNC				        RAPICORN_SIMPLE_FUNCTION
#if     !defined (INT64_MAX) || !defined (INT64_MIN) || !defined (UINT64_MAX)
#ifdef  LLONG_MAX       /* some gcc versions ship limits.h that fail to define LLONG_MAX for C99 */
#  define INT64_MAX     LLONG_MAX       // +9223372036854775807LL
#  define INT64_MIN     LLONG_MIN       // -9223372036854775808LL
#  define UINT64_MAX    ULLONG_MAX      // +18446744073709551615LLU
#else /* !LLONG_MAX but gcc always has __LONG_LONG_MAX__ */
#  define INT64_MAX     __LONG_LONG_MAX__
#  define INT64_MIN     (-INT64_MAX - 1LL)
#  define UINT64_MAX    (INT64_MAX * 2ULL + 1ULL)
#endif
#endif

/* --- likelyness hinting --- */
#define	RAPICORN__BOOL(expr)		__extension__ ({ bool _rapicorn__bool; if (expr) _rapicorn__bool = 1; else _rapicorn__bool = 0; _rapicorn__bool; })
#define	RAPICORN_ISLIKELY(expr)		__builtin_expect (RAPICORN__BOOL (expr), 1)
#define	RAPICORN_UNLIKELY(expr)		__builtin_expect (RAPICORN__BOOL (expr), 0)
#define	RAPICORN_LIKELY			RAPICORN_ISLIKELY

/* --- assertions and runtime errors --- */
#define RAPICORN_RETURN_IF_FAIL(e)	 do { if (RAPICORN_ISLIKELY (e)) break; RAPICORN__RUNTIME_PROBLEM ('R', RAPICORN_LOG_DOMAIN, __FILE__, __LINE__, RAPICORN_SIMPLE_FUNCTION, "%s", #e); return; } while (0)
#define RAPICORN_RETURN_VAL_IF_FAIL(e,v) do { if (RAPICORN_ISLIKELY (e)) break; RAPICORN__RUNTIME_PROBLEM ('R', RAPICORN_LOG_DOMAIN, __FILE__, __LINE__, RAPICORN_SIMPLE_FUNCTION, "%s", #e); return v; } while (0)
#define RAPICORN_ASSERT(e)		 do { if (RAPICORN_ISLIKELY (e)) break; RAPICORN__RUNTIME_PROBLEM ('A', RAPICORN_LOG_DOMAIN, __FILE__, __LINE__, RAPICORN_SIMPLE_FUNCTION, "%s", #e); while (1) *(void*volatile*)0; } while (0)
#define RAPICORN_ASSERT_NOT_REACHED()	 do { RAPICORN__RUNTIME_PROBLEM ('N', RAPICORN_LOG_DOMAIN, __FILE__, __LINE__, RAPICORN_SIMPLE_FUNCTION, NULL); RAPICORN_ABORT_NORETURN(); } while (0)
#define RAPICORN_WARNING(...)		 do { RAPICORN__RUNTIME_PROBLEM ('W', RAPICORN_LOG_DOMAIN, __FILE__, __LINE__, RAPICORN_SIMPLE_FUNCTION, __VA_ARGS__); } while (0)
#define RAPICORN_ERROR(...)		 do { RAPICORN__RUNTIME_PROBLEM ('E', RAPICORN_LOG_DOMAIN, __FILE__, __LINE__, RAPICORN_SIMPLE_FUNCTION, __VA_ARGS__); RAPICORN_ABORT_NORETURN(); } while (0)
#define RAPICORN_ABORT_NORETURN()	 rapicorn_abort_noreturn()

/* --- convenient aliases --- */
#ifdef  RAPICORN_INTERNALS
#define	ISLIKELY		RAPICORN_ISLIKELY
#define	UNLIKELY		RAPICORN_UNLIKELY
#define	LIKELY			RAPICORN_LIKELY
#define	STRINGIFY               RAPICORN_CPP_STRINGIFY
#define	return_if_fail		RAPICORN_RETURN_IF_FAIL
#define	return_val_if_fail	RAPICORN_RETURN_VAL_IF_FAIL
#define	assert_not_reached	RAPICORN_ASSERT_NOT_REACHED
#undef  assert
#define	assert			RAPICORN_ASSERT
#endif /* RAPICORN_INTERNALS */

/* --- preprocessor pasting --- */
#define RAPICORN_CPP_PASTE4i(a,b,c,d)             a ## b ## c ## d
#define RAPICORN_CPP_PASTE4(a,b,c,d)              RAPICORN_CPP_PASTE4i (a,b,c,d)
#define RAPICORN_CPP_PASTE3i(a,b,c)               a ## b ## c   /* indirection required to expand __LINE__ etc */
#define RAPICORN_CPP_PASTE3(a,b,c)                RAPICORN_CPP_PASTE3i (a,b,c)
#define RAPICORN_CPP_PASTE2i(a,b)                 a ## b        /* indirection required to expand __LINE__ etc */
#define RAPICORN_CPP_PASTE2(a,b)                  RAPICORN_CPP_PASTE2i (a,b)
#define RAPICORN_CPP_STRINGIFYi(s)                #s            /* indirection required to expand __LINE__ etc */
#define RAPICORN_CPP_STRINGIFY(s)                 RAPICORN_CPP_STRINGIFYi (s)
#define RAPICORN_STATIC_ASSERT_NAMED(expr,asname) typedef struct { char asname[(expr) ? 1 : -1]; } RAPICORN_CPP_PASTE2 (Rapicorn_StaticAssertion_LINE, __LINE__)
#define RAPICORN_STATIC_ASSERT(expr)              RAPICORN_STATIC_ASSERT_NAMED (expr, compile_time_assertion_failed)

/* --- attributes --- */
#if     __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
#define RAPICORN_PURE                             __attribute__ ((__pure__))
#define RAPICORN_MALLOC                           __attribute__ ((__malloc__))
#define RAPICORN_PRINTF(format_idx, arg_idx)      __attribute__ ((__format__ (__printf__, format_idx, arg_idx)))
#define RAPICORN_SCANF(format_idx, arg_idx)       __attribute__ ((__format__ (__scanf__, format_idx, arg_idx)))
#define RAPICORN_FORMAT(arg_idx)                  __attribute__ ((__format_arg__ (arg_idx)))
#define RAPICORN_NORETURN                         __attribute__ ((__noreturn__))
#define RAPICORN_CONST                            __attribute__ ((__const__))
#define RAPICORN_UNUSED                           __attribute__ ((__unused__))
#define RAPICORN_NO_INSTRUMENT                    __attribute__ ((__no_instrument_function__))
#define RAPICORN_DEPRECATED                       __attribute__ ((__deprecated__))
#define RAPICORN_ALWAYS_INLINE			__attribute__ ((always_inline))
#define RAPICORN_NEVER_INLINE			__attribute__ ((noinline))
#define RAPICORN_CONSTRUCTOR			__attribute__ ((constructor,used)) /* gcc-3.3 also needs "used" to emit code */
#define RAPICORN_MAY_ALIAS                        __attribute__ ((may_alias))
#else   /* !__GNUC__ */
#define RAPICORN_PURE
#define RAPICORN_MALLOC
#define RAPICORN_PRINTF(format_idx, arg_idx)
#define RAPICORN_SCANF(format_idx, arg_idx)
#define RAPICORN_FORMAT(arg_idx)
#define RAPICORN_NORETURN
#define RAPICORN_CONST
#define RAPICORN_UNUSED
#define RAPICORN_NO_INSTRUMENT
#define RAPICORN_DEPRECATED
#define RAPICORN_ALWAYS_INLINE
#define RAPICORN_NEVER_INLINE
#define RAPICORN_CONSTRUCTOR
#define RAPICORN_MAY_ALIAS
#error  Failed to detect a recent GCC version (>= 3.3)
#endif  /* !__GNUC__ */
#if     defined __GNUC__ && defined __cplusplus
#define	RAPICORN_SIMPLE_FUNCTION			(::Rapicorn::string_from_pretty_function_name (__PRETTY_FUNCTION__).c_str())
#else
#define	RAPICORN_SIMPLE_FUNCTION			(__func__)
#endif

/* --- provide canonical integer types --- */
#if 	RAPICORN_SIZEOF_SYS_TYPESH_UINT == 0
typedef unsigned int		uint;	/* for systems that don't define uint in types.h */
#else
RAPICORN_STATIC_ASSERT (RAPICORN_SIZEOF_SYS_TYPESH_UINT == 4);
#endif
RAPICORN_STATIC_ASSERT (sizeof (uint) == 4);
typedef uint8_t                 RapicornUInt8;  // __attribute__ ((__mode__ (__QI__)))
typedef uint16_t                RapicornUInt16; // __attribute__ ((__mode__ (__HI__)))
typedef uint32_t                RapicornUInt32; // __attribute__ ((__mode__ (__SI__)))
typedef unsigned long long int  RapicornUInt64; // __attribute__ ((__mode__ (__DI__)))
// typedef uint64_t RapicornUInt64; // uint64_t is a long on AMD64 which breaks printf
// Using stdint.h defines here for type compatibility with standard APIs (references, printf, ...)
// provided by rapicorncdefs.h: uint;
RAPICORN_STATIC_ASSERT (sizeof (RapicornUInt8)  == 1);
RAPICORN_STATIC_ASSERT (sizeof (RapicornUInt16) == 2);
RAPICORN_STATIC_ASSERT (sizeof (RapicornUInt32) == 4);
RAPICORN_STATIC_ASSERT (sizeof (RapicornUInt64) == 8);
typedef int8_t                  RapicornInt8;  // __attribute__ ((__mode__ (__QI__)))
typedef int16_t                 RapicornInt16; // __attribute__ ((__mode__ (__HI__)))
typedef int32_t                 RapicornInt32; // __attribute__ ((__mode__ (__SI__)))
typedef signed long long int    RapicornInt64; // __attribute__ ((__mode__ (__DI__)))
// typedef int64_t RapicornInt64; // int64_t is a long on AMD64 which breaks printf
{'fraction_non_alphanumeric': 0.10433960281601345, 'fraction_numerical': 0.01838814752548072, 'mean_word_length': 3.5170859041290936, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3671440', 'n_tokens_mistral': 7428, 'n_tokens_neox': 6740, 'n_words': 1559}