~siretart/lcd4linux/debian

« back to all changes in this revision

Viewing changes to CodingStyle

  • Committer: Reinhard Tartler
  • Date: 2011-04-27 17:24:15 UTC
  • mto: This revision was merged to the branch mainline in revision 750.
  • Revision ID: siretart@tauware.de-20110427172415-6n4aptmvmz0eztvm
Tags: upstream-0.11.0~svn1143
ImportĀ upstreamĀ versionĀ 0.11.0~svn1143

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
$Id: CodingStyle 730 2007-01-14 13:50:28Z michael $
 
2
$URL: https://ssl.bulix.org/svn/lcd4linux/trunk/CodingStyle $
 
3
 
 
4
 
 
5
LCD4Linux Coding Style
 
6
 
 
7
We decided to use a common coding style to make patches and diffs 
 
8
easier to read and apply.
 
9
 
 
10
The style we use is based on Kernighan & Ritchie and the coding style 
 
11
of the linux kernel (see /usr/src/linux/Documentation/CodingStyle),
 
12
with some differences:
 
13
 
 
14
- we use a indentation level of 4 spaces (Linus prefers 8)
 
15
- we allow lines up to 150 chars (Linus uses 80)
 
16
 
 
17
The resulting indent command is:
 
18
indent -kr -l150
 
19
 
 
20
There's a script called 'indent.sh' that comes with the LCD4Linux 
 
21
source package; all it does is call indent with all .c and .h files.
 
22
 
 
23
It is always a good idea to call 'indent.sh' before any SVN operation,
 
24
this ensures that diffs and updates won't get mixed up because of
 
25
cosmetic changes.