[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-indent] Re: [Bug-gnulib] merge of acl.c, alloca.c, alloca_.h, regex
From: |
Jim Meyering |
Subject: |
[Bug-indent] Re: [Bug-gnulib] merge of acl.c, alloca.c, alloca_.h, regex.c from coreutils |
Date: |
Mon, 11 Aug 2003 15:00:34 +0200 |
Bruno Haible <address@hidden> wrote:
> Paul Eggert wrote:
>> * lib/alloca_.h: Fix white space to match
>> what GNU indent does.
>
> Hmmpf. This causes gratuitous differences with
> intl/dcigettext.c
> intl/loadmsgcat.c
> intl/localealias.c
>
> Slavishly doing what GNU indent would do
IMHO, consistent cpp indentation is important, especially
when it is as deep as it is in alloca_.h (6! levels).
To the point that I wrote a tool (cppi) to check and produce
the desired indentation.
Of course, that's just a subset of maintaining a consistent
style of code formatting. Another very worthy goal. Many times,
I've embarked on seemingly nearly-worthless and nit-picky clean-up
jobs only to find that such attention to detail exposed real bugs.
Calling such a practice `slavish' is neither accurate, nor
particularly complimentary.
> breaks the ability to copy&paste
> between a .c file and a .h file. IMO it would be better to fix 'indent'
I think cpp indentation should be the same in .c and .h files,
and that the indentation should always reflect the level of nesting.
> so that it doesn't do things like this:
>
>> #ifndef _ALLOCA_H
>> -#define _ALLOCA_H
>> +# define _ALLOCA_H
>
> If GCC knows the typical one-inclusion-only pattern of .h files, why
> shouldn't 'indent' know about it as well?
- Prev by Date:
[Bug-indent] Re: [Bug-gnulib] merge of acl.c, alloca.c, alloca_.h, regex.c from coreutils
- Next by Date:
[Bug-indent] Re: [Bug-gnulib] merge of acl.c, alloca.c, alloca_.h, regex.c from coreutils
- Previous by thread:
[Bug-indent] Re: [Bug-gnulib] merge of acl.c, alloca.c, alloca_.h, regex.c from coreutils
- Next by thread:
[Bug-indent] Re: [Bug-gnulib] merge of acl.c, alloca.c, alloca_.h, regex.c from coreutils
- Index(es):