- Added coding style to README
authordrath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Sun, 2 Mar 2008 16:46:37 +0000 (16:46 +0000)
committerdrath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Sun, 2 Mar 2008 16:46:37 +0000 (16:46 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@433 b42882b7-edfa-0310-969c-e2dbd0fdcd60

README

diff --git a/README b/README
index 1d9bd5ab732152afa801e5764a05051153536c3d..0d0a7e2b3204d1533e4b1db347bcc97bb9551a93 100644 (file)
--- a/README
+++ b/README
@@ -134,7 +134,37 @@ http://openfacts.berlios.de/index-en.phtml?title=Open_On-Chip_Debugger.
 There is also and openocd(1) manpage, the 'openocd --help' output and
 an OpenOCD info page (type 'info openocd').
 
 There is also and openocd(1) manpage, the 'openocd --help' output and
 an OpenOCD info page (type 'info openocd').
 
-5. Licensing
+5. Coding Style
+
+The following rules try to describe formatting and naming conventions that 
+should be followed to make the whole OpenOCD code look more consistent.
+The ultimate goal of coding style should be readability, and these rules may 
+be ignored for a particular (small) piece of code if that makes it more 
+readable.
+
+Formatting rules:
+- remove any trailing white space
+- use TAB characters for indentation, not spaces
+- displayed TAB width is 4 characters
+- make sure NOT to use DOS '\r\n' line feeds
+- do not add more than 2 empty lines to source files
+- do not add trailing empty lines to source files
+- do not use C++ style comments (//)
+- lines may be reasonably wide - there's no anachronistic 80 characters limit
+
+Naming rules:
+- identifiers use lower-case letters only
+- identifiers consisting of multiple words use underline characters between 
+consecutive words
+- macros use upper-case letters only
+- structure names shall be appended with '_s'
+- typedefs shall be appended with '_t'
+
+Function calls:
+- function calls have no space between the functions name and the parameter 
+list: my_func(param1, param2, ...)
+
+6. Licensing
 
 OpenOCD is licensed under the terms of the GNU General Public License, see the
 file COPYING for details.
 
 OpenOCD is licensed under the terms of the GNU General Public License, see the
 file COPYING for details.

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)