Project @ Qwasar Silicon Valley
Create a function that reads a single line from a file or stream at fd and returns a heap allocated, null terminated string with READLINE_READ_SIZE characters from that line.
my_readline.c contains the function 'my_readline', which will return one line from a file.
The 'my_readline' function can be used with any file or stream that can be read(). The function returns a pointer to a string held in heap memory. Please remember to free() the pointer returned by the function to avoid memory leaks.
The READLINE_READ_SIZE defintion in the function my_readline sets the number of characters read from the file per call, which will repeat until a newline is found.