Adjust coding style guideline to the use oof GNU indent.
This commit is contained in:
@@ -109,7 +109,7 @@ should look like.
|
|||||||
</para>
|
</para>
|
||||||
<note>
|
<note>
|
||||||
<para>
|
<para>
|
||||||
All new submitted files will be passed through BSD <command>indent</command>
|
All new submitted files will be passed through GNU <command>indent</command>
|
||||||
to enforce the style described below.
|
to enforce the style described below.
|
||||||
</para>
|
</para>
|
||||||
</note>
|
</note>
|
||||||
@@ -133,14 +133,13 @@ should look like.
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<emphasis>Line length: </emphasis>Lines of source code should be wrapped
|
<emphasis>Line length: </emphasis>Lines of source code should be wrapped
|
||||||
at column 80.
|
at column 100. Comment lines should wrap at column 79.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<emphasis>Indention: </emphasis>Tab indention shall be used (with tab
|
<emphasis>Indention: </emphasis>Tab indention shall be used (with tab
|
||||||
width set to 8 characters). Only exception are switch labels which are
|
width set to 8 characters).
|
||||||
indented a half tab (4 spaces).
|
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
@@ -217,7 +216,7 @@ unsigned char HD44780_scankeypad(PrivateData *p);
|
|||||||
comments or using pre-processor directives (#if ... #endif).
|
comments or using pre-processor directives (#if ... #endif).
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
<literal>C++</literal>-style comments shall not be used in general.
|
<literal>C++</literal>-style comments should not be used in general.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
@@ -368,18 +367,18 @@ for (a = 0; a < max; a++) {
|
|||||||
code
|
code
|
||||||
}
|
}
|
||||||
|
|
||||||
/* case labels are indented one half tab stop (4 spaces) */
|
/* case labels are not indented */
|
||||||
switch (icon) {
|
switch (icon) {
|
||||||
case ICON_BLOCK_FILLED:
|
case ICON_BLOCK_FILLED:
|
||||||
HD44780_set_char(drvthis, 6, block_filled);
|
HD44780_set_char(drvthis, 6, block_filled);
|
||||||
break;
|
break;
|
||||||
case ICON_HEART_FILLED:
|
case ICON_HEART_FILLED:
|
||||||
HD44780_set_char(drvthis, 0, heart_filled);
|
HD44780_set_char(drvthis, 0, heart_filled);
|
||||||
break;
|
break;
|
||||||
case ICON_HEART_OPEN:
|
case ICON_HEART_OPEN:
|
||||||
HD44780_set_char(drvthis, 0, heart_open);
|
HD44780_set_char(drvthis, 0, heart_open);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return -1; /* Let the core do other icons */
|
return -1; /* Let the core do other icons */
|
||||||
}
|
}
|
||||||
</screen>
|
</screen>
|
||||||
@@ -388,6 +387,54 @@ switch (icon) {
|
|||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
|
<sect2 id="code-style-indent-profile">
|
||||||
|
<title>Example indent profile</title>
|
||||||
|
<para>The following example shows an indent profile that checks and corrects
|
||||||
|
the coding style guideline described above. Copy the following text into
|
||||||
|
file <filename>.indent.pro</filename> in your home directory.</para>
|
||||||
|
<example>
|
||||||
|
<title>indent.pro example</title>
|
||||||
|
<screen>
|
||||||
|
-TPrivateData
|
||||||
|
-TDriver
|
||||||
|
|
||||||
|
-l100
|
||||||
|
-lc79
|
||||||
|
-i8
|
||||||
|
-ip8
|
||||||
|
-di1
|
||||||
|
-cd33
|
||||||
|
-ci8
|
||||||
|
-cli0
|
||||||
|
-ts8
|
||||||
|
|
||||||
|
-ut
|
||||||
|
-nsob
|
||||||
|
-sc
|
||||||
|
-psl
|
||||||
|
-npcs
|
||||||
|
-lp
|
||||||
|
-fc1
|
||||||
|
-nbc
|
||||||
|
-nce
|
||||||
|
-brs
|
||||||
|
-br
|
||||||
|
-sbi0
|
||||||
|
-saw
|
||||||
|
-sai
|
||||||
|
-saf
|
||||||
|
-nprs
|
||||||
|
-hnl
|
||||||
|
-fca
|
||||||
|
-cdw
|
||||||
|
-nbfda
|
||||||
|
-nbbo
|
||||||
|
-ncdb
|
||||||
|
-nbad
|
||||||
|
-cs
|
||||||
|
</screen>
|
||||||
|
</example>
|
||||||
|
</sect2>
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user