Subject: Re: RFC: memmem(3)
To: Luke Mewburn <lukem@netbsd.org>
From: None <wulf@ping.net.au>
List: tech-userlevel
Date: 03/02/2003 22:16:10
>
> On Sun, Mar 02, 2003 at 08:26:03PM +1030, wulf@ping.net.au wrote:
> | G'day,
> |
> | after many uses I like to propose memmem(3) for inclusion into libc.
> | memmem(3) is similar to strstr(3) with the difference that it allows
> | searching for arbitary binary data patterns in an memory block,
> | see man-page and source code included below fore more information.
> |
> | I believe that this is very versatile function that may become handy for
> | many applications.
> |
> | As always, I entertain your constructive comments.
> |
> | Many thanks in advance
> |
> | cheerio Berndt
>
> Looks good.
>
> One comment; any reason the signature isn't
> void *memmem(const void *b1, size_t len1, const void *b2, size_t len2);
> ?
>
> (keep the lengths with the pointers they're for).
Thanks. No, there isn't a particular reason for the suggested signature
layout. I merely implemented a missing function from declarations found
in several applications and followed the lead. However, grouping pointers
with their associated parameters would seem to make sens.
cheerio Berndt