From 723876da5741892530cd74112ec1510124e95cf9 Mon Sep 17 00:00:00 2001 From: cflip Date: Wed, 25 Jan 2023 11:28:09 -0700 Subject: Rename `append_buffer` to textbuf This name is a little bit better I think, and it will be nice to have a distinction between this utility and the 'file' kind of buffer. --- buffer.c | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 buffer.c (limited to 'buffer.c') diff --git a/buffer.c b/buffer.c deleted file mode 100644 index 596d5d2..0000000 --- a/buffer.c +++ /dev/null @@ -1,21 +0,0 @@ -#include "buffer.h" - -#include -#include - -void ab_append(struct append_buffer* ab, const char* string, int length) -{ - char* new = realloc(ab->buffer, ab->length + length); - - if (new == NULL) - return; - - memcpy(&new[ab->length], string, length); - ab->buffer = new; - ab->length += length; -} - -void ab_free(struct append_buffer* ab) -{ - free(ab->buffer); -} -- cgit v1.2.3