From c3658558df681378b98faa04397dc3e5c247e159 Mon Sep 17 00:00:00 2001 From: WormHeamer Date: Mon, 29 Dec 2025 06:14:59 -0500 Subject: add txt_collect_range() and txt_read_chunk() --- txt.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'txt.h') diff --git a/txt.h b/txt.h index a7dd908..3b62e04 100644 --- a/txt.h +++ b/txt.h @@ -2,6 +2,8 @@ #define TXT_H #include "dynarr.h" +#include "arena.h" +#include "str.h" typedef enum : u8 { TXT_SRC, @@ -39,7 +41,8 @@ int txt_load(Txt *b, const char *path); int txt_save(Txt *b, const char *path); void txt_free(Txt *b); -void txt_write_range(int fd, TxtLoc lo, TxtLoc hi); +Str txt_collect_range(TxtLoc lo, TxtLoc hi, Arena *a); +u32 txt_read_chunk(TxtLoc *lo, TxtLoc hi, char *buf, u32 sz); /* insertion & deletion */ -- cgit v1.2.3