summaryrefslogtreecommitdiff
path: root/buffer.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-01-01 22:56:36 -0500
committerpommicket <pommicket@gmail.com>2023-01-01 22:56:36 -0500
commita3971fd612813c6544dbe63cb3d7e5d9c0b7b778 (patch)
tree4c89464fca8366301b121ef597dfee826d37a8bd /buffer.c
parente06b040fad63fe729de60781658778a0b008ca16 (diff)
move functions from io.c to session.c
Diffstat (limited to 'buffer.c')
-rw-r--r--buffer.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/buffer.c b/buffer.c
index 353f565..441f3f5 100644
--- a/buffer.c
+++ b/buffer.c
@@ -169,21 +169,6 @@ static bool buffer_pos_valid(TextBuffer *buffer, BufferPos p) {
return p.line < buffer->nlines && p.index <= buffer->lines[p.line].len;
}
-// write a buffer position to a file
-void buffer_pos_write(BufferPos pos, FILE *fp) {
- write_u32(fp, pos.line);
- write_u32(fp, pos.index);
-}
-
-// read a buffer position from a file, and validate it
-BufferPos buffer_pos_read(TextBuffer *buffer, FILE *fp) {
- BufferPos pos = {0};
- pos.line = read_u32(fp);
- pos.index = read_u32(fp);
- buffer_pos_validate(buffer, &pos);
- return pos;
-}
-
// are there any unsaved changes?
bool buffer_unsaved_changes(TextBuffer *buffer) {
if (buffer_is_untitled(buffer) && buffer_empty(buffer))