neovim/neovim — pull request #91 by scott-linder (2014-02-23 22:13:32+00:00)
Title: Convert function declarations from K&R to ANSI style.

My stab at issue #65 by Gaelan who is working line-by-line and taking a lot more care.

Some notes:

* I used [cproto](http://invisible-island.net/cproto/) to do the conversion and have not verified every single change; manual tweaks were made only when errors arose.
* I modified the cproto grammar to accept vim specific typedefs, which it for some reason did not pick up on automatically.
* Two files were troublesome (`mbyte.c` and `os_unix.c`) and so I simply skipped them for now (they are still in the old style). This is not a problem because the two styles can coexist without issue.
* Comments in parameter declarations were preserved, but use of macros like `UNUSED` were simply removed altogether.
* Because these changes are not complete I am leaving this in a branch so others can help vet the changes for correctness and continue the work before we decide whether or not to include the changes at all.

The point about the `UNUSED` macro may or may not be an issue; here is my rationale for removing it:
* The macro was specific to compilers which defined a specific `__attribute__`, even though there are solutions which are more general; these general solutions, however, require a macro parameter and cannot be used in the format parameter list so the conversion is nontrivial and will probably require manual intervention anyway. (One example of such a macro is [here](http://stackoverflow.com/questions/3599160/unused-parameter-warnings-in-c-code#3599170))
* Many compilers offer a means of ignoring warning on unused parameters (for example GCCs `-Wno-unused-parameter`) which makes the addition of macros in the code unnecessary.
* While the `UNUSED` macro is certainly good documentation, it could easily become stale and lead to confusion. If it is solely included for documentation it could just as well be a comment.

Let me know what you think.