<commit_before>#include <windows.h>

#include <stdio.h>

#include "TestUtil.cc"

int main() {
    const HANDLE conout = openConout();

    CONSOLE_SCREEN_BUFFER_INFO info = {};
    BOOL ret = GetConsoleScreenBufferInfo(conout, &info);
    ASSERT(ret && "GetConsoleScreenBufferInfo failed");

    trace("srWindow={L=%d,T=%d,R=%d,B=%d}", info.srWindow.Left, info.srWindow.Top, info.srWindow.Right, info.srWindow.Bottom);
    printf("srWindow={L=%d,T=%d,R=%d,B=%d}\n", info.srWindow.Left, info.srWindow.Top, info.srWindow.Right, info.srWindow.Bottom);

    trace("dwSize=%d,%d", info.dwSize.X, info.dwSize.Y);
    printf("dwSize=%d,%d\n", info.dwSize.X, info.dwSize.Y);

    const HWND hwnd = GetConsoleWindow();
    if (hwnd != NULL) {
        RECT r = {};
        if (GetWindowRect(hwnd, &r)) {<commit_msg>GetConsolePos: also print the cursor position<commit_after>#include <windows.h>

#include <stdio.h>

#include "TestUtil.cc"

int main() {
    const HANDLE conout = openConout();

    CONSOLE_SCREEN_BUFFER_INFO info = {};
    BOOL ret = GetConsoleScreenBufferInfo(conout, &info);
    ASSERT(ret && "GetConsoleScreenBufferInfo failed");

    trace("cursor=%d,%d", info.dwCursorPosition.X, info.dwCursorPosition.Y);
    printf("cursor=%d,%d\n", info.dwCursorPosition.X, info.dwCursorPosition.Y);

    trace("srWindow={L=%d,T=%d,R=%d,B=%d}", info.srWindow.Left, info.srWindow.Top, info.srWindow.Right, info.srWindow.Bottom);
    printf("srWindow={L=%d,T=%d,R=%d,B=%d}\n", info.srWindow.Left, info.srWindow.Top, info.srWindow.Right, info.srWindow.Bottom);

    trace("dwSize=%d,%d", info.dwSize.X, info.dwSize.Y);
    printf("dwSize=%d,%d\n", info.dwSize.X, info.dwSize.Y);

    const HWND hwnd = GetConsoleWindow();
    if (hwnd != NULL) {
        RECT r = {};
        if (GetWindowRect(hwnd, &r)) {
{'fraction_non_alphanumeric': 0.18777777777777777, 'fraction_numerical': 0.0, 'mean_word_length': 4.392215568862276, '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': '5733358', 'n_tokens_mistral': 682, 'n_tokens_neox': 664, 'n_words': 109}