From: 065211 AT bud DOT cc DOT swin DOT edu DOT au (MURPHY, Jeremy W) Newsgroups: comp.os.msdos.djgpp Subject: Re: Possible bug with fgets() and fputs(), ANSI C, in DJGPP Date: 10 Jan 2003 06:54:14 GMT Organization: Swinburne University of Technology Lines: 15 Message-ID: References: NNTP-Posting-Host: bud.cc.swin.edu.au X-Trace: c3p0.cc.swin.edu.au 1042181654 3751 136.186.1.113 (10 Jan 2003 06:54:14 GMT) X-Complaints-To: abuse AT swin DOT edu DOT au NNTP-Posting-Date: 10 Jan 2003 06:54:14 GMT X-Newsreader: TIN [version 1.2 PL2] To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Younskevicius, Edward (FL51) (Edward DOT Younskevicius AT honeywell DOT com) wrote: : Hello. Here is the description of what I think is a very peculiar bug, in : regards to the ANSI C fgets() and fputs() in DJGPP. I am reading a file in If the file is open for both reading and writing, you must call `fflush', `fseek', or `rewind' before switching from read to write or from write to read. That's from the djgpp libc info, and could well be the solution. Otherwise, I dunno. :) Jeremy