Date: Tue, 14 Jul 1998 10:07:35 +0300 (IDT) From: Eli Zaretskii To: Kohn Emil Dan cc: djgpp AT delorie DOT com Subject: Re: Copying memory to memory problems In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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.