Version: 3.4 SVN, r612104 (using KDE KDE 3.5.5) Installed from: Debian testing/unstable Packages OS: Linux Hi, Having if( ( *it ) ) in the code. The formatter makes that if (( *it ) ) Also for( something ) gets converted to for ( something ) My formatting options are: BlockBreak=false BlockBreakAll=false BlockIfElse=false Brackets=None BracketsAttach=false BracketsBreak=false BracketsCloseHeaders=false BracketsLinux=false BracketsNone=true FStyle=UserDefined FillConvertTabs=false FillCount=4 FillEmptyLines=false FillForce=true FillForceTabs=false FillSpaceCount=2 FillSpaces=true FillTabCount=2 FillTabs=false IndentBlocks=false IndentClasses=true IndentLabels=false IndentPreprocessors=false IndentSwitches=true Options=BlockBreak=0,BlockBreakAll=0,BlockIfElse=0,Brackets=Break,BracketsCloseHeaders=0,FStyle=Use rDefined,Fill=Spaces,FillCount=4,FillEmptyLines=0,FillForce=1,IndentBlocks=0,IndentBrackets=0,Inden tCases=1,IndentClasses=1,IndentLabels=1,IndentNamespaces=1,IndentPreprocessors=0,IndentSwitches=0,K eepBlocks=0,KeepStatements=0,MaxStatement=40,MinConditional=-1,PadOperators=1,PadParenthesesIn=1,Pa dParenthesesOut=0,PadParenthesesUn=1, PadOperators=true PadParentheses=true PadParenthesesIn=true PadParenthesesOut=false PadParenthesesUn=true
And just in case it might matter astyle is version 1.18.
Only the Options=... line is used. The other options are not read any more (and can be deleted) Kdevelop has the astyle version 1.19 in it. If your using astyle at the commandline there are bug fixes for the 1.19 version that you might want. (or not) Testing on astyle 1.19 on the commandline: testtt.cpp with the sample above confirms the problem. The default for commandline astyle is no formatting (check that there isn't an .astylerc file first). int main(int argc, char *argv[]) { if((*it) ) a = 1; for( something); return EXIT_SUCCESS; } astyle testtt.cpp Artistic Style 1.19 formatting testtt.cpp diff testtt.cpp testtt.cpp.orig 33c33 < if ((*it) ) --- > if((*it) ) 35c35 < for ( something); --- > for( something); Bug in astyle.
SVN commit 682308 by webb: Update to Astyle 1.21 Fixes: BUG: 138699 BUG: 69106 M +233 -89 ASBeautifier.cpp M +44 -45 ASEnhancer.cpp M +855 -423 ASFormatter.cpp M +55 -40 ASResource.cpp M +94 -45 astyle.h