printf("loops %u / %u%c[K\n", loops + 1, opts->loops, 27); printf("%cM", 27);
serialcheck.c中的一段代码一直弄不明白:
do {
status = stress_test_uart_once(opts, fd, data, data_len);
memset(opts->cmp_buff, , data_len);
printf("loops %u / %u%c[K\n", loops + , opts->loops, );
if (!status)
printf("%cM", );
} while (++loops < opts->loops && !status);
查ansi
https://godoc.org/github.com/pborman/ansi#pkg-constants
EL = Name("\033[K") // Erase in Line
RI = Name("\033M") // Reverse Line Feed
\033[K 清除从光标到行尾的内容 Reverse Line Feed line feed是打印机进一行纸,reverse line feed 是打印机退一行纸
/*RI-move up 1 line*/
printf("loops %u / %u%c[K\n", loops + 1, opts->loops, 27); printf("%cM", 27);的更多相关文章
- 2016CCPC长春 - B/D/F/H/I/J/K - (待补)
目录: B - Fraction D - Triangle F - Harmonic Value Description H - Sequence I I - Sequence II B题:HDU 5 ...
- 《转载》PAT 习题
博客出处:http://blog.csdn.net/zhoufenqin/article/details/50497791 题目出处:https://www.patest.cn/contests/pa ...
- C语言 指针小结
指针 -->指针变量 类型名 *变量名 int *point1; char *point2; 注意:*p可以直接使用,它代表指针p指向的变量,*p可以当做被指向的变量使用!~~~~ 一个变量的地 ...
- hdu 2065
ps:我的天...看网上各种难..对于我这个比较懒得人...我就找规律直接水过去了...前20一个循环,注意跳过第一轮的3个数就行..然后觉得比较坑的是,那个输入N,要用long long型... 代 ...
- HDU-2539 点球大战
点球大战 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submi ...
- HDU5916
Harmonic Value Description Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Ja ...
- Go语言学习笔记(四)结构体struct & 接口Interface & 反射
加 Golang学习 QQ群共同学习进步成家立业工作 ^-^ 群号:96933959 结构体struct struct 用来自定义复杂数据结构,可以包含多个字段(属性),可以嵌套: go中的struc ...
- Temperature hdu 3477
Temperature Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total ...
- golang结构体、接口、反射
struct结构体 struct用来自定义复杂数据结构,可以包含多个字段属性,可以嵌套; go中的struct类型理解为类,可以定义方法,和函数定义有些许区别; struct类型是值类型. struc ...
随机推荐
- python-类属性和对象属性(转)
class People(object): # 类属性是指定义在类的内部而且在方法的外部的属性 money = 10000 def __init__(self,name,age,gender=1): ...
- fasttext学习笔记
When to use FastText? The main principle behind fastText is that the morphological structure of a wo ...
- 26-Python3 面向对象
26-Python3 面向对象 ''' 面向对象技术简介 ''' ''' 类定义 ''' ''' 类对象 ''' class MyClass: i = 12345 def f(self): retur ...
- express框架之session 存储
1.express-session 是基于express框专门用于处理session的中间件.这里不谈express-session怎么安装,只给出相应的实例代码.另外,session的认证机制离不开 ...
- 转 EasyUi日期控件datebox设置,只显示年月,也只能选择年月
1.引入Jquery和easyui,注低版本的Jquery和easy不能使用,这里使用的Jquery是1.8.2easyui是1.6.1.1.easyui下载地址:http://www.jeasyui ...
- iOS应用图标及尺寸
Icon and Image Sizes Every app needs an app icon and a launch file or image. In addition, some apps ...
- 获取 Google USB 驱动程序
获取 Google USB 驱动程序 另请参阅 安装 USB 驱动程序 使用硬件设备 使用任何 Google Nexus 设备进行 ADB 调试时,只有 Windows 需要 Google ...
- <6>Lua元表和冒号 self
Lua中没有像C.C++.JAVA中的类概念,面向对象等 ,但我们可以模拟出来 1. Lua中有个很重要的概念元表 设置元表setmetatable()函数 获取元表getmetatable()函数 ...
- django后台的制作
参考:http://zengestudy.blog.51cto.com/1702365/1902660 http://www.cnblogs.com/fnng/p/3737964.html 实现与后台 ...
- lua学习之循环打印九九乘法表
--第4题 输出99乘法表 function PrintMulitiplyTable() , do local res = {} local str = "" , i do res ...