From owner-cvs-all Tue Oct 9 10:50:20 2001 Delivered-To: cvs-all@freebsd.org Received: from Awfulhak.org (gw.Awfulhak.org [217.204.245.18]) by hub.freebsd.org (Postfix) with ESMTP id 45C4937B408; Tue, 9 Oct 2001 10:50:09 -0700 (PDT) Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [fec0::1:12]) by Awfulhak.org (8.11.6/8.11.6) with ESMTP id f99Ho7C02172; Tue, 9 Oct 2001 18:50:07 +0100 (BST) (envelope-from brian@freebsd-services.com) Received: from hak.lan.Awfulhak.org (brian@localhost [127.0.0.1]) by hak.lan.Awfulhak.org (8.11.6/8.11.6) with ESMTP id f99HoA668592; Tue, 9 Oct 2001 18:50:10 +0100 (BST) (envelope-from brian@freebsd-services.com) Message-Id: <200110091750.f99HoA668592@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Warner Losh Cc: Brian Somers , Jeroen Ruigrok/Asmodai , Mike Barcroft , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, brian@freebsd-services.com Subject: Re: cvs commit: src/lib/libc/string strnstr.c Makefile.inc strstr.3 src/include string.h In-Reply-To: Message from Warner Losh of "Tue, 09 Oct 2001 11:10:17 MDT." <200110091710.f99HAH767190@harmony.village.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 09 Oct 2001 18:50:10 +0100 From: Brian Somers Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > In message <200110091613.f99GDk600838@hak.lan.Awfulhak.org> Brian Somers writes: > : > -On [20011009 12:00], Brian Somers (brian@freebsd-services.com) wrote: > : > >Is this based on any known standard? > : > > : > No. > : > > : > >If not, shouldn't there be a mention that this is a FreeBSD specific > : > >API in the man page ? > : > > : > We don't have a consistent precedent for doing so. > : > : reallocf() seems like a reasonable sample. > > reallocf() was added so we didn't have to add the following code: > void *p, *newp; > > newp = realloc(p, size); > if (newp == NULL) > free(p); > p = newp; > > and have people get it wrong 5 different ways. Yes. The man page also mentions that it's not a standard API. I figured it'd be nice to do the same with strnstr(). > Warner -- Brian http://www.freebsd-services.com/ Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message