I know no-one here does C at all, but hey, I had to post the results of my all-nighter somewhere
It’s pretty crappy in terms of code quality, I’m sure, and I haven’t really tested anything… and it abuses preprocessor macros a whole load… but it works! (sorta :P)