Skip to content

Commit

Permalink
Expand details on standards compliance
Browse files Browse the repository at this point in the history
  • Loading branch information
fragglet committed Dec 17, 2024
1 parent 526bdf1 commit 2c6ecbb
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions STYLE.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@

The following are coding style guidelines for this project.

Code is expected to be ANSI C compatible (C89). Use `/* ... */` comments, not
`// ...` comments.

To automatically format all source code, install
[clang-format](https://clang.llvm.org/docs/ClangFormat.html) and
run `make format`.

## Standard compliance

Code is expected to be ANSI C compatible (C89). This means:

* All variables must be declared at the beginning of a block.
* Use `/* ... */` comments, not `// ...` comments.
* There is no bool type (as added in C99); `int` is used for boolean values.
* Other features added by later standards may not be used, such as inline
functions, variable-length arrays or `long long`.

## Blocks

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

0 comments on commit 2c6ecbb

Please sign in to comment.