git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3] wildmatch: properly fold case everywhere

From
Duy Nguyen <pclouds@gmail.com>
Date
May 30, 2013, 00:04 UTC
Message-ID
<CACsJy8CuaowyZJGKh7X+43qRwYAdUCDbVo8P5CpEtukBzRiReg@mail.gmail.com>
In-Reply-To
<BAB62C57-FE7D-476A-ACA7-5831BAF3E558@gmail.com>
On Thu, May 30, 2013 at 12:57 AM, Anthony Ramine <n.oxyde@gmail.com> wrote:
Show 10 quoted lines
>>> If the range to match against is [A-_], it will become [a-_] which is an empty range, ord('a') > ord('_'). I think it is simpler to reuse toupper() after the fact as I did.
>>>
>>> Anyway maybe I should add a test for that corner case?
>>
>> Yeah I was thinking about such a case, but I saw glibc do it... I
>> guess we just found another bug, at least in compat/fnmatch.c. Yes a
>> test for it would be great, in case I change my mind 2 years from now
>> and decide to turn it the other way ;)
>
> Should I patch compat/fnmatch.c too? That would make it different from the glibc's one.

No. I plan to remove compat/fnmatch and always use wildmatch, even ignoring system's fnmatch. That would keep the matching behavior consistent across platforms. -- Duy

Previous: Anthony RamineNext: Anthony Ramine
Message 10 of 18 in “wildmatch: properly fold case everywhere”
  1. wildmatch: properly fold case everywhereAnthony Ramine, May 28, 2013
  2. Duy NguyenMay 28, 2013
  3. Anthony RamineMay 28, 2013
  4. wildmatch: properly fold case everywhereAnthony Ramine, May 28, 2013
  5. wildmatch: properly fold case everywhereAnthony Ramine, May 28, 2013
  6. Duy NguyenMay 29, 2013
  7. Anthony RamineMay 29, 2013
  8. Duy NguyenMay 29, 2013
  9. Anthony RamineMay 29, 2013
  10. Duy NguyenMay 30, 2013
  11. wildmatch: properly fold case everywhereAnthony Ramine, May 30, 2013
  12. Duy NguyenMay 30, 2013
  13. Eric SunshineMay 30, 2013
  14. Anthony RamineMay 30, 2013
  15. Eric SunshineMay 30, 2013
  16. wildmatch: properly fold case everywhereAnthony Ramine, May 30, 2013
  17. Junio C HamanoJun 2, 2013
  18. Anthony RamineJun 2, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.