Hi Amos,
I had post the latest version of the formatter (plus a small script for checking md5 signatures):
    http://www.mail-archive.com/[email protected]/msg07208.html

In all test I run, worked without problems.
I think it is OK.
Regards,
    Christos



Amos Jeffries wrote:
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

Reply via email to