libc: Merge lib_vsprintf from lib_libsprintf.c into lib_libvsprintf.c
since all other printf variants in lib_libvsprintf.c Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
84dc88730c
commit
025af9d281
4 changed files with 19 additions and 51 deletions
|
|
@ -46,7 +46,6 @@ list(
|
|||
lib_fileinstream.c
|
||||
lib_fileoutstream.c
|
||||
lib_libbsprintf.c
|
||||
lib_libsprintf.c
|
||||
lib_libvscanf.c
|
||||
lib_libvsprintf.c
|
||||
lib_ultoa_invert.c)
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ CSRCS += lib_mtdoutstream.c lib_libnoflush.c lib_libsnoflush.c
|
|||
CSRCS += lib_syslogstream.c lib_syslograwstream.c lib_bufferedoutstream.c
|
||||
CSRCS += lib_hexdumpstream.c lib_base64outstream.c lib_mtdsostream.c
|
||||
CSRCS += lib_fileinstream.c lib_fileoutstream.c lib_libbsprintf.c
|
||||
CSRCS += lib_libsprintf.c lib_libvscanf.c lib_libvsprintf.c lib_ultoa_invert.c
|
||||
CSRCS += lib_libvscanf.c lib_libvsprintf.c lib_ultoa_invert.c
|
||||
|
||||
ifeq ($(CONFIG_LIBC_FLOATINGPOINT),y)
|
||||
CSRCS += lib_dtoa_engine.c lib_dtoa_data.c
|
||||
|
|
|
|||
|
|
@ -1,49 +0,0 @@
|
|||
/****************************************************************************
|
||||
* libs/libc/stream/lib_libsprintf.c
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/streams.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lib_sprintf
|
||||
****************************************************************************/
|
||||
|
||||
int lib_sprintf(FAR struct lib_outstream_s *stream, FAR const IPTR char *fmt,
|
||||
...)
|
||||
{
|
||||
va_list ap;
|
||||
int n;
|
||||
|
||||
/* Let lib_vsprintf do the real work */
|
||||
|
||||
va_start(ap, fmt);
|
||||
n = lib_vsprintf(stream, fmt, ap);
|
||||
va_end(ap);
|
||||
return n;
|
||||
}
|
||||
|
|
@ -1386,6 +1386,24 @@ int lib_vsprintf(FAR struct lib_outstream_s *stream,
|
|||
#endif
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lib_sprintf
|
||||
****************************************************************************/
|
||||
|
||||
int lib_sprintf(FAR struct lib_outstream_s *stream, FAR const IPTR char *fmt,
|
||||
...)
|
||||
{
|
||||
va_list ap;
|
||||
int n;
|
||||
|
||||
/* Let lib_vsprintf do the real work */
|
||||
|
||||
va_start(ap, fmt);
|
||||
n = lib_vsprintf(stream, fmt, ap);
|
||||
va_end(ap);
|
||||
return n;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lib_sprintf_internal
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue