*Author : DavidLin
*Date : 2014-12-11pm
*Email : linpeng1577@163.com or linpeng1577@gmail.com
*world : the city of SZ, in China
*Ver : 000.000.001
*history : editor time do
* 1)LinPeng 2014-12-11 created this file!
* 2)
*/
关于auto_tool的由来:
auto_tool系列辅助工具集是笔者本人在工作学习中,深感零碎重复边角工作占去太多开发时间,所以根据自身需要,编写的shell,make,bat,teraterm等适合某一需求的自动工具,让自身得以从分分秒秒的碎片化时间中拯救出来,节约时间,专注于更重要的事情。
auto_tool的数据结构定义
typedef char name_t;
typedef unsigned int ver_t;
typedef unsigned int sn_t;
struct auto_tool_t {
name_t tool[24];
ver_t master;
ver_t salve;
sn_t sn;
};
#define INIT_AUTO_TOOL(name) \
{ \
.tool = name, \
.master = 0000, \
.slave = 0000, \
.sn_t = 0000, \
};
static auto_tool_t make = INIT_AUTO_TOOL(make); //用于标识Makefile文件
static auto_tool_t shell = INIT_AUTO_TOOL(shell); //用于标识shell脚本
static auto_tool_t bat = INIT_AUTO_TOOL(bat); //用于标识bat脚本
static auto_tool_t teraterm = INIT_AUTO_TOOL(teraterm); //用于标识teraterm脚本
example 1:
file number:make-0014-1209-0001
.name = make,
.master = 0014,
.slave = 1209,
.sn = 0001,
思想:小就是美
一个模块只做一个功能,假如需要更多的功能,那么它应该是这些小模块的结合体。