What means this:
((n = f->read(buf, sizeof(buf))) > 0)
every time a size of a buffer is read , then every char is scaned if it is equal to "\n" then counter will increase.
then the next scan will be done . but where stands n for??
Is that the number of characters or bytes which are read?
So it is not scanning for the EOF signiture, but scans untill the bytes which are scaned are 0