Path: utzoo!mnetor!uunet!husc6!ut-sally!ut-emx!wca From: wca@ut-emx.UUCP (William C. Anderson) Newsgroups: comp.lang.c Subject: Re: strcpy Message-ID: <1304@ut-emx.UUCP> Date: 22 Mar 88 14:49:10 GMT References: <7712@apple.Apple.Com> <7485@brl-smoke.ARPA> <10731@mimsy.UUCP> <10753@mimsy.UUCP> Organization: The University of Texas at Austin, Austin, Texas Lines: 14 Summary: bcopy overlapped memory arrays In article <10753@mimsy.UUCP>, chris@mimsy.UUCP (Chris Torek) writes: -> In article <7506@brl-smoke.ARPA> gwyn@brl-smoke.ARPA (Doug Gwyn) writes: -> ->This usage was never a good idea, because a valid implementation of -> ->strcpy() would be to copy right-to-left rather than left-to-right -> `That turns out not to be the case'---or rather, are you certain? Chris is right here, Doug. For example, the ndbm(3) routines in 4.3BSD depend upon bcopy() doing the correct ordering in cases of overlap. Luckily, it is simple to do the code correctly. William Anderson - University of Texas Computation Center - wca@emx.utexas.edu