Date: Tue, 10 Mar 2009 22:55:12 +0100 From: Ed Schouten <ed@80386.nl> To: =?iso-8859-1?Q?G=E1bor_K=F6vesd=E1n?= <gabor@FreeBSD.org> Cc: FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: Re: fgetc doubts Message-ID: <20090310215512.GI31961@hoeg.nl> In-Reply-To: <49B6DC95.9070607@FreeBSD.org> References: <49B6DC95.9070607@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--cpvLTH7QU4gwfq3S Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * G=E1bor K=F6vesd=E1n <gabor@FreeBSD.org> wrote: > Hello, > > I have a problem when reading files with fgetc when a 0xff character =20 > comes. In my code the reading stops at that point as if EOF had been =20 > reached, but that's not actually the case. > The code is here: =20 > http://p4web.freebsd.org/@md=3Dd&cd=3D//&c=3DNsd@//depot/projects/soc2008= /gabor_textproc/grep/file.c?ac=3D64&rev1=3D40 > And the problem occurs in grep_fgetln() when the buffers is being filled = in: > for (; i < bufsiz && !grep_feof(f); i++) > binbuf[i] =3D grep_fgetc(f); > > Thanks in advance, Sign extension bug? --=20 Ed Schouten <ed@80386.nl> WWW: http://80386.nl/ --cpvLTH7QU4gwfq3S Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkm24cAACgkQ52SDGA2eCwUtBwCdEsgo+GCh/s9IIz4Bo3Bb0UTz 7ogAniwJ7zFgftoYNVyZXhPZeLYxbg14 =Lwct -----END PGP SIGNATURE----- --cpvLTH7QU4gwfq3S--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090310215512.GI31961>