Robert Hak | 40bafc5 | 2002-08-21 10:19:23 +0000 | [diff] [blame] | 1 | $Id$ |
| 2 | |
Robert Hak | 465ba3e | 2002-08-21 10:29:58 +0000 | [diff] [blame^] | 3 | __________ __ ___. |
| 4 | Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
| 5 | Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / |
| 6 | Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
| 7 | Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
| 8 | \/ \/ \/ \/ \/ |
| 9 | Contribution Policies |
| 10 | |
| 11 | |
Robert Hak | 40bafc5 | 2002-08-21 10:19:23 +0000 | [diff] [blame] | 12 | In order for the project to run as smoothly as possible, it's best if all |
| 13 | contributors adhere to a few simple conventions: |
| 14 | |
| 15 | Language |
| 16 | -------- |
| 17 | Write all code in C. Sometimes assembly is faster, but C is always more |
| 18 | readable and maintainable. |
| 19 | |
| 20 | Language features |
| 21 | ----------------- |
| 22 | Write normal C code. Don't redefine the language. No new types (structs are |
| 23 | structs, not typedefs), no C++isms or Javaisms. Also, avoid using "const". |
| 24 | |
| 25 | Names |
| 26 | ----- |
| 27 | Variables and function names should be all lower case. |
| 28 | Preprocessor symbols should be all uppercase. |
| 29 | |
| 30 | Style |
| 31 | ----- |
| 32 | When changing code, follow the code style of the file you are editing. |
| 33 | |
| 34 | When writing new files, you may use the brace placement style of your choice. |
| 35 | |
| 36 | Always indent your code with four spaces. Don't use TAB characters, as that |
| 37 | will mess up code display in CVS, printing, and a zillion other places. |
| 38 | |
| 39 | Keep lines below 80 columns length. Use whitespace and newlines to make the |
| 40 | code easy to browse/read. |
| 41 | |
| 42 | Text format |
| 43 | ----------- |
| 44 | Use "unix style" line feeds: "LF" only. Do not use "CR+LF". |
| 45 | |
| 46 | Patches |
| 47 | ------- |
| 48 | Create a patch using 'cvs diff -ub'. |
| 49 | Trim your patches so they only contain relevant changes. |
| 50 | Submit all patches to the mailing list. |
| 51 | Put [PATCH] first on the subject line of your mail. |
| 52 | If the patch is very large (>50k), gzip it before you send it. |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |