diff options
Diffstat (limited to 'firmware/CONTRIBUTING')
-rw-r--r-- | firmware/CONTRIBUTING | 43 |
1 files changed, 33 insertions, 10 deletions
diff --git a/firmware/CONTRIBUTING b/firmware/CONTRIBUTING index 73f124eb7b..dce0227d25 100644 --- a/firmware/CONTRIBUTING +++ b/firmware/CONTRIBUTING | |||
@@ -3,17 +3,40 @@ $Id$ | |||
3 | In order for the project to run as smoothly as possible, it's best if all | 3 | In order for the project to run as smoothly as possible, it's best if all |
4 | contributors adhere to a few simple conventions: | 4 | contributors adhere to a few simple conventions: |
5 | 5 | ||
6 | - Write all code in C. Sometimes assembly is faster, but C is always more | 6 | Language |
7 | readable and maintainable. | 7 | -------- |
8 | Write all code in C. Sometimes assembly is faster, but C is always more | ||
9 | readable and maintainable. | ||
8 | 10 | ||
9 | - Write normal C code. Don't redefine the language. No new types, | 11 | Language features |
10 | no C++isms or Javaisms. Also, do not use "const". | 12 | ----------------- |
13 | Write normal C code. Don't redefine the language. No new types (structs are | ||
14 | structs, not typedefs), no C++isms or Javaisms. Also, avoid using "const". | ||
11 | 15 | ||
12 | - Variables and function names should be all lower case. | 16 | Names |
13 | Preprocessor symbols should be all uppercase. | 17 | ----- |
18 | Variables and function names should be all lower case. | ||
19 | Preprocessor symbols should be all uppercase. | ||
14 | 20 | ||
15 | - Use the brace placement style of your choice, but indent your code with | 21 | Style |
16 | four spaces. Don't use TAB characters, as that will mess up code display in | 22 | ----- |
17 | CVS, printing, and a zillion other places. | 23 | When changing code, follow the code style of the file you are editing. |
18 | 24 | ||
19 | - Use "unix style" line feeds: "LF" only. Do not use "CR+LF". | 25 | When writing new files, you may use the brace placement style of your choice. |
26 | |||
27 | Always indent your code with four spaces. Don't use TAB characters, as that | ||
28 | will mess up code display in CVS, printing, and a zillion other places. | ||
29 | |||
30 | Keep lines below 80 columns length. Use whitespace and newlines to make the | ||
31 | code easy to browse/read. | ||
32 | |||
33 | Text format | ||
34 | ----------- | ||
35 | Use "unix style" line feeds: "LF" only. Do not use "CR+LF". | ||
36 | |||
37 | Patches | ||
38 | ------- | ||
39 | Create a patch using 'cvs diff -ub'. Trim your patches so they only contain | ||
40 | relevant changes. | ||
41 | Submit all patches to the mailing list. Put [PATCH] first on the subject line | ||
42 | of your mail. If the patch is very large (>50k), gzip it before you send it. | ||