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