astyle使用基础教程 http://cppblog.com/jokes000/articles/158838.htmlhtml
steps:post
(1) apt-get install astyle 或者去主页http://sourceforge.net/projects/astyle下载spa
(2) astyl.sh 脚本.net
dir=`pwd` filelist=`find $dir -type f -name "*.c" -or -name "*.h"` for file in $filelist do astyle --style=ansi --indent=spaces=4 $file done
(3)把这个脚本放在须要格式化的工程文件夹下,执行便可。code
其余经常使用格式:htm
astyle --style=ansi --indent=tab