Path: utzoo!attcan!uunet!ncrlnk!ncr-sd!hp-sdd!hplabs!decwrl!purdue!mailrus!tut.cis.ohio-state.edu!bloom-beacon!CS.BROWN.EDU!jb From: jb@CS.BROWN.EDU Newsgroups: comp.windows.x Subject: Re: bcopy Message-ID: <8812091358.AA06741@tracy.cs.brown.edu> Date: 9 Dec 88 08:58:45 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 18 > char a[20]; > /* first sample: */ > bcopy (&a[0], &a[1], 19); > /* second sample: */ > bcopy (&a[1], &a[0], 19); Assuming the array initially contains "abcdefghijklmnopqrst", the first should yield "aabcdefghijklmnopqrs" while the second will result in "bcdefghijklmnopqrstt". This is what Sun means when they say that "overlapping strings are handled correctly." The second one should behave that way in all cases. The first might end up with the array containing 20 'a's if overlapping copies are done in a simple character at a time loop. To make this a bit more X related, I had to fix bcopy on the Encore Multimax to work around this problem. Jim