summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--page.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/page.c b/page.c
index ec8f9b0..a8407d3 100644
--- a/page.c
+++ b/page.c
@@ -67,17 +67,8 @@ void move_gap(struct page *page, int target) {
}
}
-static inline int page_is_full(struct page *page) {
- return page->gap_start == page->gap_end;
-}
-
-static inline int page_is_empty(struct page *page) {
- return page->gap_start == page->buffer
- && page->gap_end == page->buffer + PAGE_SIZE - 1;
-}
-
void insert_into_page(struct page *page, uint8_t c) {
- if (!page_is_full(page)) {
+ if (page->gap_start != page->gap_end) {
*(page->gap_start) = c;
page->gap_start++;
}