fgetc doubts

Václav Haisman v.haisman at sh.cvut.cz
Wed Mar 11 01:54:16 PDT 2009


Gábor Kövesdán wrote, On 10.3.2009 22:33:
> Hello,
[...]
> And the problem occurs in grep_fgetln() when the buffers is being filled
> in:
>            for (; i < bufsiz && !grep_feof(f); i++)
>                binbuf[i] = grep_fgetc(f);
> 
Also, why are you filling the buffer char by char? All of the input streams
you have there support reading by chunks.

--
VH



More information about the freebsd-hackers mailing list