Preprocessor directives formatting

Stepan Kasal <[email protected]>
Newsgroups gmane.comp.lib.gnulib.bugs,gmane.comp.gnu.indent.bugs
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.