[PATCH 1.12] A coding style for the server
daniel at fooishbar.org
Tue Jan 17 19:02:01 PST 2012
So since the list has been fairly quiet and uncontroversial since the
Ctrl-Alt-Backspace argument, I thought I might throw two comedy patches
out there and see if they stuck.
No but seriously though, it's both a) utterly ridiculous and b) faintly
stupid, that we still don't actually have a coding style. I honestly --
honestly -- don't care what the coding style is. I just care that we
Most of the code we broadly agrees on most things. Some things were a
little more split; for instance, cuddling else was only just outnumbered
by non-cuddling else, and also braces cuddling if outnumbered
Probably the largest change is that all tabs were expanded to eight
spaces. The only argument I've ever heard in favour of having a tab
hardcoded to eight spaces and mixing tabs and spaces is that a) emacs
does that sometimes, and b) it makes compilation faster because you have
fewer bytes to lex. I honestly don't have much time for either
argument, and it does provably make editing code harder.
So, the commit in my coding-style xserver branch is simply the result of
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.
It's obviously too big to attach to this mail, so I haven't done that.
I'd like to see this merged for 1.12, despite the merge window having
shut, so patches for 1.13's master are more likely to apply to 1.12.
It's arguably not the best time to do it, but there is no good time.
: As long as it's not GNU.
: git://people.freedesktop.org/~daniels/xserver - it's based against
current upstream master.
More information about the xorg-devel