The code was written in C++ on a Macintosh, but I've endeavored to keep the collision detection code close to ANSI C. Porting it should be a 30 minute affair. The testing-timing harness is C++- and Macintosh-specific, so it will take, say, an hour longer to port that, if you feel so inclined.
Kernighan and Plauger's The Elements of Programming Style was an important and rightly influential book. But sometimes I feel its concise rules were taken as a cookbook approach to good style instead of the succinct expression of a philosophy they were meant to be. If the book claims that variable names should be chosen meaningfully, doesn't it then follow that variables whose names are small essays on their use are even better? Isn't MaximumValueUntilOverflow a better name than maxval? I don't think so.