diff --git a/libs/libc/stream/CMakeLists.txt b/libs/libc/stream/CMakeLists.txt index 8a9be76ea5..0fc7478834 100644 --- a/libs/libc/stream/CMakeLists.txt +++ b/libs/libc/stream/CMakeLists.txt @@ -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) diff --git a/libs/libc/stream/Make.defs b/libs/libc/stream/Make.defs index 191ef99557..43166d52c8 100644 --- a/libs/libc/stream/Make.defs +++ b/libs/libc/stream/Make.defs @@ -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 diff --git a/libs/libc/stream/lib_libsprintf.c b/libs/libc/stream/lib_libsprintf.c deleted file mode 100644 index 6ed53ddf68..0000000000 --- a/libs/libc/stream/lib_libsprintf.c +++ /dev/null @@ -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 - -/**************************************************************************** - * 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; -} diff --git a/libs/libc/stream/lib_libvsprintf.c b/libs/libc/stream/lib_libvsprintf.c index 6a85af3adc..1f1d8c3622 100644 --- a/libs/libc/stream/lib_libvsprintf.c +++ b/libs/libc/stream/lib_libvsprintf.c @@ -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 *