diff options
Diffstat (limited to 'nuttx/lib/lib_snprintf.c')
-rw-r--r-- | nuttx/lib/lib_snprintf.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/nuttx/lib/lib_snprintf.c b/nuttx/lib/lib_snprintf.c index 4f018ff51..e1673161f 100644 --- a/nuttx/lib/lib_snprintf.c +++ b/nuttx/lib/lib_snprintf.c @@ -1,7 +1,7 @@ -/************************************************************ - * lib_snprintf.c +/**************************************************************************** + * lib/lib_snprintf.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,52 +31,52 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <stdio.h> #include "lib_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Function Prototypes - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Constant Data - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Constant Data - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * sprintf - ************************************************************/ + ****************************************************************************/ -int snprintf(char *buf, size_t size, const char *format, ...) +int snprintf(FAR char *buf, size_t size, const char *format, ...) { struct lib_memstream_s memstream; va_list ap; @@ -84,12 +84,12 @@ int snprintf(char *buf, size_t size, const char *format, ...) /* Initialize a memory stream to write to the buffer */ - lib_memstream(&memstream, buf, size); + lib_memstream((FAR struct lib_memstream_s *)&memstream, buf, size); /* Then let lib_vsprintf do the real work */ va_start(ap, format); - n = lib_vsprintf(&memstream.public, format, ap); + n = lib_vsprintf((FAR struct lib_stream_s *)&memstream.public, format, ap); va_end(ap); return n; } |