I did a conversion for the source code to Lite-C.
It had some major quirks, but compiles now.

The problem is that I get some sort of empty pointer error in the add_segment() function which I can't seem to figure out in all this Spaghetti code.

Guess I'm stuck with this... frown