2002-08-21 10:19:23 +00:00
|
|
|
$Id$
|
|
|
|
|
2002-08-21 10:29:58 +00:00
|
|
|
__________ __ ___.
|
|
|
|
Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
\/ \/ \/ \/ \/
|
|
|
|
Contribution Policies
|
|
|
|
|
|
|
|
|
2002-08-21 10:19:23 +00:00
|
|
|
In order for the project to run as smoothly as possible, it's best if all
|
2006-03-03 07:31:54 +00:00
|
|
|
contributors adhere to a few simple source code conventions:
|
|
|
|
|
|
|
|
Exceptions
|
|
|
|
----------
|
|
|
|
This project borrows and imports quite a lot of code from other free software
|
|
|
|
projects. We do not change style of such code unless we really have to, even
|
|
|
|
though they might be using style very different from others.
|
2002-08-21 10:19:23 +00:00
|
|
|
|
|
|
|
Language
|
|
|
|
--------
|
|
|
|
Write all code in C. Sometimes assembly is faster, but C is always more
|
|
|
|
readable and maintainable.
|
|
|
|
|
|
|
|
Language features
|
|
|
|
-----------------
|
|
|
|
Write normal C code. Don't redefine the language. No new types (structs are
|
2004-11-11 09:40:48 +00:00
|
|
|
structs, not typedefs), no C++isms or Javaisms.
|
2002-08-21 10:19:23 +00:00
|
|
|
|
|
|
|
Names
|
|
|
|
-----
|
|
|
|
Variables and function names should be all lower case.
|
|
|
|
Preprocessor symbols should be all uppercase.
|
|
|
|
|
2003-03-04 15:06:53 +00:00
|
|
|
Comments
|
|
|
|
--------
|
|
|
|
We only use plain old /* C standard comments */.
|
2006-02-27 15:01:34 +00:00
|
|
|
If you want to comment out large blocks containing other comments, use #if 0.
|
2003-03-04 15:06:53 +00:00
|
|
|
|
2002-08-21 10:19:23 +00:00
|
|
|
Style
|
|
|
|
-----
|
|
|
|
When changing code, follow the code style of the file you are editing.
|
|
|
|
|
|
|
|
When writing new files, you may use the brace placement style of your choice.
|
|
|
|
|
|
|
|
Always indent your code with four spaces. Don't use TAB characters, as that
|
|
|
|
will mess up code display in CVS, printing, and a zillion other places.
|
|
|
|
|
|
|
|
Keep lines below 80 columns length. Use whitespace and newlines to make the
|
|
|
|
code easy to browse/read.
|
|
|
|
|
|
|
|
Text format
|
|
|
|
-----------
|
|
|
|
Use "unix style" line feeds: "LF" only. Do not use "CR+LF".
|
|
|
|
|
2005-10-28 10:44:50 +00:00
|
|
|
Use ISO-8859-1 character set, but try to refrain from using any non-ascii
|
|
|
|
letters as they will only appear weird in some camps no matter what.
|
|
|
|
|
2002-08-21 10:19:23 +00:00
|
|
|
Patches
|
|
|
|
-------
|
|
|
|
Create a patch using 'cvs diff -ub'.
|
|
|
|
Trim your patches so they only contain relevant changes.
|
|
|
|
|
2006-02-26 23:28:15 +00:00
|
|
|
Submit your patch to the project via our patch tracker:
|
2006-08-11 00:21:42 +00:00
|
|
|
http://www.rockbox.org/tracker/index.php?type=4
|
2006-03-09 14:58:15 +00:00
|
|
|
|
|
|
|
Credits
|
|
|
|
-------
|
|
|
|
We believe in crediting all contributors by name. Before committing a patch to
|
|
|
|
CVS, we ask that you give us your full real name (no pseudonyms or nicknames)
|
|
|
|
for adding to the credits list.
|