C89 compat

A number of changes to make the code C89-compatible; mainly tested for Visual Studio 2012. There are no significant changes.

- Replacement for inline keyword
- Use struct hack
- Cannot statically initialise structs with non-const values
- Unknown size for void *
- Declare variables at start of scope
- No INFINITY
- Other compiler warning fixes