一、软件介绍:
Artistic Style是一个对C、c++、c++/CLI,objective- C, c#,Java源代码免费、快速、小型自动格式化程序。
二、软件下载:
网站是http://astyle.sourceforge.net/
下载地址:http://sourceforge.net/projects/astyle/files/astyle/
三、安装配置:
1.进入Linux系统打开一个终端,进入到有 astyle_2.05.1_linux.tar.gz 的目录下,mkdir AStyle,tar-xvf astyle_2.05.1_linux.tar.gz -C AStyle;
2.cd AStyle, cd astyle/build/gcc/,make;
3.cd bin,cp astyle /usr/bin
4.重新打开一个终端,astyle命令生成;
四、例子:
打开一个终端,输入astyle + 参数 + 文件名;
1.astyle --style=ansi hello.c
2.astyle --style=linux --indent=spaces=8 hello.c
五、使用手册:
艺术风格2.05.1
派蒂:吉姆maintained by
原作者:塔尔戴维森
用途:
------
例子:1.在Linux 系统下打开一个终端,进入要格式化的文件目录下;
2.在终端中输入astyle --style=linux --indent=spaces=8 seqlist.c;
3.文件格式化完毕;
格式化之前如图:
格式化之后如图:
------
[选项] file1风格file2 file3 [……]
风格[选项] & lt;原beautified >;
当indenting特定的队列,队列retains the resulting缩进
最初的队列的名称。最初的队列前缩进是renamed,
with a suffix”.orig added to the原文件名”。
通配符(*和?)may be used in the filename。
“递归”过程recursively CAN通讯。
默认的,风格是set up to缩进以及炉空间每缩进,
有40在连续空间最大压痕of statements,
最小压痕of八空间内有条件的声明
没有格式化选项。
选项:
--------
这个程序follows the usual GNU的命令行语法。
长选项(starting with——)must be written one at a time。
短的选项(starting with”)may be together功能化。
因此,bps4 is the same as B—P—S4。
选择文件:
-------------
艺术风格看起来for a违约期权file in the
以下命令:
1。the高兴of the艺术风格的环境