X server source code re-indented

Chase Douglas chase.douglas at canonical.com
Wed Mar 21 17:26:04 PDT 2012


On 03/21/2012 05:21 PM, Peter Hutterer wrote:
> On Wed, Mar 21, 2012 at 03:27:52PM -0700, Chase Douglas wrote:
>> On 03/21/2012 02:25 PM, Keith Packard wrote:
>>>
>>> I've taken Daniel's indent recipe, fixed it up a bit and applied it to
>>> the master branch in the X server. To help get other branches cleaned up
>>> in a compatible fashion, I've stuck the scripts I used in the
>>> util/modular repository. They're called x-indent-all.sh and x-indent.sh.
>>>
>>> Patches going forward will need to be made against the server as it now
>>> exists, rather than with the previous whitespace, so make sure you
>>> re-generate diffs as needed.
>>>
>>> I'll also happily take whitespace cleanup patches that recover from
>>> mistakes made by "indent".
>>
>> I haven't made any attempt to learn the new style yet. Is there a guide
>> somewhere?
> 
> http://www.x.org/wiki/CodingStyle

The brace handling is different between here and what Daniel described.
Here's from the wiki page:

Opening curly brace on the same line as the control construct:
if (foo) {

Here's from Daniel's explanation:

braces on the following line for function declarations only,
everything else on the same line

Which is correct?

-- Chase


More information about the xorg-devel mailing list