This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add rawmemchr


On Jun 24 13:01, Peter Rosin wrote:
> On 2013-06-24 11:42, Corinna Vinschen wrote:
> > On Jun 23 23:52, Yaakov (Cygwin/X) wrote:
> >> Code is based on memchr.c; patch for newlib attached.
> > 
> > In how far is rawmemchr different from strchr?  Why don't we just alias
> > rawmemchr to strchr?  Our strchr also uses an optimized search
> > algorithm, so, as far as I'm concerned, there's no reason to duplicate
> > this functionality.  Am I missing something?
> 
> See this description, which was part of the patch:
> 
> +	This function searches memory starting at <<*<[src]>>> for the
> +	character <[c]>.  The search only ends with the first occurrence
> +	of <[c]>; in particular, <<NUL>> does not terminate the search.
> +	No bounds checking is performed, so this function should only
> +	be used when it is certain that the character <[c]> will be found.

Ouch, thank you.  Does ENOCOFFEE qualify as excuse?  I hope so...

Yaakov, please go ahead and apply, together with the patch on the
cygwin-patches list.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]