Derek Price <[EMAIL PROTECTED]> wrote:
> Jim, all,
>
> Is there a GNULIB standard for this yet?  Paul Eggert just went through
> my glob_.h and tweaked the cpp spacing in the other direction.  I
> assumed at the time this meant that double-include protection should be
> ignored for the purposes of indenting compiler directives in headers,
> but Jim just went the other way here:

Hi Derek,

For non-headers, I think there is agreement: one space per level
of indentation.

For headers, some prefer to have one fewer space, due to the
fact that there is often a file-spanning #ifndef SYM...#endif block.

I prefer to use the same rule for both headers and non-headers, so
I changed that #define in canon-host.h to make it consistent with
the preceding, indented `# define'.  In general, I think Paul prefers
that, too, but the glibc maintainers probably use the other style.
I think Ulrich Drepper prefers the one-fewer-space approach for headers.
Paul probably knows that and changed glob_.h accordingly to ease the
merge back into glibc.

Personally, I've found it useful enough to have consistently cpp-indented
sources that I wrote cppi, and to use it in a commit-hook for the coreutils.


_______________________________________________
bug-gnulib mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gnulib

Reply via email to