Path: utzoo!utgpu!water!watmath!clyde!rutgers!sri-spam!ames!pasteur!ucbvax!hplabs!hp-pcd!hpcvmb!carlj From: carlj@hpcvmb.HP (Carl Johnson) Newsgroups: comp.sys.ibm.pc Subject: Re: bug in Turbo C 1.5 Message-ID: <3320003@hpcvmb.HP> Date: 29 Jan 88 04:04:59 GMT References: <5298@cit-vax.Caltech.Edu> Organization: HP Corvallis, Oregon. Lines: 14 >The Turbo C 1.0 memcpy() detects if the source and destination >overlap and switches the direction of the copying. Borland must have >decided that the memcpy() routine should not be so smart. The Turbo I think Borland is right not to bother making the memcpy() so smart. If you think about what a _COPY_ operation implies, an overlapping copy makes no sense whatsoever. In general it is impossible to have overlapping strings be identical. A move operation on the other hand must be able to handle overlaps, so it is important to have an intelligent move function such as memmove(). ----- Carl Johnson ...!hp-labs!hp-pcd!carlj