Re: astyle

From: Amos Jeffries <squid3@dont-contact.us>
Date: Tue, 08 Jan 2008 17:35:49 +1300

Alex Rousskov wrote:
> On Tue, 2008-01-08 at 16:45 +1300, Amos Jeffries wrote:
>
>> On the bit-field problem, I have a similar mind. Even though the wrap is
>> extremely ugly the suggested fix makes code almost unreadable.
>
> The fix (pre- and post-processing) is invisible to the programmer. It
> would be auto-performed before and after astyle is run.
>
>> 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);
>> }
>
> That could work indeed, provided astyle does not mangle the above into
> some other ugly representation, especially if comments are added after
> the declaration.

Cool. I'm building a little (so far) file of these tests so the styles
can be automatically verified.
If you or christos are doing the same could you commit it as a
test-suite file and test script?

Amos

-- 
Please use Squid 2.6STABLE17 or 3.0STABLE1.
There are serious security advisories out on all earlier releases.
Received on Mon Jan 07 2008 - 21:36:10 MST

This archive was generated by hypermail pre-2.1.9 : Wed Jan 30 2008 - 12:00:09 MST