libc: Move stream printf/scanf from libc/stdio to libc/stream
to keep all related code in one place Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
3b6648c742
commit
84dc88730c
13 changed files with 36 additions and 36 deletions
|
|
@ -28,7 +28,6 @@ set(SRCS
|
|||
lib_sprintf.c
|
||||
lib_asprintf.c
|
||||
lib_snprintf.c
|
||||
lib_libsprintf.c
|
||||
lib_vsprintf.c
|
||||
lib_vasprintf.c
|
||||
lib_vsnprintf.c
|
||||
|
|
@ -44,19 +43,11 @@ set(SRCS
|
|||
lib_libdgets.c
|
||||
lib_sscanf.c
|
||||
lib_vsscanf.c
|
||||
lib_libvscanf.c
|
||||
lib_libvsprintf.c
|
||||
lib_remove.c
|
||||
lib_tempnam.c
|
||||
lib_tmpnam.c
|
||||
lib_ultoa_invert.c
|
||||
lib_renameat.c
|
||||
lib_putwchar.c
|
||||
lib_libbsprintf.c)
|
||||
|
||||
if(CONFIG_LIBC_FLOATINGPOINT)
|
||||
list(APPEND SRCS lib_dtoa_engine.c lib_dtoa_data.c)
|
||||
endif()
|
||||
lib_putwchar.c)
|
||||
|
||||
# The remaining sources files depend upon C streams
|
||||
|
||||
|
|
|
|||
|
|
@ -24,17 +24,12 @@
|
|||
# This first group of C files do not depend on having 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_vasprintf.c
|
||||
CSRCS += lib_snprintf.c lib_vsprintf.c lib_vasprintf.c
|
||||
CSRCS += lib_vsnprintf.c lib_dprintf.c lib_vdprintf.c lib_vprintf.c
|
||||
CSRCS += lib_perror.c lib_putchar.c lib_getchar.c lib_puts.c
|
||||
CSRCS += lib_gets_s.c lib_gets.c lib_libdgets.c
|
||||
CSRCS += lib_sscanf.c lib_vsscanf.c lib_libvscanf.c lib_libvsprintf.c
|
||||
CSRCS += lib_remove.c lib_tempnam.c lib_tmpnam.c lib_ultoa_invert.c
|
||||
CSRCS += lib_renameat.c lib_putwchar.c lib_libbsprintf.c
|
||||
|
||||
ifeq ($(CONFIG_LIBC_FLOATINGPOINT),y)
|
||||
CSRCS += lib_dtoa_engine.c lib_dtoa_data.c
|
||||
endif
|
||||
CSRCS += lib_gets_s.c lib_gets.c lib_libdgets.c lib_sscanf.c
|
||||
CSRCS += lib_vsscanf.c lib_remove.c lib_tempnam.c lib_tmpnam.c
|
||||
CSRCS += lib_renameat.c lib_putwchar.c
|
||||
|
||||
# The remaining sources files depend upon C streams
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,16 @@ list(
|
|||
lib_hexdumpstream.c
|
||||
lib_base64outstream.c
|
||||
lib_fileinstream.c
|
||||
lib_fileoutstream.c)
|
||||
lib_fileoutstream.c
|
||||
lib_libbsprintf.c
|
||||
lib_libsprintf.c
|
||||
lib_libvscanf.c
|
||||
lib_libvsprintf.c
|
||||
lib_ultoa_invert.c)
|
||||
|
||||
if(CONFIG_LIBC_FLOATINGPOINT)
|
||||
list(APPEND SRCS lib_dtoa_engine.c lib_dtoa_data.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_FILE_STREAM)
|
||||
list(APPEND SRCS lib_stdinstream.c lib_stdoutstream.c lib_stdsistream.c
|
||||
|
|
|
|||
|
|
@ -30,7 +30,12 @@ CSRCS += lib_zeroinstream.c lib_nullinstream.c lib_nulloutstream.c
|
|||
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
|
||||
CSRCS += lib_fileinstream.c lib_fileoutstream.c lib_libbsprintf.c
|
||||
CSRCS += lib_libsprintf.c lib_libvscanf.c lib_libvsprintf.c lib_ultoa_invert.c
|
||||
|
||||
ifeq ($(CONFIG_LIBC_FLOATINGPOINT),y)
|
||||
CSRCS += lib_dtoa_engine.c lib_dtoa_data.c
|
||||
endif
|
||||
|
||||
# The remaining sources files depend upon C streams
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* libs/libc/stdio/lib_dtoa_data.c
|
||||
* libs/libc/stream/lib_dtoa_data.c
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
* SPDX-FileCopyrightText: 2018, Keith Packard. All rights reserved.
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* libs/libc/stdio/lib_dtoa_engine.c
|
||||
* libs/libc/stream/lib_dtoa_engine.c
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
* SPDX-FileCopyrightText: 2018, Keith Packard. All rights reserved.
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* libs/libc/stdio/lib_dtoa_engine.h
|
||||
* libs/libc/stream/lib_dtoa_engine.h
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
* SPDX-FileCopyrightText: 2018, Keith Packard. All rights reserved.
|
||||
|
|
@ -33,8 +33,8 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __LIBS_LIBC_STDIO_LIB_DTOA_ENGINE_H
|
||||
#define __LIBS_LIBC_STDIO_LIB_DTOA_ENGINE_H
|
||||
#ifndef __LIBS_LIBC_STREAM_LIB_DTOA_ENGINE_H
|
||||
#define __LIBS_LIBC_STREAM_LIB_DTOA_ENGINE_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
|
|
@ -188,4 +188,4 @@ extern const double g_dtoa_round[];
|
|||
int __dtoa_engine(double x, FAR struct dtoa_s *dtoa, int max_digits,
|
||||
int max_decimals);
|
||||
|
||||
#endif /* __LIBS_LIBC_STDIO_LIB_DTOA_ENGINE_H */
|
||||
#endif /* __LIBS_LIBC_STREAM_LIB_DTOA_ENGINE_H */
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* libs/libc/stdio/lib_libbsprintf.c
|
||||
* libs/libc/stream/lib_libbsprintf.c
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* libs/libc/stdio/lib_libsprintf.c
|
||||
* libs/libc/stream/lib_libsprintf.c
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* libs/libc/stdio/lib_libvscanf.c
|
||||
* libs/libc/stream/lib_libvscanf.c
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* libs/libc/stdio/lib_libvsprintf.c
|
||||
* libs/libc/stream/lib_libvsprintf.c
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
* SPDX-FileCopyrightText: 2002, Alexander Popov (sasho@vip.bg)
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* libs/libc/stdio/lib_ultoa_invert.c
|
||||
* libs/libc/stream/lib_ultoa_invert.c
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
* SPDX-FileCopyrightText: 2017, Keith Packard. All rights reserved.
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* libs/libc/stdio/lib_ultoa_invert.h
|
||||
* libs/libc/stream/lib_ultoa_invert.h
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
* SPDX-FileCopyrightText: 2005, Dmitry Xmelkov. All rights reserved.
|
||||
|
|
@ -33,8 +33,8 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __LIBS_LIBC_STDIO_LIB_ULTOA_INVERT_H
|
||||
#define __LIBS_LIBC_STDIO_LIB_ULTOA_INVERT_H
|
||||
#ifndef __LIBS_LIBC_STREAM_LIB_ULTOA_INVERT_H
|
||||
#define __LIBS_LIBC_STREAM_LIB_ULTOA_INVERT_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
|
|
@ -71,4 +71,4 @@ FAR char *__ultoa_invert(unsigned long long val, FAR char *str, int base);
|
|||
FAR char *__ultoa_invert(unsigned long val, FAR char *str, int base);
|
||||
#endif
|
||||
|
||||
#endif /* __LIBS_LIBC_STDIO_LIB_ULTOA_INVERT_H */
|
||||
#endif /* __LIBS_LIBC_STREAM_LIB_ULTOA_INVERT_H */
|
||||
Loading…
Add table
Reference in a new issue