1. Write a function that reads text from input into a buffer and returns a NULL-terminated array of pointers to lines of the text read.
The function has four parameters: a text buffer and an array of addresses, each with their respective size. The function should store the text read from input into the buffer, storing the start of every line into the address array, and returning when either of the arrays fills up. Read the text directly at the right position into the buffer, avoiding useless copying.