News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

AStyle issue with SVN 5755

Started by ironhead, September 11, 2009, 06:50:01 PM

Previous topic - Next topic

ironhead

I've built 5755 using MinGW (GCC 4.4.0), running on Windows XP Pro SP3.  When I use the AStyle plugin, it seems to be defaulting to Stroustrup formating despite the fact that I have GNU selected.

The AStyle plugin worked as expected with the previous nightly (5731).

ironhead

The source of the problem is in:

void FormatterSettings::ApplyTo(astyle::ASFormatter& formatter)

If I hardcode:

formatter.setFormattingStyle(astyle::STYLE_GNU);

Then I get the desired behaviour.  As a result, I suspect:

int style = cfg->ReadInt(_T("/style"), 0);

is failing and returning '0'.

ironhead

It turns out that the Linux and GNU styles were swapped in some of the files.  I've uploaded a patch (#2825) that corrects the issue:

http://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=2825&group_id=5358

Cheers!

Chris

Jenna

Quote from: ironhead on September 13, 2009, 05:43:33 AM
It turns out that the Linux and GNU styles were swapped in some of the files.  I've uploaded a patch (#2825) that corrects the issue:

http://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=2825&group_id=5358

Cheers!

Chris
Hi Chris,

I'm working on this (in fact I have fixed it in my working copy).
I also added The Horstmann formatting-style.
I will commit the changes soon (hopefully today).

MortenMacFly

Quote from: jens on September 13, 2009, 10:03:35 AM
I'm working on this (in fact I have fixed it in my working copy).
It's all my fault. :oops:

I tried to be very careful when updating astyle but it seems I missed some points. Changes were quite big... Thanks for the help!
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Jenna


ironhead

I can confirm it's fixed.

Thank you!

Chris