diff options
author | pommicket <pommicket@gmail.com> | 2023-01-01 22:56:36 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-01-01 22:56:36 -0500 |
commit | a3971fd612813c6544dbe63cb3d7e5d9c0b7b778 (patch) | |
tree | 4c89464fca8366301b121ef597dfee826d37a8bd /buffer.c | |
parent | e06b040fad63fe729de60781658778a0b008ca16 (diff) |
move functions from io.c to session.c
Diffstat (limited to 'buffer.c')
-rw-r--r-- | buffer.c | 15 |
1 files changed, 0 insertions, 15 deletions
@@ -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)) |