diff --git a/Documentation/NuttXCCodingStandard.html b/Documentation/NuttXCCodingStandard.html index 3924e3ab06..f131dc100b 100644 --- a/Documentation/NuttXCCodingStandard.html +++ b/Documentation/NuttXCCodingStandard.html @@ -87,7 +87,7 @@

NuttX C Coding Standard

-

Last Updated: June 5, 2019

+

Last Updated: July 5, 2019

@@ -1039,6 +1039,16 @@ int animals(int animal) Indentation of Pre-Processor Lines. C Pre-processor commands following any conditional computation are also indented following basically the indentation same rules, differing in that the # always remains in column 1.

+

+ When C pre-processor statements are indented, they should be should be indented by 2 spaces per level-of-indentation following the #. + C pre-processor statements should be indented when they are enclosed within C pre-processor conditional logic (#if..#endif). The level of indentation increases with each level of such nested conditional logic. +

+

+ C pre-processor statements should always be indented in this way in the Pre-processor Definitions section of each file. + C pre-processor statements may be indented in the Public/Private Data and Public/Private Functions sections of the file. + However, often the indentation of C pre-processor statements conflicts with the indentation of the C code and makes the code more difficult to read. + In such cases, indentation of C pre-processor statements should be ommitted in those sections (only). +

@@ -1815,6 +1825,10 @@ enum xyz_state_e Side effects. Be careful of side effects. +
  • + Indentation. + See the Indentation of Pre-Processor Lines requirements above. +
  • Other Applicable Coding Standards.