From owner-freebsd-hackers Sun Aug 10 10:33:55 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id KAA01724 for hackers-outgoing; Sun, 10 Aug 1997 10:33:55 -0700 (PDT) Received: from hwcn.org (main.hwcn.org [199.212.94.65]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id KAA01719 for ; Sun, 10 Aug 1997 10:33:51 -0700 (PDT) Received: from james.freenet.hamilton.on.ca (ac199@james.hwcn.org [199.212.94.66]) by hwcn.org (8.8.7/8.8.7) with ESMTP id NAA02424; Sun, 10 Aug 1997 13:34:25 -0400 (EDT) Received: from localhost (ac199@localhost) by james.freenet.hamilton.on.ca (8.8.7/8.8.7) with SMTP id NAA19603; Sun, 10 Aug 1997 13:34:40 -0400 (EDT) X-Authentication-Warning: james.freenet.hamilton.on.ca: ac199 owned process doing -bs Date: Sun, 10 Aug 1997 13:34:39 -0400 (EDT) From: Tim Vanderhoek X-Sender: ac199@james.freenet.hamilton.on.ca Reply-To: hoek@hwcn.org To: Mikael Karpberg cc: Darren Reed , hackers@FreeBSD.ORG Subject: Re: creating man 9f In-Reply-To: <199708101505.RAA12760@ocean.campus.luth.se> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Sun, 10 Aug 1997, Mikael Karpberg wrote: > Not really realted, but it's always annoyed me that all the strcat and strcpy > functions are so ineffective. They return a pointer to the buffer you > supply to the function (which is useless since you have it already) and > not a pointer to the trailing NUL. So if you want to add two strings you The GNU C library includes stpcpy(3), which does what you describe above. I find sprintf() easier, but there is precedence for the extension you describe. :) Hehe. "This function is not part of the ANSI or POSIX standards, and is not customary on Unix systems, but we did not invent it either. Perhaps it comes from MS-DOG." - GNU C lib ref. manual -- Outnumbered? Maybe. Outspoken? Never! tIM...HOEk