summaryrefslogtreecommitdiff
path: root/src/text-buffer.h
diff options
context:
space:
mode:
authorEkaitz Zarraga <ekaitz@elenq.tech>2025-08-21 22:32:19 +0200
committerEkaitz Zarraga <ekaitz@elenq.tech>2025-08-21 22:32:19 +0200
commitb04cbe08e23f63bc02c659b69668349fce240f9e (patch)
treef75336b79f3b79144342e38918b69eb0061b4aab /src/text-buffer.h
parente45ce6f5d8e6fbfcb651dc859186ce8e4bb71e4a (diff)
text-buffer: clean interface
Diffstat (limited to 'src/text-buffer.h')
-rw-r--r--src/text-buffer.h8
1 files changed, 6 insertions, 2 deletions
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 <http://www.gnu.org/licenses/>.
*/
+/*
+ * 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 */