From 085dcf92e333bdea8a4b6c3d4b6e622772444871 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 9 Feb 2017 12:57:44 -0600 Subject: [PATCH] Update Coding Standard and some Kconfig comments. --- Documentation/NuttXCCodingStandard.html | 14 +++++++++++++- libc/Kconfig | 17 ++++++++++------- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/Documentation/NuttXCCodingStandard.html b/Documentation/NuttXCCodingStandard.html index 7505acfd13..977af36225 100644 --- a/Documentation/NuttXCCodingStandard.html +++ b/Documentation/NuttXCCodingStandard.html @@ -12,7 +12,7 @@

NuttX C Coding Standard

-

Last Updated: August 24, 2016

+

Last Updated: February 9, 2017

@@ -1074,6 +1074,15 @@ int do_foobar(void)

2.2 Global Variables

+Global vs. Local vs. Public vs. Private +By a global variable it is meant any variable defined outside of a function. +The distinction is between this kind of global and function local definition and refers to the scope a symbol within a file. +A related concept for all global names defined within a file is the scope of the name across different files. +If the global symbol is pre-pended with the static storage class then the scope of the global symbol is within the file only. +This is a somewhat different concept and within NuttX you will find these distinguished as private vs. public global symbols. +However, within this standard, the term global variable will refer to any variable that has more than local scope. + +

Coding Standard:

diff --git a/libc/Kconfig b/libc/Kconfig index 774a4e00c6..089f77571b 100644 --- a/libc/Kconfig +++ b/libc/Kconfig @@ -10,15 +10,18 @@ config STDIO_DISABLE_BUFFERING default n ---help--- Tiny systems may need to disable all support for I/O buffering in - order to minimum footprint. + order to minimize the memory footprint. NOTE that even if STDIO buffering is enabled, you can still disable - buffer by setting CONFIG_STDIO_BUFFER_SIZE=0 or dynamically through - the setvbuf() interface. In this case, however, memory used for - buffering will be eliminated, of course, buth there will be no - reduction in static code size. Only setting + buffering by setting CONFIG_STDIO_BUFFER_SIZE=0 or dynamically + through the setvbuf() interface. In this case, however, memory + used forbuffering will be eliminated, of course, buth there will be + no reduction in static code size. Only setting CONFIG_STDIO_DISABLE_BUFFERING will reduce static code size. + The setvbuf() interface is not available if + CONFIG_STDIO_DISABLE_BUFFERING is selected. + if !STDIO_DISABLE_BUFFERING config STDIO_BUFFER_SIZE @@ -27,8 +30,8 @@ config STDIO_BUFFER_SIZE ---help--- Size of buffers using within the C buffered I/O interfaces (printf, putchar, fwrite, etc.). This function sets the initial I/O buffer - size. Zero disables I/O buffering. That size may be subsequently - modified using setvbuf(). + size. Zero disables I/O buffering initially. Any buffer size may + be subsequently modified using setvbuf(). config STDIO_LINEBUFFER bool "STDIO line buffering"