delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/11/07/10:15:34

From: Damian Yerrick <Bullcr_pd_yerrick AT hotmail DOT comRemoveBullcr_p>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Partial file overwrite
Organization: Pin Eight Software http://pineight.8m.com/
Message-ID: <g66g0t4f8hltavpsoq4n9o11ejldp52ck9@4ax.com>
References: <8u89ok$r75$1 AT nnrp1 DOT deja DOT com>
X-Newsreader: Forte Agent 1.7/32.534
MIME-Version: 1.0
Lines: 19
X-Trace: /wObnZukujrfF84GFgXDwFfJ/5hewUMb5HMlG+UG3zjsnpaS8xzaiXX50setFsissxitbp8Dzz6S!Xn3nvW81xfc/uaue7DQDSCHfNsS6hiX7LqGHjeNyPDVlUCnk2uYUdh+SV+/boeXj9Qgl/JMocqWj!CXCG+w==
X-Complaints-To: abuse AT gte DOT net
X-Abuse-Info: Please be sure to forward a copy of ALL headers
X-Abuse-Info: Otherwise we will be unable to process your complaint properly
NNTP-Posting-Date: Tue, 07 Nov 2000 15:01:49 GMT
Distribution: world
Date: Tue, 07 Nov 2000 15:01:49 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Tue, 07 Nov 2000 07:08:07 GMT, stryyker AT my-deja DOT com wrote:

>how do I overwrite a part of a binary file without disturbing the rest?
>I don't want to create a temp file then delete/rename.

Do what Eli said.  But a word of caution:  If you're trying to write
the user's document on a "save" command, you must use a temp file
with  delete/rename; otherwise, if the computer crashes or the mains
die while you're writing the data, the user's precious data is
irretrievably lost (lawsuit!).  Yes, I'm just bitter that GIMP for
Windows has eaten some of my files.

-- 
<O
( \   GNOME vs. KDE: the game!
 X    http://pineight.8m.com/nes.htm

This is McAfee VirusScan. Add these two lines to your signature to
prevent the spread of signature viruses.  http://www.mcafee.com/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019