1 Star 0 Fork 0

open-fish / rrdlite

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
rrd_error.sh 511 Bytes
一键复制 编辑 原始数据 按行查看 历史
影子 提交于 2022-01-14 14:51 . fix
#!/bin/sh
FILE=rrd_error.h
echo '#define RRD_ERR_START 0x0200' > $FILE
cat ./rrd_error.c | sed 's|.*\/\*[ ]*\([^\s]*\)[ ]*\*\/.*|\1|' | grep '^RRD_ERR' | awk '{printf("#define %-40s 0x%04x\n", $1, NR+0x1ff)}' >> $FILE
wc -l $FILE | awk '{printf("/* if add new system event flag, please upadte the RRD_ERR_END */\n#define RRD_ERR_END 0x%04x\n#define RRD_ERR_NUM (RRD_ERR_END - RRD_ERR_START + 1)", $1 - 1 + 0x1ff)}' >> $FILE
Go
1
https://gitee.com/open-fish/rrdlite.git
git@gitee.com:open-fish/rrdlite.git
open-fish
rrdlite
rrdlite
master

搜索帮助