|
Revision 547, 0.7 kB
(checked in by reinelt, 4 years ago)
|
|
[lcd4linux @ 2005-05-08 04:32:43 by reinelt]
CodingStyle? added and applied
|
| Line | |
|---|
| 1 | LCD4Linux Coding Style |
|---|
| 2 | |
|---|
| 3 | We decided to use a common coding style to make patches and diffs |
|---|
| 4 | easier to read and apply. |
|---|
| 5 | |
|---|
| 6 | The style we use is based on Kernighan & Ritchie and the coding style |
|---|
| 7 | of the linux kernel (see /usr/src/linux/Documentation/CodingStyle), |
|---|
| 8 | with some differences: |
|---|
| 9 | |
|---|
| 10 | - we use a indentation level of 4 spaces (Linus prefers 8) |
|---|
| 11 | - we allow lines up to 150 chars (Linus uses 80) |
|---|
| 12 | |
|---|
| 13 | The resulting indent command is: |
|---|
| 14 | indent -kr -l150 |
|---|
| 15 | |
|---|
| 16 | There's a script called 'indent.sh' that comes with the LCD4Linux |
|---|
| 17 | source package; all it does is call indent with all .c and .h files. |
|---|
| 18 | |
|---|
| 19 | It is always a good idea to call 'indent.sh' before any CVS operation, |
|---|
| 20 | this ensures that diffs and updates won't get mixed up because of |
|---|
| 21 | cosmetic changes. |
|---|