<commit_before>#include "gui.h"

#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <math.h>

static void *gui_frame_alloc(GuiContext *ctx, int size);

const int gui_zero_v2i[2] = {0};

#if defined(_MSC_VER) && _MSC_VER <= 1800 // MSVC 2013
size_t gui_v_sprintf_impl(char *buf, size_t count, const char *fmt, va_list args)
{
	size_t ret = _vsnprintf(buf, count, fmt, args);
	// Fix unsafeness of msvc _vsnprintf
	if (buf && count > 0)
		buf[count - 1] = '\0';
	return ret;
}

void gui_sprintf_impl(char *buf, size_t count, const char *fmt, ...)
{
	va_list args;
	va_start(args, fmt);
	v_sprintf_impl(buf, count, fmt, args);
	va_end(args);
}
#endif

#define GUI_MAX(a, b) ((a > b) ? (a) : (b))
#define GUI_MIN(a, b) ((a < b) ? (a) : (b))
#define GUI_CLAMP(v, a, b) (GUI_MIN(GUI_MAX((v), (a)), (b)))
#define GUI_ABS(x) ((x) < 0 ? (-x) : x)
#define GUI_LAYERS_PER_WINDOW 10000 // Maybe 10k layers inside a window is enough
#define GUI_UNUSED(x) (void)(x) // For unused params. C doesn't allow omitting param name.
#define GUI_TRUE 1
#define GUI_FALSE 0

#define GUI_NONE_WINDOW_IX (-2)
#define GUI_BG_WINDOW_IX (-1)

static void *check_ptr(void *ptr)
{
	if (!ptr) {
		abort();
	}<commit_msg>Fixed typo<commit_after>#include "gui.h"

#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <math.h>

static void *gui_frame_alloc(GuiContext *ctx, int size);

const int gui_zero_v2i[2] = {0};

#if defined(_MSC_VER) && _MSC_VER <= 1800 // MSVC 2013
size_t gui_v_sprintf_impl(char *buf, size_t count, const char *fmt, va_list args)
{
	size_t ret = _vsnprintf(buf, count, fmt, args);
	// Fix unsafeness of msvc _vsnprintf
	if (buf && count > 0)
		buf[count - 1] = '\0';
	return ret;
}

void gui_sprintf_impl(char *buf, size_t count, const char *fmt, ...)
{
	va_list args;
	va_start(args, fmt);
	gui_v_sprintf_impl(buf, count, fmt, args);
	va_end(args);
}
#endif

#define GUI_MAX(a, b) ((a > b) ? (a) : (b))
#define GUI_MIN(a, b) ((a < b) ? (a) : (b))
#define GUI_CLAMP(v, a, b) (GUI_MIN(GUI_MAX((v), (a)), (b)))
#define GUI_ABS(x) ((x) < 0 ? (-x) : x)
#define GUI_LAYERS_PER_WINDOW 10000 // Maybe 10k layers inside a window is enough
#define GUI_UNUSED(x) (void)(x) // For unused params. C doesn't allow omitting param name.
#define GUI_TRUE 1
#define GUI_FALSE 0

#define GUI_NONE_WINDOW_IX (-2)
#define GUI_BG_WINDOW_IX (-1)

static void *check_ptr(void *ptr)
{
	if (!ptr) {
		abort();
	}
{'fraction_non_alphanumeric': 0.1689106487148103, 'fraction_numerical': 0.021215830273357814, 'mean_word_length': 4.572727272727272, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 17, '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': '1486351', 'n_tokens_mistral': 1103, 'n_tokens_neox': 1035, 'n_words': 291}