On Mon, Mar 19, 2007 at 07:18:38PM +0100, Jesper Juhl wrote:Hmm, thanks, when I wrote it in kmail it looked right. two tabs and
>...
> The second reason is that indenting two tabs seems to make the most sense for
> a few reasons;
> a) not indenting at all is ugly, plain and simple.
> void function(int a, int b,
> int c, int d, int e)
> {
> int foo;
> int bar;
> ...
> }
> b) indenting only one tab stop puts parameters at the same indent level as
> variables in the function which is potentially confusing (at least IMHO).
> void function(int a, int b,
> int c, int d, int e)
> {
> int foo;
> int bar;
> ...
> }
> c) Indenting so that all parameter lines start at the opening paranthesis
> rarely matches up with tabs so you have to use varying amounts of spaces
> depending on how long the function name is. Not a good solution IMHO.
> void function(int a, int b,
> int c, int d, int e)
>...
Your example is wrong, it's:
void function(int a, int b,
int c, int d, int e)
It may be the most common, but I don't agree that it has the best
This is the most common convention in the kernel - and except for
extremely long function names it's the one with the best readability.
Yes, it's a problem with extremely long function names, but they are
rare in the kernel.
And the "varying amounts of spaces" should be handled automatically by
your editor.