avatar
文章
2
标签
2
分类
0
主页
博文
  • 分类
  • 标签
  • 归档
生活
  • 分享
  • 相册
  • 音乐
  • 影视
友链
关于笔者
lbq开发日志
搜索
主页
博文
  • 分类
  • 标签
  • 归档
生活
  • 分享
  • 相册
  • 音乐
  • 影视
友链
关于笔者

lbq开发日志

Hello World
发表于2025-11-27
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub. Quick StartCreate a new post1$ hexo new "My New Post" More info: Writing Run server1$ hexo server More info: Server Generate static files1$ hexo generate More info: Generating Deploy to remote sites1$ hexo deploy More info: Deployment
通用C语言编码规范
发表于2025-01-02
通用C语言编码规范目录 1. 总体原则 2. 命名约定 3. 代码格式化 4. 函数设计 5. 变量声明 6. 结构体和枚举 7. 宏定义 8. 注释规范 9. 文件组织 10. 错误处理 11. 内存管理 1. 总体原则1.1 可读性优先 代码应该像散文一样易于阅读 清晰的命名比短小的命名更重要 一致性胜过个人偏好 1.2 简洁性 避免不必要的复杂性 一个函数只做一件事 避免过深的嵌套 1.3 安全性 检查所有输入参数 避免缓冲区溢出 明确处理错误情况 2. 命名约定2.1 文件命名123456789// 源文件使用小写字母和下划线string_utils.cmemory_pool.cuart_driver.c// 头文件对应string_utils.hmemory_pool.huart_driver.h 2.2 函数命名2.2.1 公共函数 - snake_case1234// 公共API函数使用模块前缀int memory_pool_init(memory_pool_t *pool, size_t size);bool...
1
avatar
liu
文章
2
标签
2
分类
0
联系我
公告
This is my Blog
最新文章
Hello World2025-11-27
通用C语言编码规范2025-01-02
标签
编码规范 C语言
归档
  • 十一月 2025 1
  • 一月 2025 1
©2022 - 2026 By liu
框架 Hexo|主题 Butterfly
陕ICP备2023012157号-1
搜索
数据加载中