Date: Mon, 8 Sep 1997 21:30:25 -0700 (PDT) Message-Id: <199709090430.VAA27722@adit.ap.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: cbalciza AT mail DOT cccis DOT ro, djgpp AT delorie DOT com (djgpp mailing list) From: Nate Eldredge Subject: Re: file I/O (R/W) problem Precedence: bulk At 10:48 9/8/1997 GMT, cbalciza AT mail DOT cccis DOT ro wrote: >how can I open a file for both reading and writing without >erasing the previous file content ? I don't think rewriting a file in place works. The preferred method is to write the new version to a temporary file, then replace the original with it. A good example is the `utod' and `dtou' programs that come with DJGPP; find their source in the library source zip. Nate Eldredge eldredge AT ap DOT net