From 8b9d67da716c07f957eadd977059d74936c84a76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Tom=C3=A1s?= Date: Wed, 22 Apr 2020 09:21:43 -0300 Subject: Replace plain array with pages and points --- page.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'page.c') diff --git a/page.c b/page.c index 65d344f..d450522 100644 --- a/page.c +++ b/page.c @@ -1,4 +1,5 @@ #include +#include #include #include @@ -26,6 +27,10 @@ uint16_t index_to_offset(struct page *page, uint16_t index) { } } +bool at_eof(struct point *point) { + return point->index == point->current_page->element_count; +} + void move_point_forward(struct point *point) { struct page *page = point->current_page; if (point->index < page->element_count) { -- cgit v1.2.3