I'm probably in the minority here, I don't know, but while I haven't dug deeply into the code I'd immediately say throw some comments in dude, at least above functions and shit....for me comments aren't just about what they say, they create a visual breakup of the page which makes it easier to reason about where blocks of functionality begin/end. When you have shitty eyes like me and you have been staring at a screen all day, a wall of code with no comments breaking up the functions/methods starts to blur and is sometimes hard to tell the horizontal alignment at quick glance and differentiate blocks that are full functions and blocks that are large blocks within a function.
Thats just me though...it is more about visual appearance and helping me quickly see the logical breakdown/structure of a file so I can get to the code I want quicker.
I'll try to read through it later, but props to anybody building a project in C...I need to come up with a new pet project in C because I'm so rusty I don't think I've written C in like 7+ years.