From ad541c67761b8aa6da1566802c347cac4018d0c2 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Mon, 2 Nov 2026 20:50:24 +0100 Subject: Move the build sources into src/ --- ot_buf.c | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 ot_buf.c (limited to 'ot_buf.c') diff --git a/ot_buf.c b/ot_buf.c deleted file mode 100644 index ecd3f8d..0000000 --- a/ot_buf.c +++ /dev/null @@ -1,39 +0,0 @@ -/* This software was written by Dirk Engling - It is considered beerware. Prost. Skol. Cheers or whatever. */ - -/* System */ -#include -#include - -/* Opentracker */ -#include "ot_buf.h" - -int buf_cat(ot_buf *buf, const void *src, size_t len) { - char *data; - - if (!len) - return 0; - - if (buf->size + len < buf->size) - return -1; - - if (!(data = realloc(buf->data, buf->size + len))) - return -1; - - buf->data = data; - memcpy(data + buf->size, src, len); - buf->size += len; - - return 0; -} - -void buf_truncate(ot_buf *buf, size_t len) { - if (len < buf->size) - buf->size = len; -} - -void buf_reset(ot_buf *buf) { - free(buf->data); - buf->data = NULL; - buf->size = 0; -} -- cgit v1.3