Re: [PATCH v2 2/2] [GSOC] ref-filter: add %(raw) atom
- From
ZheNing Hu <adlternative@gmail.com>
- Date
- Jun 1, 2021, 10:37 UTC
- Message-ID
- <CAOLTT8SXYGVxHfZVu9gp6ZSE0xNY+kM9Lq4ifApOr3JixsScDQ@mail.gmail.com>
- In-Reply-To
- <60b503ab859d_24d282087@natae.notmuch>
Felipe Contreras <felipe.contreras@gmail.com> 于2021年5月31日周一 下午11:41写道:
Show 13 quoted lines
>
> ZheNing Hu via GitGitGadget wrote:
> > From: ZheNing Hu <adlternative@gmail.com>
>
> > +static int memcasecmp(const void *vs1, const void *vs2, size_t n)
> > +{
> > + const char *s1 = (const void *)vs1;
> > + const char *s2 = (const void *)vs2;
>
> As I explained in another mail, I think this is better:
>
> const char *s1 = vs1, *s2 = vs2;
>OK, I understand it now.
Show 12 quoted lines
> > + const char *end = s1 + n;
> > +
> > + for (; s1 < end; s1++, s2++) {
> > + int diff = tolower(*s1) - tolower(*s2);
> > + if (diff)
> > + return diff;
> > + }
> > + return 0;
> > +}
>
> --
> Felipe ContrerasThanks. -- ZheNing Hu