On Tue, May 21, 2013 at 04:36:38PM +0400, Cyrill Gorcunov wrote: > > This should be equivalent to what you did but without eof flag at all. No? IOW, I don't like the idea of adding eof flag here instead of plain while(fgets) cycle. But if I'm mistaken and there is no other way, sure lets use eof flag instead.