<commit_before>#pragma once

#include <stdbool.h>
#include "device.h"

#define DISPLAY_WIDTH  80
#define DISPLAY_HEIGHT 24

typedef struct panel {
    int x, y, w, h;
    struct {
        uint16_t c;
        bool transparent;
        font_t font;
    } tiles[DISPLAY_WIDTH][DISPLAY_HEIGHT];
    struct panel *next;
} panel_t;

void display_init(void);
void display_free(void);
void display_push(panel_t *);
void display_pop(void);
void display_refresh(void);
void display_invalidate(void);
int  display_getch(void);

void     panel_init(panel_t *, int x, int y, int w, int h);
void     panel_center_init(panel_t *, int w, int h);
void     panel_free(panel_t *);
void     panel_putc(panel_t *, int x, int y, font_t, uint16_t);
void     panel_puts(panel_t *, int x, int y, font_t, const char *);
void     panel_printf(panel_t *, int x, int y, const char *format, ...);
void     panel_attr(panel_t *, int x, int y, font_t);
void     panel_erase(panel_t *, int x, int y);
void     panel_clear(panel_t *);
uint16_t panel_getc(panel_t *, int x, int y);
void     panel_fill(panel_t *, font_t, uint16_t);
void     panel_border(panel_t *, font_t);<commit_msg>Mark panel_printf() as a format function.<commit_after>#pragma once

#include <stdbool.h>
#include "device.h"

#define DISPLAY_WIDTH  80
#define DISPLAY_HEIGHT 24

typedef struct panel {
    int x, y, w, h;
    struct {
        uint16_t c;
        bool transparent;
        font_t font;
    } tiles[DISPLAY_WIDTH][DISPLAY_HEIGHT];
    struct panel *next;
} panel_t;

void display_init(void);
void display_free(void);
void display_push(panel_t *);
void display_pop(void);
void display_refresh(void);
void display_invalidate(void);
int  display_getch(void);

void     panel_init(panel_t *, int x, int y, int w, int h);
void     panel_center_init(panel_t *, int w, int h);
void     panel_free(panel_t *);
void     panel_putc(panel_t *, int x, int y, font_t, uint16_t);
void     panel_puts(panel_t *, int x, int y, font_t, const char *);
void     panel_printf(panel_t *, int x, int y, const char *format, ...)
    __attribute__ ((format (printf, 4, 5)));
void     panel_attr(panel_t *, int x, int y, font_t);
void     panel_erase(panel_t *, int x, int y);
void     panel_clear(panel_t *);
uint16_t panel_getc(panel_t *, int x, int y);
void     panel_fill(panel_t *, font_t, uint16_t);
void     panel_border(panel_t *, font_t);
{'fraction_non_alphanumeric': 0.11930860033726813, 'fraction_numerical': 0.010961214165261383, 'mean_word_length': 3.94375, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6553348', 'n_tokens_mistral': 881, 'n_tokens_neox': 853, 'n_words': 245}