# HG changeset patch # User Florian Pose # Date 1319800074 -7200 # Node ID 0814802f59288ebf3b6ff541984e6a28d4040124 # Parent 0383b71b88e445774b354a319ff2dbdc4baeefc1 Again coding style. diff -r 0383b71b88e4 -r 0814802f5928 CodingStyle.txt --- a/CodingStyle.txt Fri Oct 28 11:31:54 2011 +0200 +++ b/CodingStyle.txt Fri Oct 28 13:07:54 2011 +0200 @@ -7,16 +7,25 @@ which the Linux Kernel coding style shall be used to minimize the differences). -* Lines shall not exceed 78 characters. +1) Line length -* Indentation shall be done using 4 space characters +- Lines shall not exceed 78 characters. -* No whitespace shall be left at the end of a line. +2) Whitespace -* After a comma, a single space shall be placed (if not followed by a - line break). +- Indentation shall be done using 4 space characters -* Braces shall be placed in the following way (K&R style): +- No whitespace shall be left at the end of a line. + +- After commas, colons and semicolons, a single space shall be + placed (if not followed by a line break). + +- Binary operators (=, ==, ~=, |, ||, etc.) shall be enclosed by 2 spaces + (except . and ->). + +3) Placing braces + +- Braces shall be placed in the following way (K&R style): if (...) { ... @@ -31,10 +40,12 @@ ... } -* Macros shall be named in CAPITAL letters. If a macro contains multiple - statements, they should be enclosed by a 'do {} while (0)' loop. Macro - parameters shall also be capital letters and shall be enclosed py parantheses - if necessary. +4) Defines and Macros + +- Defines and macros shall be named in CAPITAL letters. If a macro contains + multiple statements, they should be enclosed by a 'do {} while (0)' loop. + Macro parameters shall also be capital letters and shall be enclosed py + parantheses if necessary. #define MACRO(A, B) \ do { \ diff -r 0383b71b88e4 -r 0814802f5928 README --- a/README Fri Oct 28 11:31:54 2011 +0200 +++ b/README Fri Oct 28 13:07:54 2011 +0200 @@ -2,7 +2,7 @@ This is the README file of the IgH EtherCAT Master. -$Id: README,v 11c0b2caa253 2009/02/24 12:51:39 fp $ +$Id$ vim: spelllang=en spell tw=78