From 71f3189a31d6318b6829e28a664809be3fb13769 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 8 Jun 2024 22:46:50 +0200 Subject: [PATCH] core: remove C-versions of (v)format_string() Only users of the std::string versions are left. Signed-off-by: Berthold Stoeger --- core/membuffer.cpp | 19 ------------------- core/membuffer.h | 5 ----- 2 files changed, 24 deletions(-) diff --git a/core/membuffer.cpp b/core/membuffer.cpp index 605b523e8..ef0075f2a 100644 --- a/core/membuffer.cpp +++ b/core/membuffer.cpp @@ -140,25 +140,6 @@ void put_vformat(struct membuffer *b, const char *fmt, va_list args) } } -/* Silly helper using membuffer */ -char *vformat_string(const char *fmt, va_list args) -{ - struct membuffer mb; - put_vformat(&mb, fmt, args); - return detach_cstring(&mb); -} - -char *format_string(const char *fmt, ...) -{ - va_list args; - char *result; - - va_start(args, fmt); - result = vformat_string(fmt, args); - va_end(args); - return result; -} - void put_format(struct membuffer *b, const char *fmt, ...) { va_list args; diff --git a/core/membuffer.h b/core/membuffer.h index 7461739ef..b72087500 100644 --- a/core/membuffer.h +++ b/core/membuffer.h @@ -62,11 +62,6 @@ extern __printf(2, 3) void put_format(struct membuffer *, const char *fmt, ...); extern __printf(2, 0) char *add_to_string_va(char *old, const char *fmt, va_list args); extern __printf(2, 3) char *add_to_string(char *old, const char *fmt, ...); -/* Helpers that use membuffers internally */ -extern __printf(1, 0) char *vformat_string(const char *, va_list); -extern __printf(1, 2) char *format_string(const char *, ...); - - /* Output one of our "milli" values with type and pre/post data */ extern void put_milli(struct membuffer *, const char *, int, const char *);