summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Manuel Tomás <jtomas1815@gmail.com>2020-04-20 20:22:20 -0300
committerJuan Manuel Tomás <jtomas1815@gmail.com>2020-04-20 20:22:20 -0300
commit9305bb601755e84ff91b79a490be00e0d654251b (patch)
tree7c032ae33a7030389d1b84b003de5f0998407431
parent3ea12c9a798e017293a6c3e0157db57c72889311 (diff)
downloadjet-9305bb601755e84ff91b79a490be00e0d654251b.tar.gz
jet-9305bb601755e84ff91b79a490be00e0d654251b.zip
Implement get_element
-rw-r--r--page.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/page.c b/page.c
index 7e545c5..e2a122d 100644
--- a/page.c
+++ b/page.c
@@ -144,3 +144,7 @@ void delete_at_point(struct point *point) {
page->element_count--;
}
}
+
+uint8_t get_element(struct point *point) {
+ return point->current_page->buffer[index_to_offset(point->current_page, point->index)];
+}