From owner-freebsd-arch Mon Nov 1 23:16:11 1999 Delivered-To: freebsd-arch@freebsd.org Received: from ns1.yes.no (ns1.yes.no [195.204.136.10]) by hub.freebsd.org (Postfix) with ESMTP id 5FFAB14CB6 for ; Mon, 1 Nov 1999 23:16:06 -0800 (PST) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.9.3/8.9.3) with ESMTP id IAA13100 for ; Tue, 2 Nov 1999 08:16:05 +0100 (CET) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id IAA78122 for freebsd-arch@freebsd.org; Tue, 2 Nov 1999 08:16:04 +0100 (MET) Received: from mercury.Sun.COM (mercury.Sun.COM [192.9.25.1]) by hub.freebsd.org (Postfix) with ESMTP id D6CEC14CB6 for ; Mon, 1 Nov 1999 23:15:50 -0800 (PST) (envelope-from michael.schuster@germany.sun.com) Received: from emuc05-home.Germany.Sun.COM ([129.157.51.10]) by mercury.Sun.COM (8.9.3+Sun/8.9.3) with ESMTP id XAA09078; Mon, 1 Nov 1999 23:15:47 -0800 (PST) Received: from germany.sun.com (hacker [129.157.167.97]) by emuc05-home.Germany.Sun.COM (8.8.8+Sun/8.8.8/ENSMAIL,v1.7) with ESMTP id IAA10707; Tue, 2 Nov 1999 08:15:46 +0100 (MET) Message-ID: <381E8FA4.CF60DD7D@germany.sun.com> Date: Tue, 02 Nov 1999 08:15:48 +0100 From: Michael Schuster - TSC SunOS Germany Organization: Sun Microsystems, Inc. X-Mailer: Mozilla 4.7 [en] (X11; I; SunOS 5.8 sun4u) X-Accept-Language: en MIME-Version: 1.0 To: Terry Lambert , freebsd-arch@freebsd.org Subject: Re: stpcpy() References: <199911011936.MAA29291@usr02.primenet.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Terry Lambert wrote: > > I really think 99% of the programs using stpcpy() for "speed" reasons > > would spend 99% of their time elsewhere if p=strchr(strcpy(d,s), '\0'); > > were used. > > I believe the point is to iterate the string once, instead of twice, > without having to learn how to use pointers yourself. I have to contradict you here: I do not believe that C is the right language to use if you're not prepared to learn about pointers _in_depth_. This may be lamentable, but it's a fact. Iterating a string only once, instead of twice, is a different point, one I'd be prepared to concede. > Terry Lambert > terry@lambert.org cheers Michael -- Michael Schuster / Michael.Schuster@germany.sun.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message