Date: Tue, 09 Oct 2001 18:50:10 +0100 From: Brian Somers <brian@freebsd-services.com> To: Warner Losh <imp@harmony.village.org> Cc: Brian Somers <brian@freebsd-services.com>, Jeroen Ruigrok/Asmodai <asmodai@wxs.nl>, Mike Barcroft <mike@FreeBSD.org>, 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 Message-ID: <200110091750.f99HoA668592@hak.lan.Awfulhak.org> In-Reply-To: Message from Warner Losh <imp@harmony.village.org> of "Tue, 09 Oct 2001 11:10:17 MDT." <200110091710.f99HAH767190@harmony.village.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> 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 <brian@freebsd-services.com> <brian@Awfulhak.org>
http://www.freebsd-services.com/ <brian@[uk.]FreeBSD.org>
Don't _EVER_ lose your sense of humour ! <brian@[uk.]OpenBSD.org>
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200110091750.f99HoA668592>
