Challenge
Read a file line by line from a file descriptor, without knowing the size of the lines or of the file in advance, while managing a buffer and the memory kept from one call to the next.
École 42 project: a C function that reads a line from a file descriptor across successive reads, preserving state between calls through a static variable.
Read a file line by line from a file descriptor, without knowing the size of the lines or of the file in advance, while managing a buffer and the memory kept from one call to the next.
A function that reads in blocks (read) and keeps its state between the
calls through a static variable to reconstruct each line, handling the
buffer, the end of file and several descriptors at the same time.
The technologies used on this mission.
Let's talk through your challenges and see how to turn your vision into maintainable, tested technical reality.