Path: utzoo!mnetor!uunet!husc6!purdue!umd5!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.lang.c Subject: Re: strcpy Message-ID: <10753@mimsy.UUCP> Date: 21 Mar 88 17:50:36 GMT References: <7712@apple.Apple.Com> <7485@brl-smoke.ARPA> <10731@mimsy.UUCP> <7506@brl-smoke.ARPA> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 15 >In article <10731@mimsy.UUCP> I wrote: >> /* remove leading junk (n < strlen(buf)) */ >> (void) strcpy(buf, buf + n); 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? I agree that a generic block copy operation (one of {memcpy, memmove} ---I cannot remember which allows overlap) might do this; I do not agree that strcpy() may be implemented that way. (I could be wrong.) -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris