I have no knowledge of C, but reading their code I was surprised to see some gotos ... is this OK in C to use goto ?
See http://eli.thegreenplace.net/2009/04/27/using-goto-for-error... for a short rundown, or http://blog.regehr.org/archives/894 where regehr — who works specifically in correctness and verifiability — states:
> many people, including me, prefer the goto version
Also, a common use of goto in C is when you're doing something in nested for loops and want to break out of all of them. A goto is actually much cleaner here than using sentinel values or boolean flags, or naughty things like setting your loop variables to be outside of the conditional bounds.
Every conditional is a goto (jump) at the machine level.