1. 下载 http://astyle.sourceforge.net/ . 我是在windows下编辑的, 所有直接用 amd64的版本了.
放在 D:\AStyle
2. 用法在 file:///D:/AStyle/doc/astyle.html
我的配置
D:\AStyle\bin\AStyle.exe --mode=c --style=stroustrup --indent=spaces=4 --attach-namespaces --attach-classes --attach-inlines --attach-extern-c --attach-closing-while --indent-classes --indent-modifiers --indent-switches --indent-namespaces --indent-after-parens --indent-continuation=4 --indent-preproc-block --indent-preproc-define --indent-col1-comments --max-continuation-indent= --min-conditional-indent= --pad-oper --pad-comma --pad-header --align-reference=name --align-pointer=name --break-closing-braces --break-one-line-headers --add-braces --attach-return-type --convert-tabs --break-after-logical 源文件