From b04cbe08e23f63bc02c659b69668349fce240f9e Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Thu, 21 Aug 2025 22:32:19 +0200 Subject: text-buffer: clean interface --- src/text-buffer.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/text-buffer.h') diff --git a/src/text-buffer.h b/src/text-buffer.h index 5361534..3c85816 100644 --- a/src/text-buffer.h +++ b/src/text-buffer.h @@ -15,6 +15,11 @@ * along with this program. If not, see . */ +/* + * This is a growable char buffer, it grows automatically on append. + * It must be cleared after use as it allocates memory. + */ + #ifndef TEXT_BUFFER_H #define TEXT_BUFFER_H @@ -32,8 +37,7 @@ void text_buffer_init (text_buffer *tb); void text_buffer_resize (text_buffer *tb, size_t size); void text_buffer_append (text_buffer *tb, char c); char text_buffer_index (text_buffer *tb, size_t pos); -void text_buffer_empty (text_buffer *tb); void text_buffer_fill (text_buffer *tb, char *fill, size_t size); -void text_buffer_free (text_buffer *tb); +void text_buffer_clear (text_buffer *tb); #endif /* TEXT_BUFFER_H */ -- cgit v1.2.3