I’m currently in the process of writing my LTTP (Lightweight Text Transfer Protocol) and in the process of creating a text-based client I hit a snag where I needed ncurses functionality but I also didn’t want people on Windows to need to enable the Linux subsystem in Windows 10 in order to use the lttp client. For this I wrapped some of the most primitive functions that I needed for both ncurses and the Windows Console API.

For anyone looking to do the same thing and wanting to save a few minutes of not having to write a wrapper yourself, you can find the C code on my LTTP GitHub repository. Here is the header file and here is the code file, feel free to copy them and use/modify them as you wish!

I did not spend a ton of time on this wrapper (just a single afternoon of reading both documentations and writing it). So if you make any fixes or upgrades, I would love for you to shoot them my way!