Xref: news2.mv.net comp.os.msdos.djgpp:6251 From: Grzegorz DOT Nowakowski AT ii DOT uni DOT wroc DOT pl (Grzegorz Nowakowski) Newsgroups: comp.os.msdos.djgpp Subject: Re: help: problem with reading files Date: 22 Jul 1996 09:54:17 GMT Organization: Laboratoire de Recherche en Informatique, UPS/CNRS, Orsay,FRANCE Lines: 19 Message-ID: References: NNTP-Posting-Host: hp20.lri.fr In-reply-to: Gurunandan R Bhat's message of Sat, 20 Jul 1996 06:18:44 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp In article Gurunandan R Bhat writes: > on i execution i find that the last line is read twice. is there some way > i can avoid this problem? I had the same problem when using file handles (for some reasons couldn't use FILE* type). I solved it but... I've lost the code. :-( From the saved fragments I deduce I checked return value of 'read' function *and* contents of input buffer. Sorry, I can't help you more, currently I have no PC access then I can't write nor test proper piece of code. -- Grzegorz Nowakowski -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GC dpu s:- a- C++(++++) ULSH P+>+++ L+>++++ E+(+++) W N++ o? K? w---() O? M- V? PS PE Y+ PGP-@ t+ 5? X? R+@ tv--- b+(+++) DI? D+ G e-> h* r-- y ------END GEEK CODE BLOCK------ finger hayden AT vax1 DOT mankato DOT msus DOT edu for info about geek codes