<commit_before>#include <fudge.h>
#include <abi.h>
#include "util.h"
#include "widget.h"
#include "pool.h"
#include "place.h"

#define WINDOWPADDING                   16

static void placebutton(struct widget *widget, int x, int y, unsigned int w, unsigned int h)
{

    widget->position.x = x;
    widget->position.y = y;
    widget->size.w = 200;
    widget->size.h = 80;

}

static void placecontainerfloat(struct widget *widget, int x, int y, unsigned int w, unsigned int h)
{

    struct list_item *current = 0;

    while ((current = pool_nextin(current, widget->id)))
    {

        struct widget *child = current->data;

        place_widget(child, x, y, w, h);

    }

    widget->position.x = x;
    widget->position.y = y;
    widget->size.w = w;
    widget->size.h = h;

}

static void placecontainerhorizontal(struct widget *widget, int x, int y, unsigned int w, unsigned int h)
{

    struct list_item *current = 0;
    int cw = 0;

    while ((current = pool_nextin(current, widget->id)))
    {

        struct widget *child = current->data;

        place_widget(child, x + cw, y, 0, h);
        child->size.h = util_clamp(child->size.h, 0, h);
        child->size.w = util_clamp(child->size.w, 0, w - cw);

        cw += child->size.w;

    }

    widget->position.x = x;
    widget->position.y = y;
    widget->size.w = util_clamp(cw, 0, w);
    widget->size.h = h;

}


static void placecontainervertical(struct widget *widget, int x, int y, unsigned int w, unsigned int h)
{

    struct list_item *current = 0;
    int ch = 0;

    while ((current = pool_nextin(current, widget->id)))
    {

        struct widget *child = current->data;

        place_widget(child, x, y + ch, w, 0);
        child->size.h = util_clamp(child->size.h, 0, h - ch);
        child->size.w = util_clamp(child->size.w, 0, w);<commit_msg>more<commit_after>#include <fudge.h>
#include <abi.h>
#include "util.h"
#include "widget.h"
#include "pool.h"
#include "place.h"

#define WINDOWPADDING                   16

static void placebutton(struct widget *widget, int x, int y, unsigned int w, unsigned int h)
{

    widget->position.x = x;
    widget->position.y = y;
    widget->size.w = 200;
    widget->size.h = 80;

}

static void placecontainerfloat(struct widget *widget, int x, int y, unsigned int w, unsigned int h)
{

    struct list_item *current = 0;

    while ((current = pool_nextin(current, widget->id)))
    {

        struct widget *child = current->data;

        place_widget(child, x, y, w, h);

    }

    widget->position.x = x;
    widget->position.y = y;
    widget->size.w = w;
    widget->size.h = h;

}

static void placecontainerhorizontal(struct widget *widget, int x, int y, unsigned int w, unsigned int h)
{

    struct list_item *current = 0;
    int cw = 0;

    while ((current = pool_nextin(current, widget->id)))
    {

        struct widget *child = current->data;

        place_widget(child, x + cw, y, 0, h);
        child->size.h = util_clamp(child->size.h, 0, h);
        child->size.w = util_clamp(child->size.w, 0, w - cw);

        cw += child->size.w;

    }

    widget->position.x = x;
    widget->position.y = y;
    widget->size.w = util_clamp(cw, 0, w);
    widget->size.h = h;

}

static void placecontainervertical(struct widget *widget, int x, int y, unsigned int w, unsigned int h)
{

    struct list_item *current = 0;
    int ch = 0;

    while ((current = pool_nextin(current, widget->id)))
    {

        struct widget *child = current->data;

        place_widget(child, x, y + ch, w, 0);
        child->size.h = util_clamp(child->size.h, 0, h - ch);
        child->size.w = util_clamp(child->size.w, 0, w);
{'fraction_non_alphanumeric': 0.1469945355191257, 'fraction_numerical': 0.010382513661202186, 'mean_word_length': 2.5751953125, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 61, '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': '1496354', 'n_tokens_mistral': 1334, 'n_tokens_neox': 1260, 'n_words': 359}