更新代码风格文档

This commit is contained in:
Aoran Zeng 2025-08-20 18:35:58 +08:00
parent 0d232fba92
commit 98516e0f4d
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98

View File

@ -6,7 +6,7 @@
! Doc Authors : 曾奥然 <ccmywish@qq.com>
! Contributors : Nul None <nul@none.org>
! Created On : <2025-08-10>
! Last Modified : <2025-08-18>
! Last Modified : <2025-08-20>
! ---------------------------------------------------------- -->
# chsrc 代码风格
@ -88,11 +88,14 @@ if (!matched) matched = iterate_menu (chsrc_wr_menu, input, &target_tmp);
- 整体上基于 `GNU style`,但我们坚持自己的美学原则,在细节上有所改进
- 类型名: `PascalCase_t`
- 类型名: `PascalCase_t`,即 `UpperCamelCase_t`
- 函数定义和调用时,**函数名和`()`之间始终保持一个空格**,如果是在宏中,可紧凑一些,无硬性规定
- 函数和函数定义之间保持**2个空行**,若一系列函数和一系列函数存在主题性区别,**可用3个空行**
- 函数和函数定义之间**一般保持2个空行**
- 若函数之间有高度关联性,**可用1个空行**
- 若一系列函数和一系列函数存在主题性区别,**可用3个空行**
<br>