1 Star 0 Fork 0

prestige111/jos

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CODING 1.18 KB
一键复制 编辑 原始数据 按行查看 历史
Anish Athalye 提交于 2018-08-31 03:17 +08:00 . Lab 1
JOS CODING STANDARDS
It's easier on everyone if all authors working on a shared
code base are consistent in the way they write their programs.
We have the following conventions in our code:
* No space after the name of a function in a call
For example, printf("hello") not printf ("hello").
* One space after keywords "if", "for", "while", "switch".
For example, if (x) not if(x).
* Space before braces.
For example, if (x) { not if (x){.
* Function names are all lower-case separated by underscores.
* Beginning-of-line indentation via tabs, not spaces.
* Preprocessor macros are always UPPERCASE.
There are a few grandfathered exceptions: assert, panic,
static_assert, offsetof.
* Pointer types have spaces: (uint16_t *) not (uint16_t*).
* Multi-word names are lower_case_with_underscores.
* Comments in imported code are usually C /* ... */ comments.
Comments in new code are C++ style //.
* In a function definition, the function name starts a new line.
Then you can grep -n '^foo' */*.c to find the definition of foo.
* Functions that take no arguments are declared f(void) not f().
The included .dir-locals.el file will automatically set up the basic
indentation style in Emacs.
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/prestige111/jos.git
git@gitee.com:prestige111/jos.git
prestige111
jos
jos
lab5

搜索帮助