blob: ecc1c10054152f8a5bea68e84aa8dbbbbd4e9253 [file] [log] [blame]
Robert Hak40bafc52002-08-21 10:19:23 +00001$Id$
2
Robert Hak465ba3e2002-08-21 10:29:58 +00003 __________ __ ___.
4 Open \______ \ ____ ____ | | _\_ |__ _______ ___
5 Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
6 Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
7 Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
8 \/ \/ \/ \/ \/
9 Contribution Policies
10
11
Robert Hak40bafc52002-08-21 10:19:23 +000012In order for the project to run as smoothly as possible, it's best if all
13contributors adhere to a few simple conventions:
14
15Language
16--------
17Write all code in C. Sometimes assembly is faster, but C is always more
18readable and maintainable.
19
20Language features
21-----------------
22Write normal C code. Don't redefine the language. No new types (structs are
Björn Stenberg83b8ede2004-11-11 09:40:48 +000023structs, not typedefs), no C++isms or Javaisms.
Robert Hak40bafc52002-08-21 10:19:23 +000024
25Names
26-----
27Variables and function names should be all lower case.
28Preprocessor symbols should be all uppercase.
29
Daniel Stenberg071898e2003-03-04 15:06:53 +000030Comments
31--------
32We only use plain old /* C standard comments */.
Tomas Salfischbergerabf975d2006-02-27 15:01:34 +000033If you want to comment out large blocks containing other comments, use #if 0.
Daniel Stenberg071898e2003-03-04 15:06:53 +000034
Robert Hak40bafc52002-08-21 10:19:23 +000035Style
36-----
37When changing code, follow the code style of the file you are editing.
38
39When writing new files, you may use the brace placement style of your choice.
40
41Always indent your code with four spaces. Don't use TAB characters, as that
42will mess up code display in CVS, printing, and a zillion other places.
43
44Keep lines below 80 columns length. Use whitespace and newlines to make the
45code easy to browse/read.
46
47Text format
48-----------
49Use "unix style" line feeds: "LF" only. Do not use "CR+LF".
50
Daniel Stenberg95cde0b2005-10-28 10:44:50 +000051Use ISO-8859-1 character set, but try to refrain from using any non-ascii
52letters as they will only appear weird in some camps no matter what.
53
Robert Hak40bafc52002-08-21 10:19:23 +000054Patches
55-------
56Create a patch using 'cvs diff -ub'.
57Trim your patches so they only contain relevant changes.
Robert Hak40bafc52002-08-21 10:19:23 +000058
Daniel Stenberg55da2792006-02-26 23:28:15 +000059Submit your patch to the project via our patch tracker:
60http://www.rockbox.org/bugs/index.php?type=4