I consider this tool "finished" now with v1.1:
https://github.com/Zirias/dos2ansi/releases/tag/v1.1 ... mainly because there are no "missing" features left I can think about
It's now really
far more than "display CP437" (although it can of course do
that), and it was an interesting journey for sure.
On the bright side, because on the way, I improved my personal "toolbox" again. I now have a flexible "Stream" abstraction (with stackable readers and writers) in C. This seemed the sanest way to decouple different aspects of the tool, like encoding color information, translating 16bit BMP codepoints to UTF8/UTF16/UTF16LE, buffering, while not having to care whether this happens in memory, on stdin/stdout or on some actual file. I also have a new feature in my own little "pet buildsystem" reyling on nothing but GNU make, it can finally substitute "tokens" in files (
without calling sed).
On the "interesing" (like in WTF) side, well ... I even rerolled the latest release for a tiny change in the build system for some misbehavior that only manifested when trying to build a FreeBSD port, just refer to the
commit fixing it for "amusement". Also interesting how
FreeBSD's stdio behaves in absence of a buffer ... and another thing hitting me by surprise was the alway WTF-inducing win32 API,
FlushFileBuffers() fails when called on a
HANDLE
that refers to a "Console" (because this doesn't have buffers ... ah, sure!). Of course I should have read the whole docs first to avoid that trap. Not that it would make any sense though, if I have to
know in my code whether I'm dealing with a Console or some other I/O HANDLE, the whole point of abstraction goes down the drain. ?
Well, writing all this just for interested fellow coders ?
If you want to test the tool, here's a port now you could apply with
git am
if you want: