In general, discussion should happen in tickets, I had to search emails for this instead of just continuing in correct ticket.
On 2 March 2013 17:30, Imhotep <jmho...@slehr.de> wrote: >> - I don't point out all the individual style issues from this version, >> please >> check it against doc/CodingStyle and once you submit updated version I can >> point out the remaining ones >> > > I have tried, and done some, but there sure are issues left. > I do indentation automatically via emacs, c-style "gnu". I changed this to > "k&r". > To check, I ran it on a copy of aiferry.c and compared with the original > version. > No success. > I ran indent -kr -i2 -l77 on aiferry.c and compared with the original > version ... it looked completely different. Not all of the old freeciv codebase is of the codingstyle we currently require of new submissions. In general style of the old code is updated only when it's anyway touched by some patch. > CodingStyle says "Declaring variables in the middle of the function body is > forbidden" > which is fairly reasonable because you don't want to look for variable > declaration in every odd places. > > But I'm not sure if it is meant to hold also for variables that are used > only inside of blocks. That should read "... middle of the *code block* is forbidden." It's mainly for compatibility with old C89 where variable declarations after first real line of code simply were forbidden (some compilers may rely on this) > Another style question: > I have put some snippets inside of braces, so it would be easier to move > them if necessary. > I didn't find anything in the CodingStyle to ban this, but then again, some > things might be so horrible > that most sane people wouldn't even be able to imagine. Well, that's something to consider case by case, I guess. I don't see how having them inside braces would make moving them easier, but sometimes one wants to limit visibility of a a variable to a smaller block. >> - gameloss_style should be documented in ruleset comments >> > > In every game.ruleset or is there some global document I am not aware of? game.ruleset. - ML _______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev