[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Document Qemu coding style
From: |
M. Warner Losh |
Subject: |
Re: [Qemu-devel] [PATCH] Document Qemu coding style |
Date: |
Mon, 30 Mar 2009 13:02:12 -0600 (MDT) |
In message: <address@hidden>
Blue Swirl <address@hidden> writes:
: > +An exception is the opening brace for a function; for reasons of tradition
: > +and clarity it comes on a line by itself:
: > +
: > + void a_function(void)
: > + {
: > + do_something();
: > + }
: > +
: > +Rationale: a consistent (except for functions...) bracing style reduces
: > +ambiguity and avoids needless churn when lines are added or removed.
: > +Furthermore, it is the Qemu coding style.
:
: No, this is the K&R style. Quoting linux/Documentation/CodingStyle:
:
: Heretic people all over the world have claimed that this inconsistency
: is ... well ... inconsistent, but all right-thinking people know that
: (a) K&R are _right_ and (b) K&R are right. Besides, functions are
: special anyway (you can't nest them in C).
And besides, there's lots of almost-smart tools that operate on source
code that know this is always true... Or at least historically that's
been the case, don't know of any widely used ones today, but I doubt
they were all fixed...
Warner
- [Qemu-devel] [PATCH] Document Qemu coding style, Avi Kivity, 2009/03/29
- Re: [Qemu-devel] [PATCH] Document Qemu coding style, malc, 2009/03/29
- Re: [Qemu-devel] [PATCH] Document Qemu coding style, Blue Swirl, 2009/03/30
- Re: [Qemu-devel] [PATCH] Document Qemu coding style,
M. Warner Losh <=
- Re: [Qemu-devel] [PATCH] Document Qemu coding style, Avi Kivity, 2009/03/30
- Re: [Qemu-devel] [PATCH] Document Qemu coding style, Lennart Sorensen, 2009/03/30
- Re: [Qemu-devel] [PATCH] Document Qemu coding style, M. Warner Losh, 2009/03/30
- Re: [Qemu-devel] [PATCH] Document Qemu coding style, Lennart Sorensen, 2009/03/30
- Re: [Qemu-devel] [PATCH] Document Qemu coding style, M. Warner Losh, 2009/03/30
- Re: [Qemu-devel] [PATCH] Document Qemu coding style, Laurent Desnogues, 2009/03/31
- Re: [Qemu-devel] [PATCH] Document Qemu coding style, David Turner, 2009/03/31
- Re: [Qemu-devel] [PATCH] Document Qemu coding style, Avi Kivity, 2009/03/31
- Re: [Qemu-devel] [PATCH] Document Qemu coding style, David Turner, 2009/03/31