On Wednesday, January 7, 2026, Thiago Macieira wrote:
I don't see ncurses or Win32 (even in "lean and mean mode") ever fixing
themselves.
I include <Windows.h> in just one source file in the entire program, and I call that source file "windows_bomb_chamber.c", and then I export a few stub functions from that translation unit so that other source files can use the Win32 API. My header file "windows_bomb_chamber.h" then defines a few types I need which can be found here:
Recently I was working on a project in work where the last guy had included <Windows.h> just so that he could use the macro WINAPI just in case the program got built for 32-bit x86 and needed __stdcall. I told him this was massive overkill and replaced it with a preprocessor if-else ladder to define WINAPI appropriately for the platform. Turns out the if-else ladder wasn't needed because __stdcall is ignored if you're not on 32-Bit x86.
There probably has never been a worse header file than <Windows.h>.