diff options
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)) |