Skip to content

Commit 2c6ecbb

Browse files
committed
Expand details on standards compliance
1 parent 526bdf1 commit 2c6ecbb

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

Diff for: STYLE.md

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11

22
The following are coding style guidelines for this project.
33

4-
Code is expected to be ANSI C compatible (C89). Use `/* ... */` comments, not
5-
`// ...` comments.
6-
74
To automatically format all source code, install
85
[clang-format](https://clang.llvm.org/docs/ClangFormat.html) and
96
run `make format`.
107

8+
## Standard compliance
9+
10+
Code is expected to be ANSI C compatible (C89). This means:
11+
12+
* All variables must be declared at the beginning of a block.
13+
* Use `/* ... */` comments, not `// ...` comments.
14+
* There is no bool type (as added in C99); `int` is used for boolean values.
15+
* Other features added by later standards may not be used, such as inline
16+
functions, variable-length arrays or `long long`.
17+
1118
## Blocks
1219

1320
The indentation rules are a variant on the K&R style.

0 commit comments

Comments
 (0)