<commit_before>#include <cstdarg>
#include <ncurses.h>

static const char* mes = NULL;
extern bool showing_message;
bool showing_message = false;

static void showmes() {
    int y,x,rows,_;
    getyx(stdscr,y,x);
    getmaxyx(stdscr,rows,_);
    move(rows-1,0);

    clrtoeol();
    printw(mes);

    move(y,x);
}

void hook_show_message() {
    if(showing_message) {
        showmes();
        showing_message = false;
    }
}

void show_message(const char* message) {
    showing_message = true;
    mes = message;
    showmes();
}

void clear_message() {
    mes = "";
    showmes();
}<commit_msg>Use ``%s`` in first arg of ``printw`` to prevent errors<commit_after>#include <cstdarg>
#include <ncurses.h>

static const char* mes = NULL;
extern bool showing_message;
bool showing_message = false;

static void showmes() {
    int y,x,rows,_;
    getyx(stdscr,y,x);
    getmaxyx(stdscr,rows,_);
    move(rows-1,0);

    clrtoeol();
    printw("%s",mes);

    move(y,x);
}

void hook_show_message() {
    if(showing_message) {
        showmes();
        showing_message = false;
    }
}

void show_message(const char* message) {
    showing_message = true;
    mes = message;
    showmes();
}

void clear_message() {
    mes = "";
    showmes();
}
{'fraction_non_alphanumeric': 0.1465172137710168, 'fraction_numerical': 0.0032025620496397116, 'mean_word_length': 3.251700680272109, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1958790', 'n_tokens_mistral': 466, 'n_tokens_neox': 458, 'n_words': 99}