Re: Source indentation style


Subject: Re: Source indentation style
From: Jesper Skov (jskov@redhat.com)
Date: Tue Feb 13 2001 - 09:26:42 CST


[Please remember to CC the list!]

>> I don't see that anywhere. I've included the file again below in MIME
>> in case it's because tabs go bad in your mailer.
>
> You have? :)

I have now. Sorry.

>> > if( x
>> >&& y
>> >&& z
>> >&& a )
>> > {
>>
>> Looks like that in the original. And if there's a long expression in a
>> statement like that, it's customary (where I come from, anyway) to
>> break it down like above so it fits within 79 chars.
>
> I don't know if our coding standards say anything about this now, but:
>while I'd like to see things broken up across multiple lines, I'd also like
>to see them indented according to what line they belong to. For example:
>
> if( pp && pp->getType() == pf_Frag::PFT_Text
> && pp->getNext()
> && pp->getNext()->getType() == pf_Frag::PFT_Text )

That's how it looks already...

No it's not. Problem is you have probably set TAB width to 0 which
would result in what you have described above.

However, there's another problem with indent(1). I've set it to use
TABs of witdh 4 but it's using a width of 8.

So people, when you look at the source please set TAB width to 8
before you judge how it looks.

Jesper




This archive was generated by hypermail 2b25 : Tue Feb 13 2001 - 09:26:56 CST