I dare to recommend you not trying to work with other's code until you become acquainted with syntax yourself. :)
what do you want of this program and why here are these defines instead of functions? some messy horror.
I mean that the idea of the code looks understandable, but this approach to writing programs should be definitely considered a sin. It is not debuggable.