summaryrefslogtreecommitdiff
path: root/buffer.c
diff options
context:
space:
mode:
authorcflip <cflip@cflip.net>2023-01-25 11:28:09 -0700
committercflip <cflip@cflip.net>2023-01-25 18:32:43 -0700
commit723876da5741892530cd74112ec1510124e95cf9 (patch)
tree2017e9e488a073b274c485fbd192ba05724c01c7 /buffer.c
parent69e2be81c732353f5f89389fec3f9bb768b0766a (diff)
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.
Diffstat (limited to 'buffer.c')
-rw-r--r--buffer.c21
1 files changed, 0 insertions, 21 deletions
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 <stdlib.h>
-#include <string.h>
-
-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);
-}