From 91df00a92543a45a4916cbaeecbbf70bfa946b78 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Mon, 20 Feb 2023 13:46:12 +0100 Subject: Remove ostream_printf By cobbling together the xattr lines manually in libtar, the need (and thus the function itself) are removed. Signed-off-by: David Oberhollenzer --- include/compat.h | 8 +++++++- include/io/ostream.h | 20 -------------------- 2 files changed, 7 insertions(+), 21 deletions(-) (limited to 'include') diff --git a/include/compat.h b/include/compat.h index 8969d6c..7d0a646 100644 --- a/include/compat.h +++ b/include/compat.h @@ -8,12 +8,18 @@ #define COMPAT_H #include "sqfs/predef.h" -#include "io/ostream.h" #include "config.h" #include #include +#if defined(__GNUC__) || defined(__clang__) +# define PRINTF_ATTRIB(fmt, elipsis) \ + __attribute__ ((format (printf, fmt, elipsis))) +#else +# define PRINTF_ATTRIB(fmt, elipsis) +#endif + #if defined(__GNUC__) && __GNUC__ >= 5 # define SZ_ADD_OV __builtin_add_overflow # define SZ_MUL_OV __builtin_mul_overflow diff --git a/include/io/ostream.h b/include/io/ostream.h index 21850d4..c1602ab 100644 --- a/include/io/ostream.h +++ b/include/io/ostream.h @@ -10,13 +10,6 @@ #include "sqfs/predef.h" #include "io/istream.h" -#if defined(__GNUC__) || defined(__clang__) -# define PRINTF_ATTRIB(fmt, elipsis) \ - __attribute__ ((format (printf, fmt, elipsis))) -#else -# define PRINTF_ATTRIB(fmt, elipsis) -#endif - /** * @struct ostream_t * @@ -111,19 +104,6 @@ SQFS_INLINE const char *ostream_get_filename(ostream_t *strm) return strm->get_filename(strm); } -/** - * @brief Printf like function that appends to an output stream - * - * @memberof ostream_t - * - * @param strm The output stream to append to. - * @param fmt A printf style format string. - * - * @return The number of characters written on success, -1 on failure. - */ -SQFS_INTERNAL int ostream_printf(ostream_t *strm, const char *fmt, ...) - PRINTF_ATTRIB(2, 3); - /** * @brief Read data from an input stream and append it to an output stream * -- cgit v1.2.3