www.nico.schottelius.org/software/cinit/browse_source/cinit-0.3pre7/doc/devel/codingguideline

33 lines
724 B
Text
Raw Normal View History

When to place spaces?
After and before comments:
/* text */
o
Where to put curly braces?
functions: at the beginning of the line:
void func(char *what, int where)
{
}
Before and after '=', '==', '!='', '>=', '<='
After ')', ','
No space before ), so if '))', do not put a space after the first ')'.
Header:
Put a header into each file, containing:
- date of file being put into existence (year is enough)
- Name and E-mail of Author
- Description of the function
Includes:
System includes first,
own headers later
Indent:
Three spaces. No tabs.
Indent variable names, so the names begin all at the same position. Use three spaces
to place them.