Update project to 89 ANSI C standard

Finally that bug is fixed. Turns out that the GCC compiler was allowing
variable declarations in the middle of code blocks because of some
library that is included by default. Well now that is fixed and I have
updated all references to have variable declarations to start at the top
of code blocks.
Didn't return the result

Make sure that we return the result of the subroutine.