commit f3ac1c962f9e3d7ff7d55141220df97c2b343ada
Author: Thomas Schöpping <tschoepp@cit-ec.uni-bielefeld.de>
Date:   Mon Feb 4 18:08:00 2019 +0100

    Applied a file structure template to all source files.

diff --git a/core/src/aos_shell.c b/core/src/aos_shell.c
index 25b1a1f..fbbfa6b 100644
--- a/core/src/aos_shell.c
+++ b/core/src/aos_shell.c
@@ -32,6 +32,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <aos_time.h>
 #include <aos_system.h>
 #include <string.h>
+/******************************************************************************/
+/* LOCAL DEFINITIONS                                                          */
+/******************************************************************************/
 
 /**
  * @brief   Event mask to be set on OS related events.
@@ -43,6 +46,90 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 #define AOS_SHELL_EVENTMASK_INPUT               EVENT_MASK(1)
 
+/******************************************************************************/
+/* EXPORTED VARIABLES                                                         */
+/******************************************************************************/
+
+/******************************************************************************/
+/* LOCAL TYPES                                                                */
+/******************************************************************************/
+
+/*
+ * forward declarations
+ */
+static size_t _channelwrite(void *instance, const uint8_t *bp, size_t n);
+static size_t _channelread(void *instance, uint8_t *bp, size_t n);
+static msg_t _channelput(void *instance, uint8_t b);
+static msg_t _channelget(void *instance);
+static msg_t _channelputt(void *instance, uint8_t b, sysinterval_t time);
+static msg_t _channelgett(void *instance, sysinterval_t time);
+static size_t _channelwritet(void *instance, const uint8_t *bp, size_t n, sysinterval_t time);
+static size_t _channelreadt(void *instance, uint8_t *bp, size_t n, sysinterval_t time);
+static msg_t _channelctl(void *instance, unsigned int operation, void *arg);
+static size_t _streamwrite(void *instance, const uint8_t *bp, size_t n);
+static size_t _stremread(void *instance, uint8_t *bp, size_t n);
+static msg_t _streamput(void *instance, uint8_t b);
+static msg_t _streamget(void *instance);
+
+static const struct AosShellChannelVMT _channelvmt = {
+  (size_t) 0,
+  _channelwrite,
+  _channelread,
+  _channelput,
+  _channelget,
+  _channelputt,
+  _channelgett,
+  _channelwritet,
+  _channelreadt,
+  _channelctl,
+};
+
+static const struct AosShellStreamVMT _streamvmt = {
+  (size_t) 0,
+  _streamwrite,
+  _stremread,
+  _streamput,
+  _streamget,
+};
+
+/**
+ * @brief   Enumerator of special keyboard keys.
+ */
+typedef enum special_key {
+  KEY_UNKNOWN,      /**< any/unknow key */
+  KEY_AMBIGUOUS,    /**< key is ambiguous */
+  KEY_TAB,          /**< tabulator key */
+  KEY_ESCAPE,       /**< escape key */
+  KEY_BACKSPACE,    /**< backspace key */
+  KEY_INSERT,       /**< insert key */
+  KEY_DELETE,       /**< delete key */
+  KEY_HOME,         /**< home key */
+  KEY_END,          /**< end key */
+  KEY_PAGE_UP,      /**< page up key */
+  KEY_PAGE_DOWN,    /**< page down key */
+  KEY_ARROW_UP,     /**< arrow up key */
+  KEY_ARROW_DOWN,   /**< arrow down key */
+  KEY_ARROW_LEFT,   /**< arrow left key */
+  KEY_ARROW_RIGHT,  /**< arrow right key */
+} special_key_t;
+
+/**
+ * @brief   Enumerator for case (in)sensitive character matching.
+ */
+typedef enum charmatch {
+  CHAR_MATCH_NOT    = 0,  /**< Characters do not match at all. */
+  CHAR_MATCH_NCASE  = 1,  /**< Characters would match case insensitive. */
+  CHAR_MATCH_CASE   = 2,  /**< Characters do match with case. */
+} charmatch_t;
+
+/******************************************************************************/
+/* LOCAL VARIABLES                                                            */
+/******************************************************************************/
+
+/******************************************************************************/
+/* LOCAL FUNCTIONS                                                            */
+/******************************************************************************/
+
 /**
  * @brief   Implementation of the BaseAsynchronous write() method (inherited from BaseSequentialStream).
  */
@@ -142,7 +229,8 @@ static size_t _channelreadt(void *instance, uint8_t *bp, size_t n, sysinterval_t
 /**
  * @brief   Implementation of the BaseAsynchronousChannel ctl() method.
  */
-static msg_t _channelctl(void *instance, unsigned int operation, void *arg) {
+static msg_t _channelctl(void *instance, unsigned int operation, void *arg)
+{
   (void) instance;
 
   switch (operation) {
@@ -158,19 +246,6 @@ static msg_t _channelctl(void *instance, unsigned int operation, void *arg) {
   return MSG_OK;
 }
 
-static const struct AosShellChannelVMT _channelvmt = {
-  (size_t) 0,
-  _channelwrite,
-  _channelread,
-  _channelput,
-  _channelget,
-  _channelputt,
-  _channelgett,
-  _channelwritet,
-  _channelreadt,
-  _channelctl,
-};
-
 static size_t _streamwrite(void *instance, const uint8_t *bp, size_t n)
 {
   aosDbgCheck(instance != NULL);
@@ -224,44 +299,6 @@ static msg_t _streamget(void *instance)
   return 0;
 }
 
-static const struct AosShellStreamVMT _streamvmt = {
-  (size_t) 0,
-  _streamwrite,
-  _stremread,
-  _streamput,
-  _streamget,
-};
-
-/**
- * @brief   Enumerator of special keyboard keys.
- */
-typedef enum special_key {
-  KEY_UNKNOWN,      /**< any/unknow key */
-  KEY_AMBIGUOUS,    /**< key is ambiguous */
-  KEY_TAB,          /**< tabulator key */
-  KEY_ESCAPE,       /**< escape key */
-  KEY_BACKSPACE,    /**< backspace key */
-  KEY_INSERT,       /**< insert key */
-  KEY_DELETE,       /**< delete key */
-  KEY_HOME,         /**< home key */
-  KEY_END,          /**< end key */
-  KEY_PAGE_UP,      /**< page up key */
-  KEY_PAGE_DOWN,    /**< page down key */
-  KEY_ARROW_UP,     /**< arrow up key */
-  KEY_ARROW_DOWN,   /**< arrow down key */
-  KEY_ARROW_LEFT,   /**< arrow left key */
-  KEY_ARROW_RIGHT,  /**< arrow right key */
-} special_key_t;
-
-/**
- * @brief   Enumerator for case (in)sensitive character matching.
- */
-typedef enum charmatch {
-  CHAR_MATCH_NOT    = 0,  /**< Characters do not match at all. */
-  CHAR_MATCH_NCASE  = 1,  /**< Characters would match case insensitive. */
-  CHAR_MATCH_CASE   = 2,  /**< Characters do match with case. */
-} charmatch_t;
-
 /**
  * @brief   Print the shell prompt
  * @details Depending on the configuration flags, the system uptime is printed before the prompt string.
@@ -1095,6 +1132,10 @@ static size_t _parseArguments(aos_shell_t* shell)
   return arg;
 }
 
+/******************************************************************************/
+/* EXPORTED FUNCTIONS                                                         */
+/******************************************************************************/
+
 /**
  * @brief   Initializes a shell object with the specified parameters.
  *
