Date: Wed, 15 Jul 1998 11:00:33 +0300 (IDT) From: Kohn Emil Dan Reply-To: Kohn Emil Dan To: Eli Zaretskii 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 Tue, 14 Jul 1998, Eli Zaretskii wrote: > > 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. > Hi! You are right. Note the AS IF from my post. I was only explaing the semantics of this function, not its actual implementation. There might be implementations which implement this function as you have described, and some which implement it otherwise. You shouldn't care at all about it. Regards, Emil