running ident on modular xorg tree

Jim Gettys Jim.Gettys at hp.com
Wed Sep 8 16:28:11 PDT 2004


Certainly alot of the X code is reasonably consistent, but there
are parts that are not.

It is certainly the case we should document what "X Window System"
indenting style is, and encourage new code to conform.

As far as stuff that does not conform, I claim it should probably
only be done on a case by case basis, on egregiously bad indenting....
                              - Jim

On Wed, 2004-09-08 at 19:23, Thomas Winischhofer wrote:
> Jeremy C. Reed wrote:
> > On Tue, 7 Sep 2004, Jon Smirl wrote:
> > 
> > 
> >>Would it make sense to run indent over the new xorg modular source
> >>tree before a lot of people start using it? Then make it a policy that
> >>all check-ins are run through indent too? Given that the tree has been
> >>so heavily edited there's no real log trail that will be lost. Would
> >>it be good to use the same indent rules that the kernel uses? I'm not
> > 
> > 
> > What kernel?  :)
> > 
> > Like
> > http://cvsweb.netbsd.org/bsdweb.cgi/src/share/misc/indent.pro
> > http://cvsweb.netbsd.org/bsdweb.cgi/src/share/misc/style
> > http://www.openbsd.org/cgi-bin/man.cgi?query=style&apropos=0&sektion=0&manpath=OpenBSD%20Current&arch=i386&format=html
> > http://www.FreeBSD.org/cgi/man.cgi?query=style&sektion=9&apropos=0&manpath=FreeBSD+5.2.1-RELEASE
> > 
> > 
> >>working in the xorg tree currently, but we're talking about doing this
> >>to the drm tree.
> > 
> > 
> > Since the code is getting farther from other implementations, it does make
> > sense and seems like it would be a good idea to have a consistent style.
> 
> Coding style is one thing. Indents are another. Hard indents (eg 8 chars 
> or more) in combination with a limited line length make if- or other 
> conditional statements (especially in drivers with complicated 
> multi-level logic, eg different chipsets, different hw features, 
> different chip revisions, different BIOS versions, etc and mixed OR and 
> AND at different logical levels) incredibly hard to read and hence 
> error-prone.
> 
> As long as it doesn't get too mixed up (which I don't think is the 
> case), I'd say we have more important things to do than inventing indent 
> policies.
> 
> Thomas




More information about the xorg mailing list