Here is an example of how to format AROS code:
Look ugly, eh ? :-)
Ok, here are the rules:
- If several lines contain similar code, put similar things below each
other (see a and b);
- Put spaces between operands and operators
- Put braces , brackets [] and parenthese () below each other (d) if
there is much code between. Brackets and parenthese may be in one line if
the code between is small (c)
- Indent by 4 Spaces. Two indent levels may be abbreviated by one tab.
- If you have a function with many arguments (d, e) you should put the
parenthese in lines of their own and each argument in one line (d) or put
the first argument behind the opening parenthese (e) and each following
argument in a line of its own with the comma in front. The closing
parenthese is in a line of its own and aligned with the beginning of the
expression (ie. the a and not the opening parenthese or the |printf()|).
- use a single blank line to separate logical blocks. Large comments
should have a blank line before and after them, small comments should be
put before the code they explain with only one blank line before them.