From 8af7b7fc0a8dbe3502a7cd43c6a10fdcc6013677 Mon Sep 17 00:00:00 2001 From: peter Date: Fri, 21 Aug 2026 10:55:30 +0000 Subject: Start working on the scanner. For now, all that is implemented is some functionality which imports UTF-8 into the memory managed by aplwc, after checking that the data is in fact valid UTF-8. FossilOrigin-Name: c861e88777d8180cb7b37c11fc7016a900f9d5821a7e3c8e8aab54118d2fca94 --- src/lib/memory.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'src/lib/memory.c') diff --git a/src/lib/memory.c b/src/lib/memory.c index 187137e..136c7e6 100644 --- a/src/lib/memory.c +++ b/src/lib/memory.c @@ -53,3 +53,35 @@ memory_free_aplwc(struct memory *m, struct aplwc *p) UNUSED_PARAMETER(m); UNUSED_PARAMETER(p); } + +struct aplwc_line * +memory_alloc_aplwc_line(struct memory *m) +{ + struct aplwc_line *p; + + p = alloc(m, sizeof(struct aplwc_line), alignof(struct aplwc_line)); + return p; +} + +void +memory_free_aplwc_line(struct memory *m, struct aplwc_line *p) +{ + UNUSED_PARAMETER(m); + UNUSED_PARAMETER(p); +} + +struct string * +memory_alloc_string(struct memory *m, size_t bytes) +{ + struct string *p; + + p = alloc(m, sizeof(struct string) + bytes, alignof(struct string)); + return p; +} + +void +memory_free_string(struct memory *m, struct string *p) +{ + UNUSED_PARAMETER(m); + UNUSED_PARAMETER(p); +} -- cgit v1.2.3