summaryrefslogtreecommitdiff
path: root/txt.h
diff options
context:
space:
mode:
authorWormHeamer2025-12-28 19:46:16 -0500
committerWormHeamer2025-12-28 19:46:16 -0500
commit3ed6bbd8eb7214268d6e042736dcd5285cb4f4d7 (patch)
treef2659d8eb9f9e5f7e50d1a78de8a88e28464199f /txt.h
parenta24ee30efa43bcfc06b0e8b956bd077f8515c6e5 (diff)
add Txt pointer to TxtLoc
Diffstat (limited to 'txt.h')
-rw-r--r--txt.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/txt.h b/txt.h
index ccc71be..3af9970 100644
--- a/txt.h
+++ b/txt.h
@@ -19,15 +19,16 @@ typedef struct {
} TxtBuf;
typedef struct {
- u32 p, i;
-} TxtLoc;
-
-typedef struct {
DYNARR(TxtPiece) ptbl;
TxtBuf buf[2];
u32 len;
} Txt;
+typedef struct {
+ Txt *t;
+ u32 p, i;
+} TxtLoc;
+
u32 txt_split_piece(Txt *b, u32 pi, u32 i);
void txt_remove_piece(Txt *b, u32 pi);
void txt_insert_piece(Txt *b, u32 pi, TxtBufIdx buf, u32 ofs, u32 n);