diff options
Diffstat (limited to 'nuttx/lib/lib_memstream.c')
-rw-r--r-- | nuttx/lib/lib_memstream.c | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/nuttx/lib/lib_memstream.c b/nuttx/lib/lib_memstream.c index 713c77e16..937408be4 100644 --- a/nuttx/lib/lib_memstream.c +++ b/nuttx/lib/lib_memstream.c @@ -1,7 +1,7 @@ -/************************************************************ - * lib_memstream.c +/**************************************************************************** + * lib/lib_memstream.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,21 +31,25 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include "lib_internal.h" -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -static void memstream_putc(struct lib_stream_s *this, int ch) +/**************************************************************************** + * Name: memstream_putc + ****************************************************************************/ + +static void memstream_putc(FAR struct lib_stream_s *this, int ch) { - struct lib_memstream_s *mthis = (struct lib_memstream_s *)this; + FAR struct lib_memstream_s *mthis = (FAR struct lib_memstream_s *)this; if (this && this->nput < mthis->buflen - 1) { mthis->buffer[this->nput] = ch; @@ -54,12 +58,16 @@ static void memstream_putc(struct lib_stream_s *this, int ch) } } -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ + +/**************************************************************************** + * Name: lib_memstream + ****************************************************************************/ -void lib_memstream(struct lib_memstream_s *memstream, - char *bufstart, int buflen) +void lib_memstream(FAR struct lib_memstream_s *memstream, + FAR char *bufstart, int buflen) { memstream->public.put = memstream_putc; memstream->public.nput = 0; /* Will be buffer index */ |