Re: Lindent fixed to match reality

Matt Mackall
2004-01-29T20:00:34Z

On Thu, Jan 29, 2004 at 11:44:27AM -0800, Linus Torvalds wrote:
>
>
> On Thu, 29 Jan 2004, Matt Mackall wrote:
> >
> > a) (no -psl)
> >
> > void *foo(void) {
> >
> > instead of
> >
> > void *
> > foo(void) {
>
> And why not
>
> void *foo(void)
> {
>
> which is the _right_ thing to use?

Doh, of course the above is what it actually does.

> > b) (no -bs) "sizeof(foo)" rather than "sizeof (foo)"
> > c) (-ncs) "(void *)foo" rather than "(void *) foo"
>
> Hmm.. I don't know about (c), that one tends to vary by usage.

I did a bit of visual grep for counterinstances of c) in core code but
nothing jumped out at me. I'm pretty sure the former is more common
practice and I at least find it helpful visually given the precedence
of cast operators. Thing is, indent feels obliged to force it one way
or the other, so I think it should err on the no space side.

--
Matt Mackall : http://www.selenic.com : Linux development and consulting