From 77e4e7b2314b52b8abe182eee16cf64898e8184f Mon Sep 17 00:00:00 2001 From: Sebastien Lorquet Date: Mon, 7 Sep 2015 13:10:40 -0600 Subject: [PATCH] Change all references from avsprintf to vasprintf. From Sebastien Lorquet --- ChangeLog | 2 ++ arch | 2 +- include/cxx/cstdio | 2 +- include/stdio.h | 2 +- libc/libc.csv | 2 +- libc/stdio/Make.defs | 2 +- libc/stdio/lib_asprintf.c | 4 ++-- libc/stdio/lib_avsprintf.c | 10 +++++----- 8 files changed, 14 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1739da9bdf2..f0e17b3f10c 100755 --- a/ChangeLog +++ b/ChangeLog @@ -10948,4 +10948,6 @@ intended to support the initial board bring-up (2015-09-05). * up_initialize() all architectures: Automatically initialize all the TUN device if it is in the configuration (2015-09-06). + * Change all references from avsprintf to vasprintf. From Sebastien + Lorquet (2015-09-07). diff --git a/arch b/arch index 1e8ed1f683e..4b6d3fced65 160000 --- a/arch +++ b/arch @@ -1 +1 @@ -Subproject commit 1e8ed1f683eb8cd5ddec57ca978735bbde0af6cd +Subproject commit 4b6d3fced65486ad40609ea5d08feb0882f3d80c diff --git a/include/cxx/cstdio b/include/cxx/cstdio index e2de1c23f33..0074091a2f7 100644 --- a/include/cxx/cstdio +++ b/include/cxx/cstdio @@ -91,7 +91,7 @@ namespace std using ::vprintf; using ::vfprintf; using ::vsprintf; - using ::avsprintf; + using ::vasprintf; using ::vsnprintf; using ::vsscanf; diff --git a/include/stdio.h b/include/stdio.h index 13e99eb4a93..f75e9928d16 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -163,7 +163,7 @@ void perror(FAR const char *s); int vprintf(FAR const char *format, va_list ap); int vfprintf(FAR FILE *stream, const char *format, va_list ap); int vsprintf(FAR char *buf, const char *format, va_list ap); -int avsprintf(FAR char **ptr, const char *fmt, va_list ap); +int vasprintf(FAR char **ptr, const char *fmt, va_list ap); int vsnprintf(FAR char *buf, size_t size, const char *format, va_list ap); int vsscanf(FAR const char *buf, FAR const char *s, va_list ap); diff --git a/libc/libc.csv b/libc/libc.csv index 977a111fbe1..d93fe22a27d 100644 --- a/libc/libc.csv +++ b/libc/libc.csv @@ -5,7 +5,7 @@ "aio_return","aio.h","defined(CONFIG_FS_AIO)","ssize_t","FAR struct aiocb *" "aio_suspend","aio.h","defined(CONFIG_FS_AIO)","int","FAR struct aiocb *const []|FAR struct aiocb *const *","int","FAR const struct timespec *" "asprintf","stdio.h","","int","FAR char **","const char *","..." -"avsprintf","stdio.h","","int","FAR char **","const char *","va_list" +"vasprintf","stdio.h","","int","FAR char **","const char *","va_list" "b16atan2","fixedmath.h","!defined(CONFIG_HAVE_LONG_LONG)","b16_t","b16_t","b16_t" "b16cos","fixedmath.h","","b16_t","b16_t" "b16divb16","fixedmath.h","!defined(CONFIG_HAVE_LONG_LONG)","b16_t","b16_t","b16_t" diff --git a/libc/stdio/Make.defs b/libc/stdio/Make.defs index 66914b30f20..fbda15caaa7 100644 --- a/libc/stdio/Make.defs +++ b/libc/stdio/Make.defs @@ -38,7 +38,7 @@ # C streams. CSRCS += lib_fileno.c lib_printf.c lib_sprintf.c lib_asprintf.c -CSRCS += lib_snprintf.c lib_libsprintf.c lib_vsprintf.c lib_avsprintf.c +CSRCS += lib_snprintf.c lib_libsprintf.c lib_vsprintf.c lib_vasprintf.c CSRCS += lib_vsnprintf.c lib_libvsprintf.c lib_dprintf.c lib_vdprintf.c CSRCS += lib_meminstream.c lib_memoutstream.c lib_memsistream.c CSRCS += lib_memsostream.c lib_lowinstream.c lib_lowoutstream.c diff --git a/libc/stdio/lib_asprintf.c b/libc/stdio/lib_asprintf.c index c08d7360a61..92a17a82b0d 100644 --- a/libc/stdio/lib_asprintf.c +++ b/libc/stdio/lib_asprintf.c @@ -97,10 +97,10 @@ int asprintf (FAR char **ptr, const char *fmt, ...) va_list ap; int ret; - /* Let avsprintf do all of the work */ + /* Let vasprintf do all of the work */ va_start(ap, fmt); - ret = avsprintf(ptr, fmt, ap); + ret = vasprintf(ptr, fmt, ap); va_end(ap); return ret; diff --git a/libc/stdio/lib_avsprintf.c b/libc/stdio/lib_avsprintf.c index 6f9e5cb77c5..5f0649a1748 100644 --- a/libc/stdio/lib_avsprintf.c +++ b/libc/stdio/lib_avsprintf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libc/stdio/lib_avsprintf.c + * libc/stdio/lib_vasprintf.c * * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -49,7 +49,7 @@ ****************************************************************************/ /* On some architectures, va_list is really a pointer to a structure on the * stack. And the va_arg builtin will modify that instance of va_list. Since - * avsprintf traverse the parameters in the va_list twice, the va_list will + * vasprintf traverse the parameters in the va_list twice, the va_list will * be altered in this first cases and the second usage will fail. So far, I * have seen this only on the X86 family with GCC. */ @@ -95,14 +95,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: avsprintf + * Name: vasprintf * * Description: * This function is similar to vsprintf, except that it dynamically * allocates a string (as with malloc) to hold the output, instead of * putting the output in a buffer you allocate in advance. The ptr * argument should be the address of a char * object, and a successful - * call to avsprintf stores a pointer to the newly allocated string at that + * call to vasprintf stores a pointer to the newly allocated string at that * location. * * Returned Value: @@ -112,7 +112,7 @@ * ****************************************************************************/ -int avsprintf(FAR char **ptr, const char *fmt, va_list ap) +int vasprintf(FAR char **ptr, const char *fmt, va_list ap) { struct lib_outstream_s nulloutstream; struct lib_memoutstream_s memoutstream;