lkml.org 
[lkml]   [2004]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Lindent fixed to match reality
Date
Matt Mackall (mpm@selenic.com) wrote:
> I've been fiddling with cleaning up some old code here and suggest the
> following to make Lindent match actual practice more closely. This does:
>
> a) (no -psl)
>
> void *foo(void) {
>
> instead of
>
> void *
> foo(void) {

You just nicely broke 'find . -name *.c | xargs grep ^foo'.

Why make functions harder to find? It's just one line... Being
able to navigate the source tree with standard unix utils is a
Good Thing.

Even better, IMHO:

void *
foo(void)
{
}

Yes, that takes a full three lines. But within the function body
you can just reverse search for ^{ and you're at the function
declaration. Not nearly as useful as grepping for a function
name, but still a nice thing to have, IMHO.

>
> b) (no -bs) "sizeof(foo)" rather than "sizeof (foo)"

Agreed.

> c) (-ncs) "(void *)foo" rather than "(void *) foo"

Agreed.


--
Erik Hensema <erik@hensema.net>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:00    [W:0.092 / U:1.336 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site