script context :

#! /bin/bash

for f in $(find . -name '*.c' -or -name '*.cpp' -or -name '*.h' -type f)
do
astyle --style=kr --indent=tab -p -P -k1 $f
done

# after formate the code,we need to rm '*.orig' files
for f in $(find . -name '*.orig' -type f)
do
rm $f
done

effect picture :

code format using astyle的更多相关文章

  1. 统一项目中编码风格(Eclipse Java code format、codetemplate)

    在公司内的日常开发过程中,除了需要遵守统一的编码规范之外,还需要对编写的代码做统一的格式化,Eclipse提供了格式化编码的工具,快捷键是:Ctrl+Shift+F. 为了统一项目组的代码风格,建议使 ...

  2. Android Studio Eclipse Code Formatter

    在从Eclipse转到Android Studio上开发后,如果还想继续使用在Eclipse上制定的自定义的Code Formatter的话,需要按如下步骤操作:1.进入Settings界面,如果能看 ...

  3. Code::Blocks的魅力

    Code::Blocks是C/C++集成开发环境,就像Dev C++.Visual Studio. 一.码代码时的技巧 按住Ctrl滚动鼠标滚轮,改变字体大小. Ctrl+D可复制当前行或选中块. C ...

  4. 在Visual Studio中使用AStyle

    最近在做一个C++项目,我们使用了一个叫做AStyle的插件来做代码格式化. 下载方式1:通过Visual Studio下载 启动Visual Studio,以下简称VS: 英文版VS:VS主菜单 & ...

  5. android 使用String.format("%.2f",67.876)自已定义语言(俄语、西班牙语)会把小数点变为逗号

    市场人员反映公司的app使用系统设置俄语.西班牙语,double数据会把小数点变为逗号.调试一下,是自定义的语言时候(例如,俄语.西班牙语)转换String.format("%.2f&quo ...

  6. 05_Python Format Operation

    Python格式化输出 print('name: %s,version: %s,code: %d' %('Python',3.6,3)) print('name: {name},version: {v ...

  7. Visual Studio Code插件

    Material Theme 下载量:130 万 Visual Studio Code 最悠久的主题! Auto Import 下载量:46 万 自动去查找.分析.然后提供代码补全.对于 TypeSc ...

  8. Linking code for an enhanced application binary interface (ABI) with decode time instruction optimization

    A code sequence made up multiple instructions and specifying an offset from a base address is identi ...

  9. Code::Blocks使用与调试一条龙

    CodeBlocks创建C语言工程版本13.12   选择"create a new project" 选择第四个,点击"go" 4 选择"C&quo ...

随机推荐

  1. linux下去掉pdf的密码(前提:知道密码)

    一.背景 Linux jello 4.16.3 SMP Thu Apr 19 07:32:02 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux 二.去掉密码 2.1 先 ...

  2. bootstrap的carousel图片轮播

    整个轮播是放在一个div .carousel和.slide的div中的, 包括3个部分: 1. 第一个部分indicator位于下方的指示器部分. 结构是一个ol和li, ol的类是carousel- ...

  3. return false break;

    js中的return false;  break; , , , , ]; var list2 = ['a', 'b', 'c', 'd']; ; j < list2.length; j++) { ...

  4. VS不显示最近打开的项目

    VS2012不显示最近打开的项目 解决方法, 在"运行"中输入 " gpedit.msc"打开后在"用户配置"-"管理模板&quo ...

  5. WebApi——json返回多了 k_BackingField

    产生原因: model类添加了    [System.Serializable] 解决方案: xxxxx.WebApi\App_Start\WebApiConfig.cs的Register函数中添加如 ...

  6. R语言 sub与gsub函数的区别

    > text <- c("we are the world", "we are the children") > sub("w&qu ...

  7. Ubuntu14.04 terminal添加右键

    设置Ubuntu 14.04右键终端的方法如下: 首先要安装一个包,即可在右键里面添加一个“打开终端”的菜单. sudo apt-get install nautilus-open-terminal ...

  8. Qt_QString::split测试

    1. #define GID_PREFIX "dr_" QString str = "dr__awedr4"; QString str1; QStringLis ...

  9. Qt_2D_画图教程

    1. ZC: 看点:相同的API,QPainter.QPainterDevice和QPainterEngine这3个类 Qt学习之2D绘图(画刷和画笔) http://blog.csdn.net/lp ...

  10. Error updating database. Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value: 'as3'

    执行更新时的出错信息 Whitelabel Error Page This application has no explicit mapping for /error, so you are see ...