Be C89 friendly, declare variables on the top of the functions
Merge pull request #6 from linquize/c89

C89