Yeah, 500 lines of poorly formatted code containing goto's is not a good start.

You have a lot of printf's in there, perhaps you could post those as well.
Bear in mind that either we can't run your code at all (or are generally too busy), it's up to you to be as detailed as possible.