1 | We use the GNU conding convention (which is also used in xemacs etc.): |
---|
2 | |
---|
3 | -- Put a space after every comma. |
---|
4 | -- Put a space before the parenthesis that begins a function call, |
---|
5 | macro call, function declaration or definition, or control |
---|
6 | statement (if, while, switch, for). (DO NOT do this for macro |
---|
7 | definitions; this is invalid preprocessor syntax.) |
---|
8 | -- The brace that begins a control statement (if, while, for, switch, |
---|
9 | do) or a function definition should go on a line by itself. |
---|
10 | -- In function definitions, put the return type and all other |
---|
11 | qualifiers on a line before the function name. Thus, the function |
---|
12 | name is always at the beginning of a line. |
---|
13 | -- Indentation level is two spaces. (However, the first and following |
---|
14 | statements of a while/for/if/etc. block are indented four spaces |
---|
15 | from the while/for/if keyword. The opening and closing braces are |
---|
16 | indented two spaces.) |
---|
17 | -- Variable and function names should be all lowercase, with underscores |
---|
18 | separating words, except for a prefixing tag, which may be in |
---|
19 | uppercase. Do not use the mixed-case convention (e.g. |
---|
20 | SetVariableToValue ()) and *especially* do not use Microsoft |
---|
21 | Hungarian notation (char **rgszRedundantTag). |
---|
22 | -- preprocessor and enum constants should be all uppercase, and should |
---|
23 | be prefixed with a tag that groups related constants together. |
---|
24 | |
---|
25 | |
---|