It's not looking too bad, but here are some improvements.

Indentation (see SourceForge.net: Indentation - cpwiki) could be better in places.
In particular, code following an opening brace is a...