Hi, On 19 January 2012 10:25, Guillem Jover <[email protected]> wrote: > On Wed, 2012-01-18 at 14:02:01 +1100, Daniel Stone wrote: >> So, the commit in my coding-style xserver branch is simply the result of >> running this: >> indent -linux -bad -bap -blf -bli0 -br -brs -cbi0 -cdw -nce -cs -i4 -hnl >> -l80 -lc80 -lp -nbbo -nbc -nbfda -nprs -npcs -npsl -saf -sai -saw -nut >> across *.c and *.h in the X server tree. No more, no less. The build >> seems to continue to work just fine. Don't be scared by the -linux; >> it just provides a set of reasonable default options. Pretty much >> everything else was just done by hand to match what we seem to generally >> do in the server. > > I had the impression from skimming over xorg code base that most of it > was using -psl?
Yeah, that's my rough impression too; I'll add that for v2. (Even though it is a pretty lame alternative to just using cscope.) >> It's obviously too big to attach to this mail, so I haven't done that. > > It seems indent is not smart enough and produces some space damage. It > does not seem to be able to handle some unary pointer operators correctly > and thinks they are binary ones appending spaces after them. It also > seems to confuse function pointers with casts placing spaces before the > opening parenthesis. So any such patch might need manual review. I have to admit that I didn't read the entire patch ... > Also, defining a global coding style does not mean the code has to switch > immediately, it could be switched as code gets modfied, which avoids the > «git blame» barrier already mentioned on the thread if that's considered > to be an issue. > > In any case a global coding style would be extremely nice. Hmm, at some point you will have to have a flag day though, to switch everything that hasn't yet been fixed. I don't think it really buys us much. Cheers, Daniel _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
