Den 23-12-2011 03:58, Arun Persaud skrev:
Hi
how about running "indent -gnu" across all source files and then add a
pre-commit git hook to make sure that it stays that way?
Well, I would in my opinion make the sources easier to read, but I don't
have strong feelings about this.
Another thing I could suggest if everything is reformated anyway is to
get rid of the traditional C style for functions. So instead of
int MyFunc(a, b, c)
char a, b
int c
{
...
use
int MyFunc(char a, char b, int c)
{
...
I don't know if any compilers anymore is dependent of the traditional
style, I certainly don't know any that is.
But if they exist, they already for some time haven't been able to
compile xboard anyway because there already is a few uses around of the
new style (e.g. ics_printf() in backend.c).
Another "new" thing I had like to use, is the const qualifier. It can
help finding bugs, and it allows for more aggresive optimisation.
Regards
- Byrial