28 Star 119 Fork 47

linuxmail/lib-zc

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
buffer.cpp 782 Bytes
一键复制 编辑 原始数据 按行查看 历史
linuxmail 提交于 2024-07-31 12:16 +08:00 . C++ 独立运行环境
/*
* ================================
* eli960@qq.com
* http://linuxmail.cn/
* 2015-10-12
* ================================
*/
#include "zcc/zcc_buffer.h"
int main(int argc, char **argv)
{
zcc::main_argument::run(argc, argv);
if (zcc::main_argument::var_parameters.size() < 1)
{
zcc_fatal("USAGE: %s bin_file", zcc::progname);
}
std::string old_con, new_con;
zcc::file_get_contents_sample(zcc::main_argument::var_parameters[0], old_con);
zcc::buffer buffer;
for (uint64_t i = 0; i < old_con.size(); i++)
{
buffer.putc(old_con[i]);
}
new_con.append(buffer.get_data(), buffer.get_len());
if (old_con == new_con)
{
zcc_info("OK");
}
else
{
zcc_info("ERR");
}
return 0;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/linuxmail/lib-zc.git
git@gitee.com:linuxmail/lib-zc.git
linuxmail
lib-zc
lib-zc
master

搜索帮助