Get_next_line is a Codam project.
It is a function which returns a line ending with '\n' from a file descriptor. Each call to the function returns the next line from the file.
A 1 is returned if a line is read, a 0 is returned if the file is fully read, a -1 is returned if an error occurred.