delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/14/03:07:55

Date: Tue, 14 Jul 1998 10:07:35 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Kohn Emil Dan <emild AT cs DOT technion DOT ac DOT il>
cc: djgpp AT delorie DOT com
Subject: Re: Copying memory to memory problems
In-Reply-To: <Pine.GSO.3.95-heb-2.07.980713191456.14414C-100000@csd>
Message-ID: <Pine.SUN.3.91.980714100716.6831B-100000@is>
MIME-Version: 1.0

On Mon, 13 Jul 1998, Kohn Emil Dan wrote:

> On the other hand memmove() guarantees that the copying process takes
> place as if the source was copied to a temporary area that does not
> overlap with any of the parameters and then the object is copied from the
> temporary area back to the destination.

I doubt that any reasonable implementation of `memmove' realy does
this double copy thing.  DJGPP's implementation surely doesn't.  All
you need to do is to determine whether the source pointer is greater
or less than the destination pointer, and copy from the beginning or
the end of the source, accordingly.

- Raw text -


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