[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Preprocessor directives formatting
From: |
Stepan Kasal |
Subject: |
Preprocessor directives formatting |
Date: |
Tue, 13 Sep 2005 19:42:37 +0200 |
User-agent: |
Mutt/1.4.1i |
Hello,
On Tue, Sep 13, 2005 at 10:23:32AM -0400, Derek Price wrote:
> [...] double-include protection should be ignored for the purposes of
> indenting compiler directives in headers,
...
> I would note that GNU indent doesn't currently support Paul's style. It
> supports intentation of cpp directives, but only to leave them
> unmodified or to indent them by a set # of spaces per nested block,
> without an option to make an exception for the first #if block encountered.
that is a serious flaw in indent-2.2.9. A new option should be added for
this: if the whole file is one big #ifndef..#endif, this outermost #ifdef
would be ignored. It should be on by default.
Moreover, two of the three options you mentioned are not properly
documented:
--preprocessor-indentationN -ppiN
--remove-preprocessor-space -nlps
They are missing from `Option Summary', both from the list of
descriptions and from the `Cross Key' table below.
I'm not sure whether indent is actively developped, but at least this bug
report is filed in bug-indent archives now.
Have a nice day,
Stepan