From a123725a12e948d78badb2cb686d38548f1c633b Mon Sep 17 00:00:00 2001 From: Albert Cervin Date: Thu, 6 Apr 2023 23:23:46 +0200 Subject: Implement window handling Also implement searching. fix undo boundaries when it checked for other save point, it used && instead of == which caused it to overwrite other types. Fix bytes vs chars bug in text_get_region --- src/allocator.h | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 src/allocator.h (limited to 'src/allocator.h') diff --git a/src/allocator.h b/src/allocator.h deleted file mode 100644 index 49e3aec..0000000 --- a/src/allocator.h +++ /dev/null @@ -1,46 +0,0 @@ -#include -#include -#include - -/** - * Simple bump allocator that can be used for - * allocations with a frame lifetime. - */ -struct frame_allocator { - uint8_t *buf; - size_t offset; - size_t capacity; -}; - -/** - * Create a new frame allocator - * - * @param capacity The capacity in bytes of the frame allocator - * @returns The frame allocator - */ -struct frame_allocator frame_allocator_create(size_t capacity); - -/** - * Destroy a frame allocator. - * - * @param alloc The @ref frame_allocator "frame allocator" to destroy. - */ -void frame_allocator_destroy(struct frame_allocator *alloc); - -/** - * Allocate memory in this @ref frame_allocator "frame allocator" - * - * @param alloc The allocator to allocate in - * @param sz The size in bytes to allocate. - * @returns void* representing the start of the allocated region on success, - * NULL on failure. - */ -void *frame_allocator_alloc(struct frame_allocator *alloc, size_t sz); - -/** - * Clear this @ref frame_allocator "frame allocator". - * - * This does not free any memory, but simply resets the offset to 0. - * @param alloc The frame allocator to clear - */ -void frame_allocator_clear(struct frame_allocator *alloc); -- cgit v1.2.3