[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: non-uniform behavior when indenting '*' in function declaration with
From: |
Petr Pisar |
Subject: |
Re: non-uniform behavior when indenting '*' in function declaration with typedefs |
Date: |
Mon, 28 Nov 2011 10:52:02 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Fri, Nov 25, 2011 at 10:08:23AM -0300, Andrés More wrote:
> I noted the following issue with 'indent', I could be wrong but I
> think it is non-uniform behavior.
> When I indent code like [1], the '*' get a different placement if the
> item is a typedef.
> By the way, [2] does not suffer the same '*' realignment.
>
indent(1) reads:
You must use the ‘-T’ option to tell indent the name of all the typenames in
your program that are defined by typedef.
And then you get uniform indentation. I guess this this because typedefs can
be defined in separate header files, so indent requires manual definition
usind -T option.
On the other hand, I cannot image situation when pointer to unknown type
should be handled specially. Maybe indent confuses it with arithmetic
expression.
-- Petr
pgpSOZsZAFhfx.pgp
Description: PGP signature