import cinit from unix.schottelius.org
Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
This commit is contained in:
parent
3729fc68eb
commit
423ba10303
13396 changed files with 269468 additions and 0 deletions
|
|
@ -0,0 +1,49 @@
|
|||
Coding style
|
||||
============
|
||||
Nico Schottelius <nico-cinit]at[schottelius.org>
|
||||
0.1, for cinit, Initial version from 2006-11-13
|
||||
:Author Initials: NS
|
||||
|
||||
This document describes the coding style used in cinit.
|
||||
|
||||
|
||||
Indent
|
||||
------
|
||||
Indent the code by 3 spaces for each level.
|
||||
|
||||
|
||||
Unsorted
|
||||
---------
|
||||
Linebreaks:
|
||||
|
||||
|
||||
if(...) {
|
||||
|
||||
} else {
|
||||
}
|
||||
|
||||
|
||||
do {
|
||||
} while();
|
||||
|
||||
no spaces
|
||||
- within braces and code "(!test)",
|
||||
- before braces "if(code)"
|
||||
|
||||
spaces
|
||||
- after braces "if(test) return 0;"
|
||||
- spaces before and after '=' (a = b);
|
||||
|
||||
curly braces:
|
||||
functions:
|
||||
int func(int params)
|
||||
{
|
||||
body
|
||||
}
|
||||
|
||||
comments:
|
||||
where necessery, do not state the obvious in comments:
|
||||
|
||||
/* this code increments tmp */
|
||||
++tmp;
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue