Ed Schouten escribió:
* Gábor Kövesdán <ga...@freebsd.org> wrote:
Hello,

I have a problem when reading files with fgetc when a 0xff character comes. In my code the reading stops at that point as if EOF had been reached, but that's not actually the case. The code is here: http://p4web.freebsd.org/@md=d&cd=//&c=Nsd@//depot/projects/soc2008/gabor_textproc/grep/file.c?ac=64&rev1=40
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);

Thanks in advance,

Sign extension bug?
I tried to substitute everything with int, because fgetc can return some error code afaik, but using int didn't help.

--
Gabor Kovesdan
FreeBSD Volunteer

EMAIL: ga...@freebsd.org .:|:. ga...@kovesdan.org
WEB:   http://people.FreeBSD.org/~gabor .:|:. http://kovesdan.org

_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Reply via email to