21 lines
522 B
C
21 lines
522 B
C
// functions that can move the file position conveniently
|
|
// remember that the last line of a file is usually empty and goes from '\n' to EOF
|
|
|
|
#pragma once
|
|
|
|
// function to move back/up
|
|
void go_back_x_lines(int fd, int lines);
|
|
|
|
void seek_previous_line(int fd);
|
|
|
|
// set file position to the beginning of the line
|
|
void seek_line_start(int fd);
|
|
|
|
// function to move forward/down
|
|
void go_forward_x_lines(int fd, int lines);
|
|
|
|
void seek_next_line(int fd);
|
|
|
|
// set file position to the end of the line
|
|
void seek_line_end(int fd);
|