From 2377e758c15e35b4479df367ba89f8d65917e073 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Thu, 24 Apr 2025 15:24:32 +0200 Subject: [PATCH] sys/string_utils: make swprintf() appear in doc --- sys/include/string_utils.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/include/string_utils.h b/sys/include/string_utils.h index 69c530fbff..c8a399ae55 100644 --- a/sys/include/string_utils.h +++ b/sys/include/string_utils.h @@ -87,6 +87,7 @@ static inline const char *string_writer_str(const string_writer_t *sw) return sw->start; } +#ifndef DOXYGEN /** * @brief internal helper macro */ @@ -96,6 +97,8 @@ static inline const char *string_writer_str(const string_writer_t *sw) #define __swprintf swprintf __attribute__ ((format (printf, 2, 3))) #endif +int __swprintf(string_writer_t *sw, FLASH_ATTR const char *restrict format, ...); +#else /** * @brief Write a formatted string to a buffer * The string will be truncated if there is not enough space left in @@ -106,9 +109,10 @@ __attribute__ ((format (printf, 2, 3))) * @param[in] format format string to write * * @return number of bytes written on success - * -E2BIG if the string was truncated + * @retval -E2BIG if the string was truncated */ -int __swprintf(string_writer_t *sw, FLASH_ATTR const char *restrict format, ...); +int swprintf(string_writer_t *sw, FLASH_ATTR const char *restrict format, ...); +#endif /* DOXYGEN */ #if IS_ACTIVE(HAS_FLASH_UTILS_ARCH) #define swprintf(sw, fmt, ...) flash_swprintf(sw, TO_FLASH(fmt), ## __VA_ARGS__)