A project wrote fully in C to read from a file and return each line separately.
*.c files can be compilled with the option -D BUFFER_SIZE=XX
to define the BUFFER_SIZE
and if not the defulte BUFFER_SIZE
is 42.
please check the PDF for more details.