Re: astyle

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Wed, 20 Aug 2008 21:04:00 +1200

Amos Jeffries wrote:
> Alex Rousskov wrote:
>> On Mon, 2008-01-07 at 23:55 +0200, Tsantilas Christos wrote:
>>> Alex Rousskov wrote:
>>>> On Sat, 2008-01-05 at 13:05 +0200, Tsantilas Christos wrote:
>>> ...
>>>> I suggest removing break-blocks both because of the above bug and
>>>> because it is trying to detect "unrelated blocks, classes, etc." which
>>>> smells too much like AI to me.
>>>>
>>>> The --brackets=linux (-l) option is useful though. Can you check
>>>> whether
>>>> there is another --brackets option that works without the above bug and
>>>> does the subset of what --brackets=linux does?
>>> We can only use the --brackets=break option which works well.
>>> This option format the code as:
>>>
>>> void Foo(bool isFoo)
>>> {
>>> if (isFoo)
>>> {
>>> bar();
>>> }
>>> else
>>> {
>>> anotherBar();
>>> }
>>> }
>>>
>>> (This format is awful but considering the hours I spent to merge the
>>> HEAD in async-calls ... it is the best :-) ! )
>>
>> What do others think regarding making the above a temporary format
>> default until astyle improves or a better replacement is available?
>> [Not] spending hours on merging branches can be a strong-enough
>> motivation to use less-than-perfect format above...
>>
>> Or would it be better to post-process atyle-formatted code to untangle
>
> Less processing the better.
> So putting up with a small ugly in exchange for a complicated hack is
> okay by me.
>
> On the bit-field problem, I have a similar mind. Even though the wrap is
> extremely ugly the suggested fix makes code almost unreadable.
>
> If we have to go the way of hacking bitfields around astyle, I would
> suggest going to a macro (yuck). Like so:
>
> #define BITFIELD(name,bits) unsigned int name : bits
>
> struct {
> BITFIELD(name, 1);
> BITFIELD(flag, 1);
> }
>
>>
>> #if FOO {
>> }
>>
>> lines?
>>
>> Cheers,
>>
>> Alex.
>>
>>
>
> Amos

How was this going Christos?

We are getting close to feature finalization on 3.1.

Amos

-- 
Please use Squid 2.7.STABLE4 or 3.0.STABLE8
Received on Wed Aug 20 2008 - 09:03:55 MDT

This archive was generated by hypermail 2.2.0 : Thu Aug 21 2008 - 12:00:05 MDT